示例#1
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: ajax_main.inc.php,v 1.4 2015-12-10 10:04:11 vtouchard Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . "/encoding_normalize.class.php";
switch ($action) {
    case "save":
        $datas = json_decode(encoding_normalize::utf8_normalize(stripslashes($datas)));
        if (is_object($datas)) {
            if (!$datas->authType) {
                print encoding_normalize::json_encode(array('status' => false));
                return false;
            }
            if ($datas->all_backbones) {
                $flag = true;
                $backbones_values = permute_backbone($datas->backbone_table);
                foreach ($backbones_values[0] as $permutation) {
                    $flag = save_grid($datas->authType, $permutation, $datas->zones);
                }
            } else {
                $flag = save_grid($datas->authType, $datas->authSign, $datas->zones);
            }
            if ($flag) {
                print encoding_normalize::json_encode(array('status' => true));
                return true;
            }
 public function get_json_informations()
 {
     $data = json_encode(encoding_normalize::utf8_normalize($this->get_data()));
     return $data;
 }
示例#3
0
</form>
</div>';
$docwatch_category_form_tpl = '
<form data-dojo-attach-point="containerNode" data-dojo-attach-event="onreset:_onReset,onsubmit:_onSubmit" ${!nameAttrSetting}>	
	<div class="form-contenu">
		<input type="hidden" name="id" id="id" value=""/>
		<div class="row">
			<label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_category_form_category_parent']) . '</label>
		</div>
		<div class="row">
			<select  id="parent" name="parent" data-dojo-type="dijit/form/Select" style="width:auto"></select>
		</div>
		<div class="row">
			<label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_category_form_libelle']) . '</label>
		</div>	
		<div class="row">		
			<input type="text" id="title" name="title" required="true" data-dojo-type="dijit/form/ValidationTextBox"/>
		</div>
		<div class="row"></div>
	</div>
	<div class="row">	
		<div class="left">
			<button data-dojo-type="dijit/form/Button" id="docwatch_form_save" type="submit">' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_form_save']) . '</button>
		</div>
		<div class="right">
			<button data-dojo-type="dijit/form/Button" id="docwatch_form_delete" type="button">' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_form_delete']) . '</button>
		</div>
	</div>	
	<div class="row"></div>		
</form>
';
 public function get_form()
 {
     return "\n\t\t\t<script type='text/javascript' src='./javascript/instru_drag_n_drop.js'></script>\n\t\t\t<script type='text/javascript' src='./javascript/drag_n_drop.js'></script>\n\t\t\t<script type='text/javascript' src='./javascript/ajax.js'></script>\n\t\t\t<script type='text/javascript' >\t\n\t\t\t\tfunction mis_en_forme_instrument(id){\n\t\t\t\t\tvar str=document.getElementById(id).value;\n\t\t\t\t\tvar res = str.split(' - ');\n\t\t\t\t\tif(res[0]) document.getElementById(id).value=res[0];\n\t\t\t\t}\n\t\t\t</script>\n\t\t\t<div id='nomenclature_tutti' data-dojo-type='apps/nomenclature/nomenclature_nomenclature_ui' data-dojo-props='nomenclature_abbr:\"" . $this->nomenclature->get_abbreviation() . "\",nomenclature_tree:\"" . addslashes(json_encode(encoding_normalize::utf8_normalize($this->nomenclature->get_families_tree()))) . "\",nomenclature_indefinite_character:\"" . $this->nomenclature->get_indefinite_character() . "\",workshop_tree:\"" . addslashes(json_encode(encoding_normalize::utf8_normalize($this->nomenclature->get_workshops_tree()))) . "\"'></div>";
 }
 public static function get_form()
 {
     global $pmb_nomenclature_record_children_link;
     $datas = nomenclature_datastore::get_datas();
     $messages = nomenclature_datastore::get_messages();
     $formations_json_datastore = json_encode(encoding_normalize::utf8_normalize($datas["formations_datastore"]), JSON_HEX_APOS | JSON_HEX_QUOT);
     $families_json_datastore = json_encode(encoding_normalize::utf8_normalize($datas["families_datastore"]), JSON_HEX_APOS | JSON_HEX_QUOT);
     $instruments_json_datastore = json_encode(encoding_normalize::utf8_normalize($datas["instruments_datastore"]), JSON_HEX_APOS | JSON_HEX_QUOT);
     $voices_json_datastore = json_encode(encoding_normalize::utf8_normalize($datas["voices_datastore"]), JSON_HEX_APOS | JSON_HEX_QUOT);
     $messages_json_datastore = json_encode(encoding_normalize::utf8_normalize($messages), JSON_HEX_APOS | JSON_HEX_QUOT);
     $div = "\n  \t\t<div id='nomenclature_datastore' data-dojo-type='apps/nomenclature/nomenclature_datastore' data-dojo-props= 'relation_code:\"" . $pmb_nomenclature_record_children_link . "\",formations_datastore:\"" . addslashes($formations_json_datastore) . "\" ,families_datastore:\"" . addslashes($families_json_datastore) . "\" , instruments_datastore:\"" . addslashes($instruments_json_datastore) . "\" , voices_datastore:\"" . addslashes($voices_json_datastore) . "\", messages_datastore:\"" . addslashes($messages_json_datastore) . "\"'/></div>";
     return $div;
 }
