function panels_flexible_reuse_form in Panels 7.3
Same name and namespace in other branches
- 6.3 plugins/layouts/flexible/flexible.inc \panels_flexible_reuse_form()
1 string reference to 'panels_flexible_reuse_form'
- panels_ajax_flexible_edit_reuse in plugins/
layouts/ flexible/ flexible.inc - AJAX form to bring up the "reuse" modal.
File
- plugins/
layouts/ flexible/ flexible.inc, line 1767 - Flexible layout plugin.
Code
function panels_flexible_reuse_form($form, &$form_state) {
$form['markup'] = array(
'#prefix' => '<div class="description">',
'#suffix' => '</div>',
'#value' => t('If you save this layout for reuse it will appear in the list of reusable layouts at admin/structure/panels/layouts, and you will need to go there to edit it. This layout will then become an option for all future panels you make.'),
);
$form['admin_title'] = array(
'#type' => 'textfield',
'#title' => t('Administrative title'),
'#description' => t('This will appear in the administrative interface to easily identify it.'),
);
$form['name'] = array(
'#type' => 'machine_name',
'#title' => t('Machine name'),
'#description' => t('The machine readable name of this layout. It must be unique, and it must contain only alphanumeric characters and underscores. Once created, you will not be able to change this value!'),
'#machine_name' => array(
'exists' => 'panels_flexible_edit_name_exists',
'source' => array(
'admin_title',
),
),
);
$form['category'] = array(
'#type' => 'textfield',
'#title' => t('Category'),
'#description' => t('What category this layout should appear in. If left blank the category will be "Miscellaneous".'),
);
$form['admin_description'] = array(
'#type' => 'textarea',
'#title' => t('Administrative description'),
'#description' => t('A description of what this layout is, does or is for, for administrative use.'),
);
$form['keep'] = array(
'#type' => 'checkbox',
'#title' => t('Keep current panel layout flexible'),
'#description' => t('If checked, this panel will continue to use a generic flexible layout and will not use the saved layout. Use this option if you wish to clone this layout.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
return $form;
}