function breakpoints_multipliers_form in Breakpoints 7
Multipliers administration form.
1 string reference to 'breakpoints_multipliers_form'
- breakpoints_menu in ./
breakpoints.module - Implements hook_menu().
File
- ./
breakpoints.admin.inc, line 1039 - Breakpoints - admin settings
Code
function breakpoints_multipliers_form($form, &$form_state) {
$settings = breakpoints_settings();
$multipliers = drupal_map_assoc($settings->multipliers);
if (isset($multipliers['1x'])) {
unset($multipliers['1x']);
}
$form['multipliers'] = array(
'#type' => 'container',
'#tree' => TRUE,
'#theme' => 'breakpoints_multipliers_table_form',
);
$form['multipliers']['1x'] = array(
'#markup' => '1x',
);
foreach ($multipliers as $multiplier) {
$form['multipliers'][$multiplier] = array(
'#type' => 'textfield',
'#title' => '',
'#required' => FALSE,
'#default_value' => $multiplier,
);
}
$form['multipliers']['new'] = array(
'#type' => 'textfield',
'#title' => '',
'#required' => FALSE,
'#default_value' => '',
'#description' => t('Multiplier like 1.5x, 2x.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
return $form;
}