You are here

function readonlymode_check_form_validate in Read only mode 6

Same name and namespace in other branches
  1. 8 readonlymode.module \readonlymode_check_form_validate()
  2. 7 readonlymode.module \readonlymode_check_form_validate()

Our validate handler for checking whether the form submission is occurring while read-only mode is enabled.

1 string reference to 'readonlymode_check_form_validate'
readonlymode_form_alter in ./readonlymode.module
Implementation of hook_form_alter(). Permit posting of content

File

./readonlymode.module, line 250
Read Only Mode provides an alternate to the built in 'Maintenance Mode' in Drupal. Instead of displaying a static text file to users while the site is in maintenance mode, Read Only Mode will allow access (reading) of new content while…

Code

function readonlymode_check_form_validate($form, &$form_state) {

  // Check for read-only mode, whether we are allowed this form,
  if (!_readonlymode_form_check($form, $form['form_id']['#value'], TRUE)) {
    form_set_error('', _readonlymode_notice_form_not_saved());
  }
}