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