function heartbeat_messages_admin_overview_validate in Heartbeat 7
Same name and namespace in other branches
- 6.4 heartbeat.admin.inc \heartbeat_messages_admin_overview_validate()
Validate heartbeat_messages_admin_overview form submissions.
We can't execute any 'Update options' if no messages were selected.
File
- modules/
heartbeat_ui/ heartbeat_ui.admin.inc, line 59
Code
function heartbeat_messages_admin_overview_validate($form, &$form_state) {
$form_state['values']['heartbeat-activity'] = array_diff($form_state['values']['heartbeat-activity'], array(
0,
));
if (count($form_state['values']['heartbeat-activity']) == 0) {
form_set_error('', t('Please select one or more messages to perform the update on.'));
drupal_goto('admin/content/heartbeat');
}
}