function equalheights_settings_fields in Equal Heights jQuery 7.2
1 call to equalheights_settings_fields()
- equalheights_admin in ./
equalheights.admin.inc - Administration settings page.
File
- ./
equalheights.admin.inc, line 131 - Provides the administration page for Equal Heights.
Code
function equalheights_settings_fields($settings = array()) {
// Add defaults
$settings += array(
'selector' => '',
'minheight' => '',
'maxheight' => '',
'overflow' => 'auto',
'mediaquery' => '',
);
$selector = $settings['selector'];
$minheight = $settings['minheight'];
$maxheight = $settings['maxheight'];
$overflow = $settings['overflow'];
$mediaquery = $settings['mediaquery'];
$form['#tree'] = TRUE;
$form['delete'] = array(
'#type' => 'checkbox',
'#default' => FALSE,
'#attributes' => array(
'title' => t('Delete the class'),
),
);
$form['selector'] = array(
'#type' => 'textarea',
'#default_value' => _equalheights_selector_unfold($selector),
'#rows' => 3,
'#cols' => 20,
'#attributes' => array(
'title' => t("The selector of the elements that need equal height"),
),
'#description' => t("You may enter one or several compound selectors seperated by a comma.<br>\n New lines will be injected before commas."),
);
$form['mediaquery'] = array(
'#type' => 'textarea',
'#default_value' => $mediaquery,
'#rows' => 3,
'#cols' => 20,
'#attributes' => array(
'title' => t("The media query to use for this line"),
),
'#description' => t('You may enter only one media query like "(min-width: 480px)".<br>
Equalheights will be loaded for matching mediaquery'),
);
$form['minheight'] = array(
'#type' => 'textfield',
'#default_value' => $minheight,
'#size' => 4,
'#attributes' => array(
'title' => t('Minimum height of the class, in pixels'),
),
);
$form['maxheight'] = array(
'#type' => 'textfield',
'#default_value' => $maxheight,
'#size' => 4,
'#attributes' => array(
'title' => t('Maximum height of the class, in pixels'),
),
);
$form['overflow'] = array(
'#type' => 'radios',
'#default_value' => $overflow,
'#options' => array(
'auto' => t('auto'),
'hidden' => t('hidden'),
'visible' => t('visible'),
),
'#attributes' => array(
'title' => t('Overflow value if the content taller than the max height'),
),
);
return $form;
}