mirror of
https://github.com/YunoHost-Apps/spip_ynh.git
synced 2024-09-03 20:25:59 +02:00
63 lines
2.8 KiB
HTML
63 lines
2.8 KiB
HTML
|
<div class="instituer_objet">
|
||
|
[(#ENV{_publiable}|non|et{#ENV{statut}|=={prepa}|oui})
|
||
|
<p class="small"><:texte_proposer_publication:></p>
|
||
|
]
|
||
|
<div class="formulaire_spip formulaire_editer formulaire_instituer[ formulaire_#FORM formulaire_#FORM-(#ENV{_objet})][ formulaire_#FORM-#ENV{_objet}-(#ENV{_id_objet})]">
|
||
|
[<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{name,statut}#SET{obli,'obligatoire'}#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}
|
||
|
<ul>
|
||
|
<li class="editer editer_[(#GET{name})] statut_#ENV{#GET{name}}[ (#GET{obli})][ (#GET{erreurs}|oui)erreur]">
|
||
|
<label for="formulaire_#FORM-#ENV{_objet}-#ENV{_id_objet}-#GET{name}">[(#ENV{_label}|_T)][(#ENV{_aide}|oui)#AIDER{#ENV{_aide}}]</label>[
|
||
|
<span class='erreur_message'>(#GET{erreurs})</span>
|
||
|
]<span class="show">
|
||
|
[(#ENV{editable})
|
||
|
<select class="select statut" name="#GET{name}" id="formulaire_#FORM-#ENV{_objet}-#ENV{_id_objet}-#GET{name}">
|
||
|
[(#ENV{_statuts}|table_valeur{#ENV{#GET{name}}}|non)
|
||
|
<option value="#ENV{#GET{name}}"> #ENV{#GET{name}}</option>
|
||
|
]
|
||
|
]
|
||
|
<BOUCLE_choix(POUR){tableau #ENV{_statuts}}{si #ENV{editable}}>
|
||
|
<option value="#CLE"[(#ENV{#GET{name}}|=={#CLE}|oui)selected="selected"]
|
||
|
style="background-image:url([(#CLE|puce_statut{#ENV{_objet}}|extraire_attribut{src})]);"> [(#VALEUR|_T)]</option>
|
||
|
</BOUCLE_choix>
|
||
|
[(#ENV{editable})
|
||
|
</select>
|
||
|
]
|
||
|
[(#ENV{editable}|non)
|
||
|
<span class="statut">[(#ENV{#GET{name}}|puce_statut{#ENV{_objet}})] [(#ENV{_statuts}|table_valeur{#ENV{#GET{name}}}|_T)]</span>
|
||
|
]
|
||
|
</span>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<!--extra-->
|
||
|
[(#ENV{editable})
|
||
|
<p class='boutons'><span class='image_loading'> </span>
|
||
|
<input type='submit' class='submit' value='<:bouton_changer:>' /></p>
|
||
|
</div></form>
|
||
|
]
|
||
|
</div>
|
||
|
</div>
|
||
|
<script type="text/javascript">
|
||
|
function update_select(statut_default){
|
||
|
var selected = this.options[this.selectedIndex];
|
||
|
var boutons = jQuery(this).attr('style',jQuery(selected).attr('style')).closest('form').find('.boutons');
|
||
|
if (selected.value!=statut_default)
|
||
|
boutons.css('visibility','visible').show('fast');
|
||
|
else
|
||
|
boutons.css('visibility','hidden')
|
||
|
}
|
||
|
jQuery(function(){
|
||
|
jQuery(".formulaire_#FORM .show select")
|
||
|
.each(function(){update_select.apply(this,['#ENV{#GET{name}}']);})
|
||
|
.bind('change',function(){update_select.apply(this,['#ENV{#GET{name}}']);})
|
||
|
.bind('keyup',function(){update_select.apply(this,['#ENV{#GET{name}}']);});
|
||
|
});
|
||
|
</script>
|