function trumba_promo_ctrl_spud_edit_form in Trumba 7
Ctools edit form.
1 string reference to 'trumba_promo_ctrl_spud_edit_form'
- trumba_promo_ctrl_spud.inc in plugins/
content_types/ trumba_promo_ctrl_spud.inc - Configuration and content type for a main calendar Trumba spud.
File
- plugins/
content_types/ trumba_promo_ctrl_spud.inc, line 32 - Configuration and content type for a main calendar Trumba spud.
Code
function trumba_promo_ctrl_spud_edit_form($form, &$form_state) {
$conf = $form_state['conf'];
// @todo: make the types configurable
// @todo: Is there a search type of filter name or config?
$types = array(
'upcoming' => 'upcoming',
'datefinder' => 'datefinder',
'daysummary' => 'daysummary',
'filter' => 'filter',
);
$form['trumba_promo_ctrl_type'] = array(
'#type' => 'select',
'#required' => TRUE,
'#title' => t('Spud Type'),
'#description' => t('Select the type of spud this should be.'),
'#default_value' => $conf['trumba_promo_ctrl_type'],
'#empty_option' => t('- Select -'),
'#options' => $types,
);
$form['trumba_promo_ctrl_config'] = array(
'#type' => 'textfield',
'#required' => FALSE,
'#title' => t('Spud Configuration'),
'#description' => t('If the spud type requires configuration text enter it here.'),
'#default_value' => $conf['trumba_promo_ctrl_config'],
);
// Collect the webname, used to identify the organization/account that this
// spud belong to. Set to the default frm the admin settings to start with.
$default_webname = variable_get('trumba_webname', '');
$form['trumba_promo_ctrl_webname'] = array(
'#type' => 'textfield',
'#required' => TRUE,
'#title' => t('Web Name'),
'#description' => t('This is the unique identifier for your calendar account on Trumba.'),
'#default_value' => $conf['trumba_promo_ctrl_webname'] ? $conf['trumba_promo_ctrl_webname'] : $default_webname,
);
$form['trumba_promo_ctrl_url'] = array(
'#type' => 'textfield',
'#required' => FALSE,
'#title' => t('Calendar URL'),
'#description' => t('<strong>Only necessary if this spud will NOT be on the
same page as the main calendar spud!</strong> Enter the full path URL for this
website where this calendar will be placed (e.g.: https://ucdavis.edu/calendar)'),
'#default_value' => $conf['trumba_main_cal_url'],
);
return $form;
}