update core to 7.36
This commit is contained in:
@@ -157,7 +157,7 @@ function ajax_forms_test_ajax_commands_form($form, &$form_state) {
|
||||
|
||||
// Shows the Ajax 'css' command.
|
||||
$form['css_command_example'] = array(
|
||||
'#value' => t("Set the the '#box' div to be blue."),
|
||||
'#value' => t("Set the '#box' div to be blue."),
|
||||
'#type' => 'submit',
|
||||
'#ajax' => array(
|
||||
'callback' => 'ajax_forms_test_advanced_commands_css_callback',
|
||||
@@ -254,6 +254,15 @@ function ajax_forms_test_ajax_commands_form($form, &$form_state) {
|
||||
),
|
||||
);
|
||||
|
||||
// Shows the Ajax 'add_css' command.
|
||||
$form['add_css_command_example'] = array(
|
||||
'#type' => 'submit',
|
||||
'#value' => t("AJAX 'add_css' command"),
|
||||
'#ajax' => array(
|
||||
'callback' => 'ajax_forms_test_advanced_commands_add_css_callback',
|
||||
),
|
||||
);
|
||||
|
||||
$form['submit'] = array(
|
||||
'#type' => 'submit',
|
||||
'#value' => t('Submit'),
|
||||
@@ -406,6 +415,15 @@ function ajax_forms_test_advanced_commands_settings_callback($form, $form_state)
|
||||
return array('#type' => 'ajax', '#commands' => $commands);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax callback for 'add_css'.
|
||||
*/
|
||||
function ajax_forms_test_advanced_commands_add_css_callback($form, $form_state) {
|
||||
$commands = array();
|
||||
$commands[] = ajax_command_add_css('my/file.css');
|
||||
return array('#type' => 'ajax', '#commands' => $commands);
|
||||
}
|
||||
|
||||
/**
|
||||
* This form and its related submit and callback functions demonstrate
|
||||
* not validating another form element when a single Ajax element is triggered.
|
||||
|
||||
Reference in New Issue
Block a user