function editor_note_confirm_edit_page in Editor Notes 7
Builds confirmation page for updating selected note.
1 string reference to 'editor_note_confirm_edit_page'
- editor_note_menu in ./
editor_note.module - Implements hook_menu().
File
- ./
editor_note.pages.inc, line 11 - Page callbacks defined in hook_menu for the Editor Notes module.
Code
function editor_note_confirm_edit_page($ajax = NULL, $note_id = NULL) {
if ($note_id == NULL) {
return t('Error: no note id was sent.');
}
if ($ajax) {
ctools_include('ajax');
ctools_include('modal');
$form_state = array(
'ajax' => TRUE,
'title' => t('Update selected item'),
);
$output = ctools_modal_form_wrapper('editor_note_confirm_edit_form', $form_state);
// If the form has been submitted, there may be additional instructions
// such as dismissing the modal popup.
if (!empty($form_state['ajax_commands'])) {
$output = $form_state['ajax_commands'];
}
// Returns the ajax instructions to the browser via ajax_render().
print ajax_render($output);
drupal_exit();
}
else {
return drupal_get_form('editor_note_confirm_edit_form', $note_id);
}
}