Issue #2002336 by LewisNyman, mgifford, sun: Introduce a CSS class to hide borders of fieldset elements.

8.0.x
Nathaniel Catchpole 2014-02-13 11:00:41 +00:00
parent 98cdbfec7b
commit 42e1b3a0ac
3 changed files with 16 additions and 8 deletions

View File

@ -2567,7 +2567,7 @@ function install_display_requirements($install_state, $requirements) {
*/
function _install_configure_form($form, &$form_state, &$install_state) {
$form['site_information'] = array(
'#type' => 'details',
'#type' => 'fieldgroup',
'#title' => t('Site information'),
);
$form['site_information']['site_name'] = array(
@ -2584,11 +2584,11 @@ function _install_configure_form($form, &$form_state, &$install_state) {
'#required' => TRUE,
'#weight' => -15,
);
$form['admin_account'] = array(
'#type' => 'details',
'#type' => 'fieldgroup',
'#title' => t('Site maintenance account'),
);
$form['admin_account']['account']['#tree'] = TRUE;
$form['admin_account']['account']['name'] = array('#type' => 'textfield',
'#title' => t('Username'),
@ -2598,7 +2598,6 @@ function _install_configure_form($form, &$form_state, &$install_state) {
'#weight' => -10,
'#attributes' => array('class' => array('username')),
);
$form['admin_account']['account']['mail'] = array(
'#type' => 'email',
'#title' => t('E-mail address'),
@ -2613,10 +2612,9 @@ function _install_configure_form($form, &$form_state, &$install_state) {
);
$form['regional_settings'] = array(
'#type' => 'details',
'#type' => 'fieldgroup',
'#title' => t('Regional settings'),
);
$countries = \Drupal::service('country_manager')->getList();
$form['regional_settings']['site_default_country'] = array(
'#type' => 'select',
@ -2627,7 +2625,6 @@ function _install_configure_form($form, &$form_state, &$install_state) {
'#description' => t('Select the default country for the site.'),
'#weight' => 0,
);
$form['regional_settings']['date_default_timezone'] = array(
'#type' => 'select',
'#title' => t('Default time zone'),
@ -2639,7 +2636,7 @@ function _install_configure_form($form, &$form_state, &$install_state) {
);
$form['update_notifications'] = array(
'#type' => 'details',
'#type' => 'fieldgroup',
'#title' => t('Update notifications'),
);
$form['update_notifications']['update_status_module'] = array(

View File

@ -26,6 +26,14 @@
background-position: 0% center;
}
/**
* Unboxed fieldsets for grouping form elements.
*/
.fieldgroup {
border-width: 0;
padding: 0;
}
/**
* Collapsible details.
*

View File

@ -551,6 +551,9 @@ function system_element_info() {
'#pre_render' => array('form_pre_render_group'),
'#theme_wrappers' => array('fieldset'),
);
$types['fieldgroup'] = $types['fieldset'] + array(
'#attributes' => array('class' => array('fieldgroup')),
);
$types['details'] = array(
'#collapsed' => FALSE,
'#value' => NULL,