示例#6
0
function print_info($expl, $mode_affichage = 0, $affichage_emprunteurs = 1, $affichage_zone_notes = 1)
{
    global $msg;
    global $pmb_sur_location_activate;
    global $pmb_location_resa_planning;
    global $pmb_expl_show_lastempr;
    global $pmb_droits_explr_localises, $explr_visible_mod;
    // $expl est l'objet exemplaire rempli avec ce qu'il faut
    // $mode_affichage :
    //	0 en liste dépliable : le contenu est affiché dans le div
    //	1 : le contenu est affiché APRES l'isbd, sans liste dépliable
    //	2 : le contenu n'est pas affiché du tout
    if (!is_object($expl)) {
        die("serious application error occured in ./circ/visu_ex.inc [print_info()]. Please contact developpment team");
    }
    switch ($mode_affichage) {
        case '0':
            $temp = "\n\t\t\t\t<div id='el!!id!!Parent' class='notice-parent'>\n\t    \t\t\t<img src='./images/plus.gif' class='img_plus' name='imEx' id='el!!id!!Img' title='" . $msg['admin_param_detail'] . "' border='0' onClick=\"expandBase('el!!id!!', true); return false;\" hspace='3'>\n\t    \t\t\t<span class='notice-heada'>!!heada!!</span>\n\t    \t\t\t<br />\n\t\t\t\t</div>\n\t\t\t\t<div id='el!!id!!Child' class='notice-child' style='margin-bottom:6px;display:none;'>\n\t        \t   \t!!contenu!!\n\t \t\t\t</div>\n\t\t\t\t";
            $temp = str_replace('!!id!!', $expl->expl_id, $temp);
            if ($expl->expl_bulletin) {
                if (SESSrights & CATALOGAGE_AUTH) {
                    $heada = "<a href='./catalog.php?categ=serials&sub=bulletinage&action=expl_form&bul_id=" . $expl->expl_bulletin . "&expl_id=" . $expl->expl_id . "'>" . $msg[376] . "&nbsp;" . $expl->expl_cb . "</a> / " . $expl->aff_reduit;
                } else {
                    $heada = "<a href='./circ.php?categ=visu_ex&form_cb_expl=" . rawurlencode($expl->expl_cb) . "'>" . $msg[376] . "&nbsp;" . $expl->expl_cb . "</a> / " . $expl->aff_reduit;
                }
            } else {
                if (SESSrights & CATALOGAGE_AUTH) {
                    $heada = "<a href='./catalog.php?categ=edit_expl&id=" . $expl->expl_notice . "&expl_id=" . $expl->expl_id . "'>" . $msg[376] . "&nbsp;" . $expl->expl_cb . "</a> / " . $expl->aff_reduit;
                } else {
                    $heada = "<a href='./circ.php?categ=visu_ex&form_cb_expl=" . rawurlencode($expl->expl_cb) . "'>" . $msg[376] . "&nbsp;" . $expl->expl_cb . "</a> / " . $expl->aff_reduit;
                }
            }
            $temp = str_replace('!!heada!!', $expl->lien_suppr_cart . $heada, $temp);
            break;
        case '1':
            $selector_prop = "toolbar=no, dependent=yes, resizable=yes, scrollbars=yes";
            $cart_click_expl = "onClick=\"openPopUp('./cart.php?object_type=EXPL&item=" . $expl->expl_id . "', 'cart', 600, 700, -2, -2, '{$selector_prop}')\"";
            $cart_click_expl = "<img src='./images/basket_small_20x20.gif' align='middle' alt='basket' title=\"{$msg[400]}\" {$cart_click_expl}>";
            if ($expl->expl_notice) {
                $cart_click_isbd = "onClick=\"openPopUp('./cart.php?object_type=NOTI&item={$expl->expl_notice}', 'cart', 600, 700, -2, -2, '{$selector_prop}')\"";
            } elseif ($expl->expl_bulletin) {
                $cart_click_isbd = "onClick=\"openPopUp('./cart.php?object_type=BULL&item=" . $expl->expl_bulletin . "', 'cart', 600, 700, -2, -2, '{$selector_prop}')\"";
            }
            $cart_click_isbd = "<img src='./images/basket_small_20x20.gif' align='middle' alt='basket' title=\"{$msg[400]}\" {$cart_click_isbd}>";
            if (SESSrights & CATALOGAGE_AUTH) {
                $link_cb_not = "<a href='./catalog.php?categ=edit_expl&id=" . $expl->expl_notice . "&expl_id=" . $expl->expl_id . "'>";
                $link_cb_bull = "<a href='./catalog.php?categ=serials&sub=bulletinage&action=expl_form&bul_id=" . $expl->expl_bulletin . "&expl_id=" . $expl->expl_id . "'>";
                $link_cb_end = "</a>";
                if ($pmb_droits_explr_localises) {
                    $explr_tab_modif = explode(",", $explr_visible_mod);
                    if (array_search($expl->expl_location, $explr_tab_modif) === false) {
                        $link_cb_not = "";
                        $link_cb_bull = "";
                        $link_cb_end = "";
                    }
                }
                if ($expl->expl_bulletin) {
                    $temp = "<div class='row'><h1>{$cart_click_expl}&nbsp;{$link_cb_bull}{$msg[376]}&nbsp;" . $expl->expl_cb . "{$link_cb_end} : {$cart_click_isbd}&nbsp;" . $expl->aff_reduit . "</h1></div><div class='row'><b>" . $expl->isbd . "</b></div>";
                } else {
                    $temp = "<div class='row'><h1>{$cart_click_expl}&nbsp;{$link_cb_not}{$msg[376]}&nbsp;" . $expl->expl_cb . "{$link_cb_end} : {$cart_click_isbd}&nbsp;" . $expl->aff_reduit . "</h1></div><div class='row'><b>" . $expl->isbd . "</b></div>";
                }
            } else {
                $temp = "<div class='row'><h1>{$cart_click_expl}&nbsp;{$msg[376]}&nbsp;" . $expl->expl_cb . " : {$cart_click_isbd}&nbsp;" . $expl->aff_reduit . "</h1></div><div class='row'><b>" . $expl->isbd . "</b></div>";
            }
            break;
    }
    // isbd complet
    $__isbd .= "<div class=\"row\">";
    $__isbd .= $expl->aff_reduit;
    $__isbd .= "</div>";
    $__modif_cb = '';
    if (SESSrights & CATALOGAGE_AUTH + CATAL_MODIF_CB_EXPL_AUTH) {
        $__modif_cb .= "<hr /><div class='row'><input type='button' id='button_edit_cb' class='bouton' value='{$msg['circ_edit_cb']}'/><br/>";
        $__modif_cb .= "<input type='text' id='input_edit_cb' style='display:none;'/>";
        $__modif_cb .= "<input type='button' class='bouton' value='" . $msg['transferts_popup_btValider'] . "' id='button_send_edit' style='display:none;'/>";
        $__modif_cb .= "</div>";
        $__modif_cb .= "<script>\n\t\t\t\t\t\tvar editButton = document.getElementById('button_edit_cb');\n\t\t\t\t\t\tvar callbackEnter = function(evt){\n\t\t\t\t\t\t\tvar key = evt.which || evt.keyCode;\n\t\t\t\t\t\t\tif (key === 13) { \n\t\t\t\t\t\t\t\tif(evt.target.value.replace(/^\\s+\$/g,'').length == 0) {\n\t\t\t\t\t\t\t\t\talert('{$msg['326']}');\n\t\t\t\t\t\t\t\t\tevt.target.focus();\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tlaunchUpdateRequest();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar launchUpdateRequest = function(){\n\t\t\t\t\t\t\tvar request = new http_request();\n\t\t\t\t\t\t\tvar inputCb = document.getElementById('input_edit_cb');\n\t\t\t\t\t\t\tvar callback = function(response){\n\t\t\t\t\t\t\t\tresponse = JSON.parse(response);\n\t\t\t\t\t\t\t\tif(response.status == 1){\n\t\t\t\t\t\t\t\t\tdocument.location.href = './circ.php?categ=visu_ex&form_cb_expl=' + encode_URL(inputCb.value);\n\t\t\t\t\t\t\t\t}else{ //Print message derreur\n\t\t\t\t\t\t\t\t\talert(response.message);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trequest.request('./ajax.php?module=circ&categ=expl&sub=update_cb&old_cb=" . rawurlencode(encoding_normalize::utf8_normalize($expl->expl_cb)) . "&new_cb='+encodeURIComponent(inputCb.value), false,'', true, callback);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar callbackButton = function(evt){\n\t\t\t\t\t\t\tvar inputCb = document.getElementById('input_edit_cb');\n\t\t\t\t\t\t\tif(inputCb.value.replace(/^\\s+\$/g,'').length == 0) {\n\t\t\t\t\t\t\t\talert('{$msg['326']}');\n\t\t\t\t\t\t\t\tinputCb.focus();\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tlaunchUpdateRequest();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar showCbInput = function(evt){\n\t\t\t\t\t\t\tvar inputCb = document.getElementById('input_edit_cb');\n\t\t\t\t\t\t\tvar buttonValid = document.getElementById('button_send_edit');\n\t\t\t\t\t\t\tif(inputCb.style.display == 'none' && buttonValid.style.display == 'none'){\n\t\t\t\t\t\t\t\tinputCb.style.display = '';\n\t\t\t\t\t\t\t\tinputCb.addEventListener('keypress', callbackEnter, true);\n\t\t\t\t\t\t\t\tinputCb.focus();\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tbuttonValid.style.display = '';\n\t\t\t\t\t\t\t\tbuttonValid.addEventListener('click', callbackButton, true);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tinputCb.removeEventListener('keypress', callbackEnter, false);\n\t\t\t\t\t\t\t\tinputCb.style.display = 'none';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tbuttonValid.removeEventListener('click', callbackButton, false);\n\t\t\t\t\t\t\t\tbuttonValid.style.display = 'none';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\teditButton.addEventListener('click', showCbInput, false);\t\t\t\t\t\n\t\t\t\t\t  </script>";
    }
    // informations de localisation
    $__local .= "<hr /><div class=\"row\">";
    if ($pmb_sur_location_activate) {
        $__local .= $msg["sur_location_expl"] . ":&nbsp;<b>" . $expl->sur_loc_libelle . "</b>&nbsp;&nbsp;";
    }
    $__local .= "{$msg['298']}:&nbsp;<b>" . $expl->location_libelle . "</b>&nbsp;&nbsp;\n\t\t\t{$msg['295']}:&nbsp;<b>" . $expl->section_libelle . "</b>&nbsp;&nbsp;\n\t\t\t{$msg['296']}:&nbsp;<b>" . $expl->expl_cote . "</b><br />";
    $__local .= "{$msg['297']}:&nbsp;" . $expl->statut_libelle;
    // tester si réservé
    $sql = "SELECT resa_cb from resa_ranger where resa_cb='" . addslashes($expl->expl_cb) . "'";
    $execute_query = pmb_mysql_query($sql);
    if (pmb_mysql_num_rows($execute_query)) {
        $situation = $msg['resa_menu_a_ranger'];
    } elseif ($expl->expl_retloc) {
        $situation = $msg['resa_menu_a_traiter'];
    } elseif (verif_cb_utilise($expl->expl_cb)) {
        $situation = $msg['expl_reserve'];
    } elseif ($expl->pret_flag && !$expl->pret_idempr) {
        $situation = "{$msg[359]}";
    } else {
        $situation = "";
    }
    $__local .= "&nbsp;&nbsp;<b>" . $situation . "</b><br />";
    $__local .= $msg[299] . ":&nbsp;<b>" . $expl->codestat_libelle . "</b><br />";
    $__local .= "</div>";
    if ($affichage_emprunteurs) {
        // zone de l'emprunteur
        if ($expl->pret_idempr) {
            $__empr .= "<hr /><div class='row'><b>{$msg['380']}</b><br /> ";
            $link = "<a href='./circ.php?categ=pret&form_cb=" . rawurlencode($expl->empr_cb) . "'>";
            $__empr .= $link . $expl->empr_prenom . " " . $expl->empr_nom . " (" . $expl->empr_cb . ")</a>";
            $__empr .= "&nbsp;{$msg[381]}&nbsp;" . $expl->aff_pret_date;
            $__empr .= ".&nbsp;{$msg[358]}&nbsp;" . $expl->aff_pret_retour . ".";
            $__empr .= "</div>";
        }
        // zone du dernier emrunteur
        if ($pmb_expl_show_lastempr && $expl->expl_lastempr) {
            $__empr .= "<hr /><div class='row'><b>{$msg['expl_lastempr']}</b><br /> ";
            $link = "<a href='./circ.php?categ=pret&form_cb=" . rawurlencode($expl->lastempr_cb) . "'>";
            $__empr .= $link . $expl->lastempr_prenom . ' ' . $expl->lastempr_nom . ' (' . $expl->lastempr_cb . ')</a>';
            $__empr .= "</div>";
        }
    }
    if ($affichage_zone_notes) {
        // zone du message exemplaire
        $__note = "<hr /><div class='row'>";
        $__note .= "<b>{$msg[377]}</b><br />";
        if ($expl->expl_note) {
            $__note .= "<div class='message_important'>" . $expl->expl_note . "</div>";
        }
        if ($expl->expl_comment) {
            $__note .= "<b>{$msg[expl_zone_comment]}</b><br />";
            $__note .= "<div class='expl_comment'>" . $expl->expl_comment . "</div>";
        }
        $__note .= "<br /><input type='button' class='bouton' value='{$msg['378']}' onclick=\"document.location='./circ.php?categ=note_ex&cb=" . rawurlencode($expl->expl_cb) . "&id=" . $expl->expl_id . "'\" />";
        $__note .= "</div><hr />";
    }
    // zone des réservations
    $__resa = check_resa_liste($expl);
    if ($__resa) {
        $__resa = "<div class=\"row\"><b>" . $msg["reserv_en_cours_doc"] . "</b><br />" . $__resa;
        $__resa .= "</div>";
    }
    // zone des réservations prévisionnelles
    if ($pmb_location_resa_planning) {
        $__resa_planning = check_resa_planning_liste($expl);
        if ($__resa_planning) {
            $__resa_planning = "<div class=\"row\"><b>" . $msg["previsions_en_cours_doc"] . "</b><br />" . $__resa_planning;
            $__resa_planning .= "</div>";
        }
    } else {
        $__resa_planning = "";
    }
    switch ($mode_affichage) {
        case '0':
            $temp = str_replace('!!contenu!!', $__isbd . $__modif_cb . $__local . $__empr . $__note . $__resa . $__resa_planning, $temp);
            break;
        case '1':
            $temp = str_replace('!!contenu!!', "", $temp);
            $temp .= $__modif_cb . $__local . $__empr . $__note . $__resa . $__resa_planning;
            break;
        case '2':
            $temp = str_replace('!!contenu!!', "", $temp);
            break;
    }
    return $temp;
}
    /** 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;
    }
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: nomenclature_instrument.tpl.php,v 1.1 2016-01-06 15:05:58 dgoron Exp $
if (stristr($_SERVER['REQUEST_URI'], ".tpl.php")) {
    die("no access");
}
$nomenclature_instrument_dialog_tpl = "\n<div style='width: 400px; height: 500px; overflow: auto;'>\n<form data-dojo-attach-point='containerNode' data-dojo-attach-event='onreset:_onReset,onsubmit:_onSubmit' {${!nameAttrSetting}}>\n\t<div class='form-contenu'>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='code'>" . encoding_normalize::utf8_normalize($msg['admin_nomenclature_instrument_form_code']) . "</label>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<input type='text' class='saisie-50em' name='code' id='code' value='' />\n\t\t</div>\t\t\t\t\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='name'>" . encoding_normalize::utf8_normalize($msg['admin_nomenclature_instrument_form_name']) . "</label>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<input type='text' class='saisie-50em' name='name' id='name' value='' />\n\t\t</div>\t\t\t\t\t\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='musicstand'>" . encoding_normalize::utf8_normalize($msg['admin_nomenclature_instrument_form_musicstand']) . "</label>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t!!musicstand!!\n\t\t</div>\t\t\t\t\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='name'>" . encoding_normalize::utf8_normalize($msg['admin_nomenclature_instrument_form_standard']) . "</label>\n\t\t</div>\n\t\t<div class='row'>\n\t\t\t<input type='checkbox' name='standard' id='standard' value='1' />\n\t\t</div>\t\t\n\t\t<div class='row'> \n\t\t</div>\n\t</div>\n\t<div class='erreur' id='nomenclature_instrument_save_error'></div>\n\t<div class='row'>\n\t\t<div class='left'>\n\t\t\t<button data-dojo-type='dijit/form/Button' id='nomenclature_instrument_form_exit' type='button'>" . encoding_normalize::utf8_normalize($msg['admin_nomenclature_instrument_form_exit']) . "</button>\n\t\t\t<button data-dojo-type='dijit/form/Button' id='nomenclature_instrument_form_save' type='submit'>" . encoding_normalize::utf8_normalize($msg['admin_nomenclature_instrument_form_save']) . "</button>\n\t\t</div>\n\t\t<div class='right'>\t\t\n\t\t</div>\n\t</div>\n\t<div class='row'></div>\n</form>\n</div>";
 public static function get_dialog_form()
 {
     global $nomenclature_instrument_dialog_tpl, $msg;
     $form = $nomenclature_instrument_dialog_tpl;
     $query = "select id_musicstand, concat(musicstand_name,' ( ',family_name,' )')as label from nomenclature_musicstands,nomenclature_families where musicstand_famille_num=id_family order by musicstand_name";
     $musicstand = gen_liste($query, "id_musicstand", "label", "id_musicstand", "", "", 0, encoding_normalize::utf8_normalize($msg["admin_nomenclature_instrument_form_musicstand_no"]), 0, encoding_normalize::utf8_normalize($msg["admin_nomenclature_instrument_form_musicstand_no_sel"]));
     $form = str_replace('!!musicstand!!', $musicstand, $form);
     return $form;
 }