function gallery_assist_form in Gallery Assist 6
Implementation of hook_form().
File
- ./
gallery_assist.module, line 905 - Drupal content type with gallery functionality.
Code
function gallery_assist_form(&$node, $form_state) {
$type = node_get_types('type', $node);
$form = array();
if ($type->has_title) {
$form['title'] = array(
'#type' => 'textfield',
'#title' => check_plain($type->title_label),
'#required' => TRUE,
'#default_value' => $node->title,
'#weight' => -24,
);
}
// The body of gallery assist node type.
if ($type->has_body) {
$form['body_field'] = node_body_field($node, $type->body_label, $type->min_word_count);
$form['body_field']['#weight'] = -20;
$form['body_field']['body']['#rows'] = 5;
}
// // Add a checkbox to lock or unlock the gallery.
// $form['ga_lock'] = array(
// '#type' => 'fieldset',
// '#access' => $node->ga_counter > 300 ? TRUE : FALSE,
// '#weight' => 3000
// );
// $form['ga_lock']['gallery_assist_lockked'] = array(
// '#type' => 'checkbox',
// '#title' => t('One time lock'),
// '#default_value' => FALSE,
// '#description' => t('Enable this parameter to avoid over head or long wait time in case your changes fields that are not part of the gallery. By enabled is all the data from gallery items excluded from the save process.')
// );
return $form;
}