Namespace: form

Drupal.quickedit.util. form

Methods

staticDrupal.quickedit.util.form.ajaxifySaving(options, $submit){Drupal.Ajax}

Creates a Drupal.Ajax instance that is used to save a form.

Name Type Description
options object

Submit options to the form.

Name Type Description
nocssjs bool

Boolean indicating whether no CSS and JS should be returned (necessary when the form is invisible to the user).

other_view_modes Array.<string>

Array containing view mode IDs (of other instances of this field on the page).

$submit jQuery

The submit element.

Returns:
Type Description
Drupal.Ajax A Drupal.Ajax instance.

staticDrupal.quickedit.util.form.load(options, callback)

Loads a form, calls a callback to insert.

Leverages Drupal.Ajax' ability to have scoped (per-instance) command implementations to be able to call a callback.

Name Type Description
options object

An object with the following keys:

Name Type Description
fieldID string

The field ID that uniquely identifies the field for which this form will be loaded.

nocssjs bool

Boolean indicating whether no CSS and JS should be returned (necessary when the form is invisible to the user).

reset bool

Boolean indicating whether the data stored for this field's entity in PrivateTempStore should be used or reset.

callback function

A callback function that will receive the form to be inserted, as well as the ajax object, necessary if the callback wants to perform other Ajax commands.

staticDrupal.quickedit.util.form.unajaxifySaving(ajax)

Cleans up the Drupal.Ajax instance that is used to save the form.

Name Type Description
ajax Drupal.Ajax

A Drupal.Ajax instance that was returned by Drupal.quickedit.form.ajaxifySaving.