mirror of
https://github.com/YunoHost-Apps/spip_ynh.git
synced 2024-09-03 20:25:59 +02:00
84 lines
4.8 KiB
HTML
84 lines
4.8 KiB
HTML
|
<div class="ajax formulaire_spip formulaire_editer formulaire_#FORM formulaire_#FORM-#ENV{id,nouveau}">
|
||
|
[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV**{message_ok})</p>]
|
||
|
[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>]
|
||
|
[(#ENV{editable})
|
||
|
<form method='post' action='#ENV{action}'><div>
|
||
|
[(#REM) declarer les hidden qui declencheront le service du formulaire
|
||
|
parametre : url d'action ]
|
||
|
#ACTION_FORMULAIRE{#ENV{action}}
|
||
|
#SET{fl,organiseur}
|
||
|
<ul>
|
||
|
[(#ENV{_destiner}|oui)
|
||
|
#SET{name,destinataires}#SET{obli,'obligatoire'}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
|
||
|
<li class="editer editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
|
||
|
<label for="#GET{name}">[(#GET{fl}|concat{':label_',#GET{name}}|_T)]</label>[
|
||
|
<span class='erreur_message'>(#GET{erreurs})</span>
|
||
|
]
|
||
|
#INCLURE{fond=formulaires/inc-destinataires-message,name=#GET{name},env}
|
||
|
</li>
|
||
|
]
|
||
|
#SET{name,titre}#SET{obli,'obligatoire'}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
|
||
|
<li class="editer editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
|
||
|
<label for="#GET{name}">[(#GET{fl}|concat{':label_',#GET{name}}|_T)]</label>[
|
||
|
<span class='erreur_message'>(#GET{erreurs})</span>
|
||
|
]<input type="text" class="text" name="#GET{name}" value="#ENV*{#GET{name}}" id="#GET{name}" [(#HTML5|et{#GET{obli}})required='required']/>
|
||
|
</li>
|
||
|
<li class="editer editer_rv[ (#ENV**{erreurs}|table_valeur{rv}|oui)erreur]">
|
||
|
<div class="choix">
|
||
|
<input type='checkbox' name='rv' id='rv' value='oui' [(#ENV{rv}|=={oui}|oui)checked='checked']
|
||
|
onclick="if (this.checked==true) { $('li.editer_date_debut_fin').show('fast');} else {$('li.editer_date_debut_fin').hide('fast');}" />
|
||
|
<label for="rv"><:item_afficher_calendrier:></label>[
|
||
|
<span class='erreur_message'>(#ENV**{erreurs}|table_valeur{rv})</span>
|
||
|
]
|
||
|
</div>
|
||
|
</li>
|
||
|
<li class="editer editer_date_debut editer_date_debut_fin[ (#ENV**{erreurs}|table_valeur{date_debut}|oui)erreur][(#ENV{rv}|=={oui}|non)none]">
|
||
|
<label for="date_debut"><:organiseur:info_message_date_debut:></label>[
|
||
|
<span class='erreur_message'>(#ENV**{erreurs}|table_valeur{date_debut})</span>
|
||
|
]<input type='text' class='text date' name='date_debut' id='date_debut' size='10' maxlength='10' value="[(#ENV{date_debut})]" />
|
||
|
<input type='text' class='text heure' name='heure_debut' id='heure_debut' size='4' maxlength='5' value="[(#ENV{heure_debut})]"
|
||
|
/>
|
||
|
</li>
|
||
|
<li class="editer editer_date_fin editer_date_debut_fin[ (#ENV**{erreurs}|table_valeur{date_fin}|oui)erreur][(#ENV{rv}|=={oui}|non)none]">
|
||
|
<label for="date_fin" class='date_fin'><:organiseur:info_message_date_fin:></label>[
|
||
|
<span class='erreur_message'>(#ENV**{erreurs}|table_valeur{date_fin})</span>
|
||
|
]<input type='text' class='text date' name='date_fin' id='date_fin' size='10' maxlength='10' value="[(#ENV{date_fin})]" />
|
||
|
<input type='text' class='text heure' name='heure_fin' id='heure_fin' size='4' maxlength='5' value="[(#ENV{heure_fin})]" />
|
||
|
</li>
|
||
|
#SET{name,texte}#SET{obli,'obligatoire'}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
|
||
|
<li class="editer editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
|
||
|
<label for="#GET{name}">[(#GET{fl}|concat{':label_',#GET{name}}|_T)]</label>[
|
||
|
<span class='erreur_message'>(#GET{erreurs})</span>
|
||
|
]<textarea class="textarea" name="#GET{name}" rows="10">
|
||
|
#ENV*{#GET{name}}</textarea>
|
||
|
</li>
|
||
|
[(#REM) Piege a robots spammeurs ]
|
||
|
#SET{name,antispam}#SET{obli,''}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
|
||
|
<li class="editer none editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
|
||
|
<label for="nobotnobot-#ID"><:antispam_champ_vide:></label>[
|
||
|
<span class='erreur_message'>(#GET{erreurs})</span>
|
||
|
]<input type="text" class="text" name="#GET{name}" value="#ENV*{#GET{name}}" id="nobotnobot-#ID" />
|
||
|
</li>
|
||
|
</ul>
|
||
|
<!--extra-->
|
||
|
<p class='boutons'><span class='image_loading'> </span>
|
||
|
[(#ENV{statut}|=={publie}|non)
|
||
|
<input type='submit' class='submit' name="draft" value='<:organiseur:bouton_enregistrer_brouillon:>' />
|
||
|
]
|
||
|
<input type='submit' class='submit' name="send" value='<:organiseur:bouton_envoyer_message:>' />
|
||
|
</p>
|
||
|
</div></form>
|
||
|
#INCLURE{fond=formulaires/dateur/inc-dateur}
|
||
|
]
|
||
|
</div>
|
||
|
[(#ENV{_destiner}|oui)
|
||
|
<script type="text/javascript">
|
||
|
if (typeof formulaire_editer_message_init=="undefined"){
|
||
|
var formulaire_editer_message_init=''; // eviter double dl si plusieurs forms dans la page
|
||
|
var url_trouver_destinataire = '[(#URL_ACTION_AUTEUR{quete_autocomplete,#SESSION{id_auteur}}|replace{&,&})]';
|
||
|
jQuery.getScript('#CHEMIN{javascript/jquery.autocomplete.js}',function(){
|
||
|
jQuery.getScript('#CHEMIN{formulaires/editer_message.js}');
|
||
|
});
|
||
|
}
|
||
|
</script>
|
||
|
]
|