function gallery_assist_assignments_form in Gallery Assist 7
Form builder; Manage GA content types specific settings.
Parameters
$cero:
$form_state: An associative array containing the current state of the form.
$type: String containing the machine name of the content type.
$name: String containing the redeable name of the content type.
See also
gallery_assist_assignments_form_submit()
gallery_assist_assignments_form_validate()
1 string reference to 'gallery_assist_assignments_form'
- gallery_assist_menu in ./
gallery_assist.module - Implements hook_menu().
File
- ./
gallery_assist.admin.inc, line 68 - GA module administration forms.
Code
function gallery_assist_assignments_form($cero, &$form_state, $type = 'gallery_assist', $name = 'Galery Assist') {
$settings = variable_get("gallery_assist_{$type}_data", array());
$form = array();
$form['gallery_assist_settings_set'] = array(
'#type' => 'vertical_tabs',
);
$weight = 10;
$form['gallery_assist_settings'] = array(
'#type' => 'fieldset',
'#title' => "<span title=" . '"open all"' . " class=" . '"toogle-fieldsets status-closed ga-pointer"' . "></span> Gallery settings on {$name}",
#'#description' => '<span class="toogle-fieldsets status-closed ga-pointer">[+]</span>'
'#weight' => 0,
);
$form['upload'] = array(
'#type' => 'fieldset',
'#title' => 'Upload',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
// '#tree' => TRUE,
'#weight' => $weight++,
'#group' => 'gallery_assist_settings_set',
);
$form['upload'] += _gallery_assist_upload_settings_form($settings);
$form['elements'] = array(
'#type' => 'fieldset',
'#title' => 'Elements',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
// '#tree' => TRUE,
'#weight' => $weight++,
'#group' => 'gallery_assist_settings_set',
);
$form['elements'] += _gallery_assist_elements_settings_form($settings);
// Image styles.
$form['size_styles'] = array(
'#type' => 'fieldset',
'#title' => 'Sizes / Image styles',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
// '#tree' => TRUE,
'#weight' => $weight++,
'#group' => 'gallery_assist_settings_set',
);
$form['size_styles'] += _gallery_assist_size_styles_form($settings);
// Elements.
$form['elements'] = array(
'#type' => 'fieldset',
'#title' => 'Elements',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
// '#tree' => TRUE,
'#weight' => $weight++,
'#group' => 'gallery_assist_settings_set',
);
$form['elements'] += _gallery_assist_elements_settings_form($settings);
// Layout.
$form['gallery_style'] = array(
'#type' => 'fieldset',
'#title' => 'Style',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
// '#tree' => TRUE,
'#weight' => $weight++,
'#group' => 'gallery_assist_settings_set',
);
$form['gallery_style'] += _gallery_assist_gallery_style_form($settings);
// Pager.
$form['pager'] = array(
'#type' => 'fieldset',
'#title' => 'Pager',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
// '#tree' => TRUE,
'#weight' => $weight++,
'#group' => 'gallery_assist_settings_set',
);
$form['pager'] += _gallery_assist_pager_form($settings);
$form['others'] = array(
'#type' => 'fieldset',
'#title' => 'Miscellaneous',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
// '#tree' => TRUE,
'#weight' => $weight++,
'#group' => 'gallery_assist_settings_set',
);
$form['others']['mytest'] = array(
'#type' => 'textfield',
'#title' => 'Test field',
'#default_value' => '',
);
$form['others']['mytest2'] = array(
'#type' => 'textfield',
'#title' => 'Test field 2',
'#default_value' => '',
);
$form['others']['type'] = array(
'#type' => 'hidden',
'#value' => $type,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
return $form;
}