function rate_panels_rate_widget_form in Rate 7
1 string reference to 'rate_panels_rate_widget_form'
- rate_widget.inc in plugins/
content_types/ rate_widget.inc
File
- plugins/
content_types/ rate_widget.inc, line 17
Code
function rate_panels_rate_widget_form($form, &$form_state) {
$conf = $form_state['conf'];
// General options, that depends on the type of options your widget or plugin must have as a configuration
$form['build_mode'] = array(
'#title' => t('Build mode'),
'#type' => 'select',
'#options' => array(
RATE_FULL => t('RATE_FULL'),
RATE_COMPACT => t('RATE_COMPACT'),
RATE_DISABLED => t('RATE_DISABLED'),
RATE_CLOSED => t('RATE_CLOSED'),
RATE_COMPACT_DISABLED => t('RATE_COMPACT_DISABLED'),
),
'#default_value' => $conf['build_mode'],
);
$widgets = variable_get(RATE_VAR_WIDGETS, array());
$widget_options = array();
foreach ($widgets as $id => $widget) {
$widget_options[$id] = $widget->title;
}
$form['widget_name'] = array(
'#title' => t('Widget'),
'#type' => 'select',
'#options' => $widget_options,
'#default_value' => $conf['widget_name'],
);
return $form;
}