function _popup_ui_form_formatters_row in Popup 7.x
Same name and namespace in other branches
- 6.x modules/popup_ui/includes/popup_ui.admin.inc \_popup_ui_form_formatters_row()
1 call to _popup_ui_form_formatters_row()
- popup_ui_form_formatters in modules/
popup_ui/ includes/ popup_ui.admin.inc
File
- modules/
popup_ui/ includes/ popup_ui.admin.inc, line 124
Code
function _popup_ui_form_formatters_row($key, $values, $options) {
module_load_include('inc', 'popup_ui', 'includes/popup_ui.api');
module_load_include('inc', 'popup', 'includes/popup.util');
$values += _popup_defaults();
$row = $key == 'new' ? array(
'label' => array(
'#default_value' => $values['label'],
'#size' => 20,
'#type' => 'textfield',
),
) : array(
'label' => array(
'#value' => $values['label'],
'#size' => 20,
'#type' => 'hidden',
'#suffix' => $values['label'],
),
);
$row += array(
'origin' => array(
'#default_value' => isset($values['origin']) ? $values['origin'] : FALSE,
'#type' => 'select',
'#options' => $options['position'],
),
'expand' => array(
'#default_value' => $values['expand'],
'#type' => 'select',
'#options' => $options['position'],
),
'effect' => array(
'#default_value' => $values['effect'],
'#type' => 'select',
'#options' => $options['effect'],
),
'style' => array(
'#default_value' => $values['style'],
'#type' => 'select',
'#options' => $options['style'],
),
'opacity' => array(
'#default_value' => $values['opacity'],
'#type' => 'select',
'#options' => $options['opacity'],
),
'width' => array(
'#default_value' => $values['width'],
'#type' => 'select',
'#options' => $options['width'],
),
'activate' => array(
'#default_value' => $values['activate'],
'#type' => 'select',
'#options' => array(
'hover' => t('Hover'),
'click' => t('Click'),
),
),
'close' => array(
'#default_value' => $values['close'],
'#type' => 'checkbox',
),
'ajax' => array(
'#default_value' => $values['ajax'],
'#type' => 'checkbox',
),
'teaser' => array(
'#default_value' => $values['teaser'],
'#type' => 'checkbox',
),
'page' => array(
'#default_value' => $values['page'],
'#type' => 'checkbox',
),
'links' => array(
'#default_value' => $values['links'],
'#type' => 'checkbox',
),
'panel' => array(
'#default_value' => $values['panel'],
'#type' => 'checkbox',
),
'inline' => array(
'#default_value' => $values['inline'],
'#type' => 'checkbox',
),
'flat' => array(
'#default_value' => $values['flat'],
'#type' => 'checkbox',
),
'submenu-origin' => array(
'#default_value' => $values['submenu-origin'],
'#type' => 'select',
'#options' => $options['position'],
),
'submenu-expand' => array(
'#default_value' => $values['submenu-expand'],
'#type' => 'select',
'#options' => $options['position'],
),
'ops' => array(
'#markup' => $key == 'new' ? ' ' : popup_ui_confirm('Delete', 'Are you sure you want to delete this popup format? It cannot be undone!', 'admin/config/user-interface/popup/formats/delete/' . $key, array(
'origin' => 'bottom-right',
'expand' => 'bottom-left',
)),
),
);
// if (!module_exists('ctools')){
// $row['panel']['#attributes']['disabled'] = 'disabled';
// }
return $row;
}