function _content_menu_filter_elements_by_domain($form, &$form_state) { $domain = $form_state['values']['domainselect']; ctools_include('ajax'); $_SESSION['content_menu_domain_filter'] = $domain; $commands[] = ctools_ajax_command_reload(); print ajax_render($commands); exit; }
function _content_menu_filter_elements_by_language($form, &$form_state) { $lang = $form_state['values']['langselect']; ctools_include('ajax'); $_SESSION['content_menu_lang_filter'] = $lang; if ($lang = '') { unset($_SESSION['content_menu_lang_filter']); } $commands[] = ctools_ajax_command_reload(); print ajax_render($commands); exit; }
public function getFormDialog($js, $q) { $this->useJS = $js; $this->questionId = $q; if (!$this->useJS()) { return drupal_get_form('chgk_db_edit_question_form'); } $modal_style = array('chgkdb_modal' => array('modalOptions' => array('opacity' => 0.5, 'background-color' => '#000'), 'animation' => 'fadeIn', 'modalTheme' => 'CToolsChgkDbModal')); drupal_add_js($modal_style, 'setting'); $form_state = array('title' => 'Редактирование вопроса', 'ajax' => $js, 'question_id' => $this->getQuestionId(), 'question' => &$q); $commands = ctools_modal_form_wrapper('chgk_db_edit_question_form', $form_state); if (!empty($form_state['executed'])) { $commands = array(); $commands[] = ctools_modal_command_display(t("Sending form"), "Сохраняем..."); $commands[] = ctools_ajax_command_reload(); } print ctools_ajax_render($commands); exit; }