You are here

function _validate_cfs_newadmin in Node and Comments Form Settings 7.2

Same name and namespace in other branches
  1. 6.3 commentformsettings/includes/validate_cfs_newadmin.inc \_validate_cfs_newadmin()
  2. 6.2 commentformsettings/includes/validate_cfs_newadmin.inc \_validate_cfs_newadmin()
  3. 7.3 commentformsettings/includes/validate_cfs_newadmin.inc \_validate_cfs_newadmin()

@file Validate if the Cancel link is not enabled when the comment form is below the post or comments.

File

commentformsettings/includes/validate_cfs_newadmin.inc, line 7
Validate if the Cancel link is not enabled when the comment form is below the post or comments.

Code

function _validate_cfs_newadmin($form, &$form_state) {
  if ($form_state['values']['cfs_newadmin'] == 0 && $form_state['values']['comment'] != 2) {
    form_set_error('cfs_newadmin', t('If you want to enable the functionality to override the author of a comment you need to enable comments for this content type. Please fix one or the other.'));
  }
}