diff --git a/core/modules/field/theme/field.css b/core/modules/field/theme/field.css index 2ec03af..f9399eb 100644 --- a/core/modules/field/theme/field.css +++ b/core/modules/field/theme/field.css @@ -26,3 +26,9 @@ form .field-multiple-table .field-multiple-drag .tabledrag-handle { form .field-add-more-submit { margin: .5em 0 0; } + +/* Fieldset variant */ +fieldset.fieldset-no-border { + border: none; + padding: 0; +} diff --git a/core/modules/field_ui/field_ui.admin.inc b/core/modules/field_ui/field_ui.admin.inc index 566959b..d324bad 100644 --- a/core/modules/field_ui/field_ui.admin.inc +++ b/core/modules/field_ui/field_ui.admin.inc @@ -524,12 +524,16 @@ function field_ui_field_settings_form($form, &$form_state, $instance) { $form['field']['container'] = array( // We can't use the container element because it doesn't support the title // or description properties. - '#type' => 'item', - '#field_prefix' => '
', - '#field_suffix' => '
', '#title' => t('Maximum number of values users can enter'), + '#type' => 'fieldset', + '#attributes' => array('class' => array( + 'container-inline', + 'fieldset-no-border' + )), ); $form['field']['container']['cardinality'] = array( + '#title' => t('Number of values'), + '#title_display' => 'invisible', '#type' => 'select', '#options' => drupal_map_assoc(range(1, 5)) + array(FIELD_CARDINALITY_UNLIMITED => t('Unlimited')) + array('other' => t('More')), '#default_value' => ($cardinality < 6) ? $cardinality : 'other', @@ -548,10 +552,13 @@ function field_ui_field_settings_form($form, &$form_state, $instance) { ), ); if (field_behaviors_widget('multiple values', $instance) == FIELD_BEHAVIOR_DEFAULT) { - $form['field']['container']['#description'] = t('%unlimited will provide an %add-more button so users can add as many values as they like.', array( - '%unlimited' => t('Unlimited'), - '%add-more' => t('Add another item'), - )); + $form['field']['description'] = array( + '#type' => 'item', + '#description' => t('%unlimited will provide an %add-more button so users can add as many values as they like.', array( + '%unlimited' => t('Unlimited'), + '%add-more' => t('Add another item'), + )) + ); } // Build the non-configurable field values.