function panopoly_magic_configure_form in Panopoly 7
Configuration Form for Panopoly Magic
1 string reference to 'panopoly_magic_configure_form'
- panopoly_magic_apps_app_info in modules/
panopoly/ panopoly_magic/ panopoly_magic.module - Implements hook_apps_app_info()
File
- modules/
panopoly/ panopoly_magic/ panopoly_magic.module, line 159
Code
function panopoly_magic_configure_form($form, &$form_state) {
$form = array();
$form['panopoly_magic_live_preview'] = array(
'#title' => t('Live Preview'),
'#type' => 'select',
'#required' => TRUE,
'#options' => array(
'1' => 'Automatic',
'2' => 'Manual',
'0' => 'Disabled',
),
'#default_value' => variable_get('panopoly_magic_live_preview', 1),
'#description' => t('Do you want Panopoly to provide a live preview for modal content through the in place editor?'),
);
$form['panopoly_magic_pane_add_preview'] = array(
'#title' => t('Enable previews when adding panes'),
'#type' => 'select',
'#required' => TRUE,
'#options' => array(
PANOPOLY_ADD_PREVIEW_AUTOMATIC => 'Automatic',
PANOPOLY_ADD_PREVIEW_MANUAL => 'Manual',
PANOPOLY_ADD_PREVIEW_SINGLE => 'Single',
PANOPOLY_ADD_PREVIEW_DISABLED => 'Disabled',
),
'#default_value' => variable_get('panopoly_magic_pane_add_preview', PANOPOLY_ADD_PREVIEW_DEFAULT),
'#description' => t('Do you want to automatically generate previews when adding existing panels panes through the IPE?'),
);
$form['panopoly_magic_pane_show_description'] = array(
'#title' => t('Show pane descriptions when adding panes'),
'#type' => 'checkbox',
'#states' => array(
'invisible' => array(
':input[name="panopoly_magic_pane_add_preview"]' => array(
'value' => PANOPOLY_ADD_PREVIEW_DISABLED,
),
),
),
'#default_value' => variable_get('panopoly_magic_pane_show_description', 1),
'#description' => t('Do you want to show text descriptions for available panes in the Add Content dialog?'),
);
$form['panopoly_magic_show_panels_styles'] = array(
'#title' => t('Show seldom used panels pane styles'),
'#type' => 'select',
'#required' => TRUE,
'#options' => array(
'1' => t('Yes'),
'0' => t('No'),
),
'#default_value' => variable_get('panopoly_magic_show_panels_styles', 0),
'#description' => t('Do you want to show seldom used pane styles such as "no markup at all"?'),
);
$form['panopoly_magic_strip_js_from_preview'] = array(
'#title' => t('Strip embedded .js from previews'),
'#type' => 'select',
'#required' => TRUE,
'#options' => array(
'1' => t('Enabled'),
'0' => t('Disabled'),
),
'#default_value' => variable_get('panopoly_magic_strip_js_from_preview', 0),
'#description' => t('Some embedded javascript may cause issues with panopoly and the IPE, stripping the .js from your previews will fix this issue, but may alter the look of the preview.'),
);
$form['panopoly_magic_preview_use_legacy_fieldset'] = array(
'#title' => t('Use legacy <fieldset> markup in preview'),
'#type' => 'select',
'#required' => TRUE,
'#options' => array(
'1' => t('Yes'),
'0' => t('No'),
),
'#default_value' => variable_get('panopoly_magic_preview_use_legacy_fieldset', 0),
'#description' => t('The preview used to appear in a <fieldset>, however, that turned out to be problematic in some browsers. But if your theme depends on the old markup, you can enabled it.'),
);
$form['advanced'] = array(
'#title' => t('Advanced'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['advanced']['panopoly_magic_hidden_view_mode_options'] = array(
'#title' => t('Hidden view mode options'),
'#type' => 'textarea',
'#default_value' => variable_get('panopoly_magic_hidden_view_mode_options', PANOPOLY_MAGIC_HIDDEN_VIEW_MODE_OPTIONS),
'#description' => t('List the machine names, one per line, of view modes you want removed from the list of possible view modes on widget configuration forms.'),
'#rows' => 6,
);
return system_settings_form($form);
}