function imagepicker_groups_form in Image Picker 5
Same name and namespace in other branches
- 5.2 imagepicker.module \imagepicker_groups_form()
- 6.2 imagepicker.group.inc \imagepicker_groups_form()
- 7 imagepicker.group.inc \imagepicker_groups_form()
3 string references to 'imagepicker_groups_form'
File
- ./
imagepicker.module, line 1548 - Enables permitted roles to upload images for insertion into configured nodes.
Code
function imagepicker_groups_form($record = 0, $account = FALSE) {
$form['groupsave'] = array(
'#type' => 'fieldset',
'#title' => $record->gid ? t('Edit group') : t('Add group'),
'#description' => t('Give your group a brief name and optionally put any additional information in the group description box'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['groupsave']['group_name'] = array(
'#type' => 'textfield',
'#title' => t('Group name'),
'#size' => 20,
'#default_value' => $record->group_name ? $record->group_name : '',
'#description' => t(''),
'#required' => TRUE,
);
$form['groupsave']['group_description'] = array(
'#type' => 'textfield',
'#title' => t('group description'),
'#size' => 50,
'#maxlength' => 50,
'#default_value' => $record->group_description ? $record->group_description : '',
'#description' => t('Maximum 50 characters'),
'#required' => FALSE,
);
if ($account) {
$form['groupsave']['account'] = array(
'#type' => 'hidden',
'#value' => 1,
);
}
if ($record->gid) {
$form['groupsave']['gid'] = array(
'#type' => 'hidden',
'#value' => $record->gid,
);
}
$form['groupsave']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save group'),
);
return $form;
}