forked from DGNum/gestioCOF
Idem for supplier_form
This commit is contained in:
parent
91d5fe234c
commit
c1b8849cb8
2 changed files with 21 additions and 13 deletions
|
@ -427,11 +427,11 @@ class Supplier(models.Model):
|
|||
Article,
|
||||
through = 'SupplierArticle',
|
||||
related_name = "suppliers")
|
||||
name = models.CharField(max_length = 45)
|
||||
address = models.TextField()
|
||||
email = models.EmailField()
|
||||
phone = models.CharField(max_length = 10)
|
||||
comment = models.TextField()
|
||||
name = models.CharField("nom", max_length = 45)
|
||||
address = models.TextField("adresse")
|
||||
email = models.EmailField("adresse mail")
|
||||
phone = models.CharField("téléphone", max_length = 10)
|
||||
comment = models.TextField("commentaire")
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{% extends 'kfet/base.html' %}
|
||||
{% load widget_tweaks %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block title %}Fournisseur - Modification{% endblock %}
|
||||
{% block content-header-title %}Fournisseur - Modification{% endblock %}
|
||||
|
@ -7,13 +9,19 @@
|
|||
|
||||
{% include 'kfet/base_messages.html' %}
|
||||
|
||||
<form action="" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.as_p }}
|
||||
{% if not perms.kfet.change_supplier %}
|
||||
<input type="password" name="KFETPASSWORD">
|
||||
{% endif %}
|
||||
<input type="submit" class="btn btn-primary btn-lg">
|
||||
</form>
|
||||
<div class="row form-only">
|
||||
<div class="col-sm-12 col-md-8 col-md-offset-2">
|
||||
<div class="content-form">
|
||||
<form submit="" method="post" class="form-horizontal">
|
||||
{% csrf_token %}
|
||||
{% include 'kfet/form_snippet.html' with form=form %}
|
||||
{% if not perms.kfet.change_supplier %}
|
||||
{% include 'kfet/form_authentication_snippet.html' %}
|
||||
{% endif %}
|
||||
{% include 'kfet/form_submit_snippet.html' with value="Mettre à jour" %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue