function theme_flag_actions_flag_form in Flag 7.3
Same name and namespace in other branches
- 5 flag_actions.module \theme_flag_actions_flag_form()
- 6.2 flag_actions.module \theme_flag_actions_flag_form()
- 6 flag_actions.module \theme_flag_actions_flag_form()
- 7.2 flag_actions.module \theme_flag_actions_flag_form()
1 theme call to theme_flag_actions_flag_form()
- flag_actions_form in ./
flag_actions.module - Generic configuration form for configuration of flag actions.
File
- ./
flag_actions.module, line 601 - Actions support for the Flag module.
Code
function theme_flag_actions_flag_form($variables) {
$form = $variables['form'];
$event = drupal_render($form['event']);
$threshold = drupal_render($form['threshold']);
$repeat_threshold = drupal_render($form['repeat_threshold']);
$action = $form['#action']->label;
$output = '';
$output .= '<div class="container-inline">';
$output .= t('Perform action when content !event !threshold flags', array(
'!event' => $event,
'!threshold' => $threshold,
));
if ($form['#flag']->global) {
$output .= ' ' . t('(global flags always have a threshold of 1)');
}
$output .= '</div>';
$output .= '<div class="container-inline">';
if (!$form['#flag']->global) {
$output .= t('Repeat this action every !repeat_threshold additional flags after the threshold is reached', array(
'!repeat_threshold' => $repeat_threshold,
));
}
$output .= '</div>';
$element = array(
'#title' => t('Flagging threshold'),
'#required' => TRUE,
);
return $output . drupal_render_children($form);
}