Commit 0dbbb266 authored by Georges Gressot's avatar Georges Gressot 💬
Browse files

continue

parent be8146c9
......@@ -35,15 +35,15 @@
</div>
<div id="content">
<h2>{% trans "Administration du projet" %} : {{ name }}</h2>
<h2>{% trans "Administration du projet" %} : {{ project }}</h2>
<p><center><font color= #FF0000 >{% trans "Attention : Pensez à créer les utilisateurs dans la base principale" %}.</font></center></p>
<p><form method="post">{% csrf_token %}{% trans "Motifs actuels" %} ({{ exclnbr }}) : {% for ex in EXCLUSION_CHOICES %} {{ ex.0 }} - {% endfor %}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {% trans "Le cas échéant, motif à ajouter" %} : {{ form.exclusup }}</p>
<p>{% trans "Nom actuel du projet" %} : {{ project }}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {% trans "Le cas échéant, nouveau nom" %} : {{ form.name }}</p>
{% trans "Modification des propriétés d'une bibliothèque" %} : {{ librform.name }}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {% trans "Le cas échéant, nouveau nom" %} : {{ form.projname }}</p>
{% trans "Modification des propriétés d'une bibliothèque" %} : {{ libriform.name }} {{ librmform }}
<p><input type="submit" value="{% trans "Valider" %}"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <button><b><a href="/{{ bdd }}/current_status/{{ sid }}/{{ bib.lid }}">{% trans "Annuler" %}</a></b></button></p>
</form>
......
......@@ -165,7 +165,7 @@ def adminbase(request, bdd):
project = Project.objects.using(bdd).all().order_by('pk')[0].name
class ProjectForm(forms.Form):
exclusup = forms.CharField(required =False, widget=forms.TextInput(attrs={'size': '30'}), max_length=30, label =_("exclusion suppl"))
name = forms.CharField(required =False, widget=forms.TextInput(attrs={'size': '30'}), max_length=30, label =_("project code name"))
projname = forms.CharField(required =False, widget=forms.TextInput(attrs={'size': '30'}), max_length=30, label =_("project code name"))
descr =forms.CharField(required =False, widget=forms.Textarea(), max_length=300, label =_("project description"))
date =forms.CharField(required =False, widget=forms.TextInput(attrs={'size': '50'}), max_length=50, label =_("database extraction date"))
......@@ -181,22 +181,23 @@ def adminbase(request, bdd):
for l in Library.objects.using(bdd).all().exclude(name ='checker').order_by('name'):
LIBRARY_CHOICES += (l.name, l.name),
class LibraryForm(forms.ModelForm):
class Meta:
model = Library
fields = ('name',)
widgets = {
'name' : forms.Select(choices=LIBRARY_CHOICES),
}
class LibrForm(forms.Form):
librname = forms.CharField(required =False, widget=forms.TextInput(attrs={'size': '30'}), max_length=30, label =_("nom de la bib"))
libriform = LibrForm(request.POST or None)
i =Library()
libriform = LibraryForm(request.POST or None, instance =i)
if libriform.is_valid():
libname =i.name
contact =i.contact
contact_bis =i.contact_bis
contact_ter =i.contact_ter
j =Library(libname =libname)
j =Library(name =libname)#modified
librmform = LibraryForm(request.POST or None, instance =j)
if librmform.is_valid():
a =1
gift =a
return render(request, 'epl/adminbase.html', locals())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment