You are here

function _sheetnode_ckeditor_settings_validate in Sheetnode 7

Same name and namespace in other branches
  1. 6 modules/sheetnode_ckeditor/sheetnode_ckeditor.module \_sheetnode_ckeditor_settings_validate()
  2. 7.2 modules/sheetnode_ckeditor/sheetnode_ckeditor.module \_sheetnode_ckeditor_settings_validate()

Validate function for _sheetnode_ckeditor_settings form.

1 string reference to '_sheetnode_ckeditor_settings_validate'
_sheetnode_ckeditor_settings in modules/sheetnode_ckeditor/sheetnode_ckeditor.module
Form function for admin/settings/sheetnode/ckeditor.

File

modules/sheetnode_ckeditor/sheetnode_ckeditor.module, line 70
Module file for the sheetnode_ckeditor module. This extends sheetnodes to allow inputting from CKeditor.

Code

function _sheetnode_ckeditor_settings_validate($form, $form_state) {
  $path = rtrim($form_state['values']['sheetnode_ckeditor_library_path'], '/');
  if (!is_dir($path) || !is_file($path . '/ckeditor.js')) {
    form_set_error('sheetnode_ckeditor_library_path', t('The path you entered does not point to a valid location. Please enter the location of the extracted CKEditor package.'));
    return;
  }
}