/** Fonctions: */ public static function get_watch_form() { global $docwatch_watch_form_tpl, $msg; $marc_select = new marc_select("doctype", 'record_types'); $cms_editorial_article = new cms_editorial_types('article'); $cms_editorial_section = new cms_editorial_types('section'); $cms_section = new cms_section(); $cms_article = new cms_article(); $cms_publication_state = new cms_editorial_publications_states(); $status = $cms_publication_state->get_selector_options(); $record_part = gen_plus("record_options", encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_options_record']), '<div class="row"> <label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_record_default_type']) . '</label> </div> <div class="row">' . str_replace('<select', '<select data-dojo-type="dijit/form/Select" style="width:auto"', $marc_select->display) . '</div> <div class="row"> <label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_record_default_status']) . '</label> </div> <div class="row"> <select id="record_status" data-dojo-type="dijit/form/Select" style="width:auto" name="record_status">' . self::get_record_status() . '</select> </div>'); $article_part = gen_plus("article_options", encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_options_article']), '<div class="row"> <label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_article_default_content_type']) . '</label> </div> <div class="row"> <select id="article_type" data-dojo-type="dijit/form/Select" style="width:auto" name="article_type">' . $cms_editorial_article->get_selector_options() . '</select> </div> <div class="row"> <label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_article_default_publication_status']) . '</label> </div> <div class="row"> <select id="article_status" data-dojo-type="dijit/form/Select" style="width:auto" name="article_status">' . $status . '</select> </div> <div class="row"> <label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_article_default_parent']) . '</label> </div> <div class="row"> <select id="article_parent" data-dojo-type="dijit/form/Select" style="width:auto" name="article_parent">' . $cms_article->get_parent_selector() . '</select> </div>'); $section_part = gen_plus("section_options", encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_options_section']), '<div class="row"> <label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_section_default_content_type']) . '</label> </div> <div class="row"> <select id="section_type" data-dojo-type="dijit/form/Select" style="width:auto" name="section_type">' . $cms_editorial_section->get_selector_options() . '</select> </div> <div class="row"> <label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_section_default_publication_status']) . '</label> </div> <div class="row"> <select id="section_status" data-dojo-type="dijit/form/Select" style="width:auto" name="section_status">' . $status . '</select> </div> <div class="row"> <label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_section_default_parent']) . '</label> </div> <div class="row"> <select id="section_parent" data-dojo-type="dijit/form/Select" style="width:auto" name="section_parent">' . $cms_section->get_parent_selector() . '</select> </div>'); $form = $docwatch_watch_form_tpl; $form = str_replace('!!users_checkboxes!!', self::generate_users(), $form); $form = str_replace('!!options_record!!', $record_part, $form); $form = str_replace('!!options_article!!', $article_part, $form); $form = str_replace('!!options_section!!', $section_part, $form); return $form; }