You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

59 lines
2.8 KiB

<div class="ajax formulaire_spip formulaire_configurer formulaire_inserer_modeles">
[(#ENV{formulaire_modele}|non)<h3 class="titrem">
<img src="[(#CHEMIN_IMAGE{modele-add-24.svg}|url_absolue)]" class="cadre-icone" />
<:inserer_modeles:titre_inserer_modeles:>
</h3>]
[(#ENV{formulaire_modele}|oui)<h3 class="titrem">
[(#ENV{icone_barre}|balise_img|liens_absolus)&nbsp;]<:inserer_modeles:titre_inserer{modele=#ENV{_nom}}:>
</h3>]
[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{message_ok})</p>]
[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>]
<form action="#ENV{action}" method="post"><div>
#ACTION_FORMULAIRE{#ENV{action}}
<BOUCLE_deja_choisi(CONDITION){si #ENV{formulaire_modele}}>
[<textarea readonly="readonly" class="code_modele" id="code_modele[(#ENV{modalbox}|?{'_modalbox',''})]"[ (#ENV{_code_modele}|et{#ENV{_js_inserer_code}}|oui)ondblclick="#ENV**{_js_inserer_code}"]>(#ENV{_code_modele})</textarea>]
<script>$(document).ready(function(){ autosize($('#code_modele')); });</script>
[(#REM) Insertion du code dans le texte après validation ]
[(#ENV{_code_modele}|et{#ENV{modalbox}|=={oui}}|oui)
<script>$(document).ready(function(){
[(#ENV{modalbox}|oui)
var code_modele = $("#code_modele_modalbox").text(); [(#REM) On distingue #code_modele (colonne de gauche) de #code_modele_modalbox pour car les deux peuvent exister.]
if (code_modele != '') {
parent.$.markItUp( { replaceWith: code_modele } );
jQuery.modalboxclose();
}
]
[(#ENV{modalbox}|non)
[(#ENV**{_js_inserer_code})]
]
});</script>
]
<input type="hidden" name="formulaire_modele" value="#ENV{formulaire_modele}" />
<div class="editer-groupe">
#GENERER_SAISIES{#ENV{_saisies}}
</div>
<p class="boutons">
<button type="submit" class="submit" name="inserer" value="1"><:inserer_modeles:bouton_inserer:></button>
[(#ENV{ne_pas_afficher_bouton_annuler}|non)<button type="submit" class="submit" value="1" name="annuler" formnovalidate><:bouton_annuler:></button>]
</p>
</BOUCLE_deja_choisi>
<B_choix>
<strong><:inserer_modeles:choisir_modele:></strong>
<div class="editer-groupe">
<div class="editer">
<BOUCLE_choix(POUR){tableau #ENV{_liste_formulaires_modeles}}{par valeur}>
<div class="choix modele">
#SET{id,#CLE|concat{#ENV{modalbox}|?{'_modalbox',''}}}
<input type="radio" class="radio" name="formulaire_modele" id="#GET{id}" value="#CLE" />
<label for="#GET{id}">[(#VALEUR|table_valeur{icone_barre}|balise_img|liens_absolus)&nbsp;][(#VALEUR|table_valeur{nom})]</label>
</div>
</BOUCLE_choix>
</div>
</div>
<p class="boutons">
<button type="submit" class="submit" name="choisir" value="1" ><:inserer_modeles:bouton_choisir:></button>
</p>
</B_choix>
<//B_deja_choisi>
</div></form>
</div>