You are here

function skinr_context_ui_admin_groups_validate in Skinr 8.2

Same name and namespace in other branches
  1. 7.2 skinr_context/skinr_context_ui.admin.inc \skinr_context_ui_admin_groups_validate()

Form validation handler for skinr_context_ui_admin_list().

Check if any skin configuration groups have been selected to perform the chosen 'Update option' on.

1 string reference to 'skinr_context_ui_admin_groups_validate'
skinr_context_ui_admin_list_subform in skinr_context/skinr_context_ui.admin.inc
Overrides skinr_ui_admin_skins().

File

skinr_context/skinr_context_ui.admin.inc, line 352
Admin page callbacks for the Skinr Context UI module.

Code

function skinr_context_ui_admin_groups_validate($form, &$form_state) {

  // Error if there are no items to select.
  if (!is_array($form_state['values']['groups']) || !count(array_filter($form_state['values']['groups']))) {
    form_set_error('', t('No items selected.'));
  }
}