mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Topologie et cotisations aussi avec label correct
This commit is contained in:
parent
cf3ed1bb75
commit
997d0c9ff9
5 changed files with 25 additions and 24 deletions
|
@ -34,7 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<form class="form" method="post">
|
<form class="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% bootstrap_form factureform %}
|
{% bootstrap_form factureform %}
|
||||||
{% bootstrap_button "Créer ou modifier" button_type="submit" icon="star" %}
|
{% bootstrap_button action_name button_type="submit" icon="star" %}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -58,7 +58,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<p>
|
<p>
|
||||||
Prix total : <span id="total_price">0,00</span> €
|
Prix total : <span id="total_price">0,00</span> €
|
||||||
</p>
|
</p>
|
||||||
{% bootstrap_button "Créer ou modifier" button_type="submit" icon="star" %}
|
{% bootstrap_button "Créer" button_type="submit" icon="star" %}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
@ -207,7 +207,8 @@ def new_facture_pdf(request):
|
||||||
'tpl_path': os.path.join(settings.BASE_DIR, LOGO_PATH)
|
'tpl_path': os.path.join(settings.BASE_DIR, LOGO_PATH)
|
||||||
})
|
})
|
||||||
return form({
|
return form({
|
||||||
'factureform': facture_form
|
'factureform': facture_form,
|
||||||
|
'action_name' : 'Editer'
|
||||||
}, 'cotisations/facture.html', request)
|
}, 'cotisations/facture.html', request)
|
||||||
|
|
||||||
|
|
||||||
|
@ -313,7 +314,7 @@ def credit_solde(request, user, userid):
|
||||||
reversion.set_comment("Création")
|
reversion.set_comment("Création")
|
||||||
messages.success(request, "Solde modifié")
|
messages.success(request, "Solde modifié")
|
||||||
return redirect(reverse('cotisations:index'))
|
return redirect(reverse('cotisations:index'))
|
||||||
return form({'factureform': facture}, 'cotisations/facture.html', request)
|
return form({'factureform': facture, 'action_name' : 'Créditer'}, 'cotisations/facture.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -334,7 +335,7 @@ def add_article(request):
|
||||||
reversion.set_comment("Création")
|
reversion.set_comment("Création")
|
||||||
messages.success(request, "L'article a été ajouté")
|
messages.success(request, "L'article a été ajouté")
|
||||||
return redirect(reverse('cotisations:index-article'))
|
return redirect(reverse('cotisations:index-article'))
|
||||||
return form({'factureform': article}, 'cotisations/facture.html', request)
|
return form({'factureform': article, 'action_name' : 'Ajouter'}, 'cotisations/facture.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -354,7 +355,7 @@ def edit_article(request, article_instance, articleid):
|
||||||
)
|
)
|
||||||
messages.success(request, "Type d'article modifié")
|
messages.success(request, "Type d'article modifié")
|
||||||
return redirect(reverse('cotisations:index-article'))
|
return redirect(reverse('cotisations:index-article'))
|
||||||
return form({'factureform': article}, 'cotisations/facture.html', request)
|
return form({'factureform': article, 'action_name' : 'Editer'}, 'cotisations/facture.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -369,7 +370,7 @@ def del_article(request, instances):
|
||||||
reversion.set_user(request.user)
|
reversion.set_user(request.user)
|
||||||
messages.success(request, "Le/les articles ont été supprimé")
|
messages.success(request, "Le/les articles ont été supprimé")
|
||||||
return redirect(reverse('cotisations:index-article'))
|
return redirect(reverse('cotisations:index-article'))
|
||||||
return form({'factureform': article}, 'cotisations/facture.html', request)
|
return form({'factureform': article, 'action_name' : 'Supprimer'}, 'cotisations/facture.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -385,7 +386,7 @@ def add_paiement(request):
|
||||||
reversion.set_comment("Création")
|
reversion.set_comment("Création")
|
||||||
messages.success(request, "Le moyen de paiement a été ajouté")
|
messages.success(request, "Le moyen de paiement a été ajouté")
|
||||||
return redirect(reverse('cotisations:index-paiement'))
|
return redirect(reverse('cotisations:index-paiement'))
|
||||||
return form({'factureform': paiement}, 'cotisations/facture.html', request)
|
return form({'factureform': paiement, 'action_name' : 'Ajouter'}, 'cotisations/facture.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -404,7 +405,7 @@ def edit_paiement(request, paiement_instance, paiementid):
|
||||||
)
|
)
|
||||||
messages.success(request, "Type de paiement modifié")
|
messages.success(request, "Type de paiement modifié")
|
||||||
return redirect(reverse('cotisations:index-paiement'))
|
return redirect(reverse('cotisations:index-paiement'))
|
||||||
return form({'factureform': paiement}, 'cotisations/facture.html', request)
|
return form({'factureform': paiement, 'action_name' : 'Editer'}, 'cotisations/facture.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -431,7 +432,7 @@ def del_paiement(request, instances):
|
||||||
facture, vous ne pouvez pas le supprimer" % paiement_del
|
facture, vous ne pouvez pas le supprimer" % paiement_del
|
||||||
)
|
)
|
||||||
return redirect(reverse('cotisations:index-paiement'))
|
return redirect(reverse('cotisations:index-paiement'))
|
||||||
return form({'factureform': paiement}, 'cotisations/facture.html', request)
|
return form({'factureform': paiement, 'action_name' : 'Supprimer'}, 'cotisations/facture.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -446,7 +447,7 @@ def add_banque(request):
|
||||||
reversion.set_comment("Création")
|
reversion.set_comment("Création")
|
||||||
messages.success(request, "La banque a été ajoutée")
|
messages.success(request, "La banque a été ajoutée")
|
||||||
return redirect(reverse('cotisations:index-banque'))
|
return redirect(reverse('cotisations:index-banque'))
|
||||||
return form({'factureform': banque}, 'cotisations/facture.html', request)
|
return form({'factureform': banque, 'action_name' : 'Ajouter'}, 'cotisations/facture.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -465,7 +466,7 @@ def edit_banque(request, banque_instance, banqueid):
|
||||||
)
|
)
|
||||||
messages.success(request, "Banque modifiée")
|
messages.success(request, "Banque modifiée")
|
||||||
return redirect(reverse('cotisations:index-banque'))
|
return redirect(reverse('cotisations:index-banque'))
|
||||||
return form({'factureform': banque}, 'cotisations/facture.html', request)
|
return form({'factureform': banque, 'action_name' : 'Editer'}, 'cotisations/facture.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -486,7 +487,7 @@ def del_banque(request, instances):
|
||||||
messages.error(request, "La banque %s est affectée à au moins\
|
messages.error(request, "La banque %s est affectée à au moins\
|
||||||
une facture, vous ne pouvez pas la supprimer" % banque_del)
|
une facture, vous ne pouvez pas la supprimer" % banque_del)
|
||||||
return redirect(reverse('cotisations:index-banque'))
|
return redirect(reverse('cotisations:index-banque'))
|
||||||
return form({'factureform': banque}, 'cotisations/facture.html', request)
|
return form({'factureform': banque, 'action_name' : 'Supprimer'}, 'cotisations/facture.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
|
|
@ -37,7 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
<form class="form" method="post">
|
<form class="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% massive_bootstrap_form topoform 'room,related,machine_interface' %}
|
{% massive_bootstrap_form topoform 'room,related,machine_interface' %}
|
||||||
{% bootstrap_button "Créer ou modifier" button_type="submit" icon="ok" %}
|
{% bootstrap_button action_name button_type="submit" icon="ok" %}
|
||||||
</form>
|
</form>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -235,7 +235,7 @@ def new_port(request, switch_id):
|
||||||
'topologie:index-port',
|
'topologie:index-port',
|
||||||
kwargs={'switch_id':switch_id}
|
kwargs={'switch_id':switch_id}
|
||||||
))
|
))
|
||||||
return form({'id_switch': switch_id,'topoform': port}, 'topologie/topo.html', request)
|
return form({'id_switch': switch_id,'topoform': port, 'action_name' : 'Ajouter'}, 'topologie/topo.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -257,7 +257,7 @@ def edit_port(request, port_object, port_id):
|
||||||
'topologie:index-port',
|
'topologie:index-port',
|
||||||
kwargs={'switch_id': str(port_object.switch.id)}
|
kwargs={'switch_id': str(port_object.switch.id)}
|
||||||
))
|
))
|
||||||
return form({'id_switch': str(port_object.switch.id), 'topoform': port}, 'topologie/topo.html', request)
|
return form({'id_switch': str(port_object.switch.id), 'topoform': port, 'action_name' : 'Editer'}, 'topologie/topo.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -292,7 +292,7 @@ def new_stack(request):
|
||||||
reversion.set_user(request.user)
|
reversion.set_user(request.user)
|
||||||
reversion.set_comment("Création")
|
reversion.set_comment("Création")
|
||||||
messages.success(request, "Stack crée")
|
messages.success(request, "Stack crée")
|
||||||
return form({'topoform': stack}, 'topologie/topo.html', request)
|
return form({'topoform': stack, 'action_name' : 'Créer'}, 'topologie/topo.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -311,7 +311,7 @@ def edit_stack(request, stack, stack_id):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return redirect(reverse('topologie:index-stack'))
|
return redirect(reverse('topologie:index-stack'))
|
||||||
return form({'topoform': stack}, 'topologie/topo.html', request)
|
return form({'topoform': stack, 'action_name' : 'Editer'}, 'topologie/topo.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -522,7 +522,7 @@ def new_room(request):
|
||||||
reversion.set_comment("Création")
|
reversion.set_comment("Création")
|
||||||
messages.success(request, "La chambre a été créé")
|
messages.success(request, "La chambre a été créé")
|
||||||
return redirect(reverse('topologie:index-room'))
|
return redirect(reverse('topologie:index-room'))
|
||||||
return form({'topoform': room}, 'topologie/topo.html', request)
|
return form({'topoform': room, 'action_name' : 'Ajouter'}, 'topologie/topo.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -540,7 +540,7 @@ def edit_room(request, room, room_id):
|
||||||
)
|
)
|
||||||
messages.success(request, "La chambre a bien été modifiée")
|
messages.success(request, "La chambre a bien été modifiée")
|
||||||
return redirect(reverse('topologie:index-room'))
|
return redirect(reverse('topologie:index-room'))
|
||||||
return form({'topoform': room}, 'topologie/topo.html', request)
|
return form({'topoform': room, 'action_name' : 'Editer'}, 'topologie/topo.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -576,7 +576,7 @@ def new_model_switch(request):
|
||||||
reversion.set_comment("Création")
|
reversion.set_comment("Création")
|
||||||
messages.success(request, "Le modèle a été créé")
|
messages.success(request, "Le modèle a été créé")
|
||||||
return redirect(reverse('topologie:index-model-switch'))
|
return redirect(reverse('topologie:index-model-switch'))
|
||||||
return form({'topoform': model_switch}, 'topologie/topo.html', request)
|
return form({'topoform': model_switch, 'action_name' : 'Ajouter'}, 'topologie/topo.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -594,7 +594,7 @@ def edit_model_switch(request, model_switch, model_switch_id):
|
||||||
)
|
)
|
||||||
messages.success(request, "Le modèle a bien été modifié")
|
messages.success(request, "Le modèle a bien été modifié")
|
||||||
return redirect(reverse('topologie:index-model-switch'))
|
return redirect(reverse('topologie:index-model-switch'))
|
||||||
return form({'topoform': model_switch}, 'topologie/topo.html', request)
|
return form({'topoform': model_switch, 'action_name' : 'Editer'}, 'topologie/topo.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -630,7 +630,7 @@ def new_constructor_switch(request):
|
||||||
reversion.set_comment("Création")
|
reversion.set_comment("Création")
|
||||||
messages.success(request, "Le constructeur a été créé")
|
messages.success(request, "Le constructeur a été créé")
|
||||||
return redirect(reverse('topologie:index-model-switch'))
|
return redirect(reverse('topologie:index-model-switch'))
|
||||||
return form({'topoform': constructor_switch}, 'topologie/topo.html', request)
|
return form({'topoform': constructor_switch, 'action_name' : 'Ajouter'}, 'topologie/topo.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -648,7 +648,7 @@ def edit_constructor_switch(request, constructor_switch, constructor_switch_id):
|
||||||
)
|
)
|
||||||
messages.success(request, "Le modèle a bien été modifié")
|
messages.success(request, "Le modèle a bien été modifié")
|
||||||
return redirect(reverse('topologie:index-model-switch'))
|
return redirect(reverse('topologie:index-model-switch'))
|
||||||
return form({'topoform': constructor_switch}, 'topologie/topo.html', request)
|
return form({'topoform': constructor_switch, 'action_name' : 'Editer'}, 'topologie/topo.html', request)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
|
|
Loading…
Reference in a new issue