You are here

function jeditable_handler_field_sid::options_form in jEditable inline content editing 6.2

Same name and namespace in other branches
  1. 6 views/jeditable_handler_field_sid.inc \jeditable_handler_field_sid::options_form()

Define the extra form elements for the field.

File

views/jeditable_handler_field_sid.inc, line 28
Definition of jeditable_handler_field_sid.

Class

jeditable_handler_field_sid
Extends the workflow_views_handler_field_sid class.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['jeditable'] = array(
    '#type' => 'fieldset',
    '#title' => t('Inline editing'),
  );
  $form['jeditable']['enabled'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable inline editing'),
    '#default_value' => $this->options['jeditable']['enabled'],
    '#description' => t('Enable or disable inline editing with jEditable. ') . '<br/><b>' . t('Note: ') . '</b>' . t("If the 'Empty text' field is empty, then the plugin 'placeholder' will be displayed instead using default text. See below for more information on how to change this."),
  );
  $form['jeditable']['reload_page'] = array(
    '#type' => 'checkbox',
    '#title' => t('Reload page'),
    '#default_value' => $this->options['jeditable']['reload_page'],
    '#description' => t('Reload the page if the field has been updated. This is useful for refreshing other values in the View that are affected by the change.'),
  );
  $form['jeditable']['hide_if_empty'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide if empty'),
    '#default_value' => $this->options['jeditable']['hide_if_empty'],
    '#description' => t('Hide the inline editor if the field is empty.'),
  );
  $form['jeditable']['disable_if_not_empty'] = array(
    '#type' => 'checkbox',
    '#title' => t('Disable if not empty'),
    '#default_value' => $this->options['jeditable']['disable_if_not_empty'],
    '#description' => t('Disable inline editing if the field is set.'),
  );
  $form['jeditable']['override_defaults'] = array(
    '#type' => 'checkbox',
    '#title' => t('Override defaults'),
    '#default_value' => $this->options['jeditable']['override_defaults'],
    '#description' => t('It is possible to customize the operation and appearance of the inline editor. See the !readme for instructions.', array(
      '!readme' => l('README.txt', JEDITABLE_DIR . '/README.txt', array(
        'attributes' => array(
          'target' => '_blank',
        ),
      )),
    )) . '<br/><b>' . t('Note: ') . '</b>' . t("The 'Reload page' option will also be overridden."),
  );
}