Simplification messages
This commit is contained in:
parent
5757c4161d
commit
e856347d40
@ -21,8 +21,7 @@
|
||||
type="category"
|
||||
name=$cat_name
|
||||
}}
|
||||
{{:assign msg="Catégorie « %s » enregistrée"|args:$cat_name}}
|
||||
{{:redirect force="./index.html?ok=1&msg=%s"|args:$msg}}
|
||||
{{:redirect force="./index.html?ok=1&msg=ajout"}}
|
||||
{{/form}}
|
||||
|
||||
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
|
||||
|
@ -12,8 +12,7 @@
|
||||
{{else}}
|
||||
{{* supprimer la catégorie sélectionnée*}}
|
||||
{{:delete where="key = :key" :key=$category.key}}
|
||||
{{:assign msg="Catégorie « %s » supprimée"|args:$category.name}}
|
||||
{{:redirect force="./index.html?ok=1&msg=%s"|args:$msg}}
|
||||
{{:redirect force="./index.html?ok=1&msg=suppression"|args:$msg}}
|
||||
{{/load}}
|
||||
{{/form}}
|
||||
|
||||
|
@ -10,13 +10,11 @@
|
||||
<p class="block confirm">Modification enregistrée</p>
|
||||
{{elseif $_GET.msg == "suppression"}}
|
||||
<p class="block confirm">Catégorie supprimée</p>
|
||||
{{else}}
|
||||
<p class="block confirm">{{$_GET.msg}}</p>
|
||||
{{elseif $_GET.msg == "ajout"}}
|
||||
<p class="block confirm">Catégorie ajoutée</p>
|
||||
{{/if}}
|
||||
{{elseif $_GET.err}}
|
||||
{{if $_GET.msg == "modification"}}
|
||||
<p class="block error">{{$_GET.msg}}</p>
|
||||
{{elseif $_GET.msg == "suppression"}}
|
||||
{{if $_GET.msg == "suppression"}}
|
||||
<p class="block error">
|
||||
Cette catégorie ne peut être supprimée car elle contient encore des matériels
|
||||
</p>
|
||||
|
@ -44,14 +44,10 @@
|
||||
<p class="block confirm">Mouvement copié</p>
|
||||
{{elseif $_GET.msg == "suppression"}}
|
||||
<p class="block confirm">Mouvement supprimé</p>
|
||||
{{else}}
|
||||
<p class="block confirm">{{$_GET.msg}}</p>
|
||||
{{/if}}
|
||||
{{elseif $_GET.err}}
|
||||
{{if $_GET.msg == "suppression"}}
|
||||
<p class="block error">Ce mouvement ne peut être supprimé</p>
|
||||
{{else}}
|
||||
<p class="block error">{{$_GET.msg}}</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
|
@ -17,8 +17,10 @@
|
||||
<p class="block confirm">Ajout effectué</p>
|
||||
{{elseif $_GET.msg == "modification" }}
|
||||
<p class="block confirm">Modification effectuée</p>
|
||||
{{else}}
|
||||
<p class="block confirm">{{$_GET.msg}}</p>
|
||||
{{elseif $_GET.msg == "suppression" }}
|
||||
<p class="block confirm">Suppression effectuée</p>
|
||||
{{elseif $_GET.msg == "supprmvtmat" }}
|
||||
<p class="block confirm">Mouvement supprimé - Matériel supprimé</p>
|
||||
{{/if}}
|
||||
{{elseif $_GET.err}}
|
||||
<p class="block error">Modification refusée</p>
|
||||
|
@ -86,7 +86,7 @@
|
||||
{{else}}
|
||||
{{:assign prop=1}}
|
||||
{{/if}}
|
||||
{{:redirect force="../index.html?prop=%s&ok=1&msg=%s"|args:$prop:$msg}}
|
||||
{{:redirect force="../index.html?prop=%s&ok=1&msg=ajout"|args:$prop:$msg}}
|
||||
|
||||
{{/form}}
|
||||
|
||||
|
@ -47,7 +47,6 @@
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
{{*
|
||||
-------------------- Traiter la saisie --------------------
|
||||
*}}
|
||||
@ -63,7 +62,7 @@
|
||||
|
||||
{{* préparer le mouvement copié *}}
|
||||
{{if $mvt_new.direction == "input"}}
|
||||
{{:assign var="mvt_new.input_nature" value=$_POST.operation}}
|
||||
{{:assign var="mvt_new.operation" value=$_POST.operation}}
|
||||
{{:assign var="type_mvt" from="config.input_nature.%s.type"|args:$mvt_new.operation}}
|
||||
{{if $type_mvt == "temporaire"}}
|
||||
{{:assign prop=0}}
|
||||
@ -71,7 +70,7 @@
|
||||
{{:assign prop=1}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{:assign var="mvt_new.output_nature" value=$_POST.operation}}
|
||||
{{:assign var="mvt_new.operation" value=$_POST.operation}}
|
||||
{{:assign var="type_mvt" from="config.output_nature.%s.type"|args:$mvt_new.operation}}
|
||||
{{if $type_mvt == "retour"}}
|
||||
{{:assign prop=0}}
|
||||
@ -119,15 +118,10 @@
|
||||
keep="erreur"
|
||||
movements=$movements_new
|
||||
}}
|
||||
|
||||
{{if $erreur}}
|
||||
{{:assign var="mvt_label" from="%s_labels.%s"|args:$mvt_new.direction:$mvt_new.operation}}
|
||||
<p class="block error">
|
||||
Impossible d'enregistrer ce mouvement :
|
||||
{{if $mvt_new.direction == "input"}}
|
||||
« {{$mvt_new.input_nature}}
|
||||
{{else}}
|
||||
« {{$mvt_new.output_nature}}
|
||||
{{/if}}
|
||||
Impossible d'enregistrer ce mouvement : « {{$mvt_label}}
|
||||
de {{$eqpmt.name}} (qté : {{$mvt_new.amount}}) à la date du {{$mvt_new.date|date_short}} »
|
||||
</p>
|
||||
{{else}}
|
||||
|
@ -105,8 +105,6 @@
|
||||
|
||||
{{* vérification réussie : supprimer le mouvement *}}
|
||||
{{:delete key=$_GET.key}}
|
||||
{{:assign libelle=$libelle|ucfirst}}
|
||||
{{:assign var="msg" value="%s « %s (%d) en date du %s » supprimée"|args:$libelle:$equipment.name:$mvt_suppr.amount:$date_suppr}}
|
||||
|
||||
{{* voir s'il reste des mouvements pour le matériel concerné par le mouvement supprimé *}}
|
||||
{{#load type="movement" where="$$.equipment = :eqpmt_key" :eqpmt_key=$equipment.key}}
|
||||
@ -114,10 +112,10 @@
|
||||
{{* supprimer le matériel *}}
|
||||
{{:delete key=$equipment.key}}
|
||||
{{:assign var="msg" value="%s - Matériel « %s » supprimé"|args:$msg:$equipment.name}}
|
||||
{{:redirect force="../index.html?ok=1&msg=%s"|args:$msg}}
|
||||
{{:redirect force="../index.html?ok=1&msg=supprmvtmat"|args:$msg}}
|
||||
{{/load}}
|
||||
|
||||
{{:redirect force="../historique.html?ok=1&key=%s&prop=%s&msg=%s"|args:$mvt_suppr.equipment:$_GET.prop:$msg}}
|
||||
{{:redirect force="../historique.html?ok=1&key=%s&prop=%s&msg=suppression"|args:$mvt_suppr.equipment:$_GET.prop}}
|
||||
{{/form}}
|
||||
|
||||
{{:admin_header title="Supprimer un mouvement" current="module_equipment"}}
|
||||
|
Loading…
Reference in New Issue
Block a user