updated core and some modules

This commit is contained in:
2017-02-27 13:42:16 +01:00
parent 8a300d7d79
commit b38c8e71d1
228 changed files with 2503 additions and 750 deletions
+28
View File
@@ -37,6 +37,13 @@ function form_test_menu() {
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
$items['form-test/validate-no-token'] = array(
'title' => 'Form validation without a CSRF token',
'page callback' => 'drupal_get_form',
'page arguments' => array('form_test_validate_no_token'),
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
$items['form-test/limit-validation-errors'] = array(
'title' => 'Form validation with some error suppression',
'page callback' => 'drupal_get_form',
@@ -454,6 +461,27 @@ function form_test_validate_required_form_no_title_submit($form, &$form_state) {
drupal_set_message('The form_test_validate_required_form_no_title form was submitted successfully.');
}
/**
* Form builder for testing submission of a form without a CSRF token.
*/
function form_test_validate_no_token($form, &$form_state) {
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Save',
);
$form['#token'] = FALSE;
return $form;
}
/**
* Form submission handler for form_test_validate_no_token().
*/
function form_test_validate_no_token_submit($form, &$form_state) {
drupal_set_message('The form_test_validate_no_token form has been submitted successfully.');
}
/**
* Builds a simple form with a button triggering partial validation.
*/