diff options
-rw-r--r-- | ishtar/furnitures/forms.py | 38 | ||||
-rw-r--r-- | ishtar/furnitures/models.py | 2 | ||||
-rw-r--r-- | ishtar/locale/fr/LC_MESSAGES/django.po | 77 | ||||
-rw-r--r-- | ishtar/templates/file_wizard.html | 4 | ||||
-rw-r--r-- | static/media/style.css | 8 |
5 files changed, 78 insertions, 51 deletions
diff --git a/ishtar/furnitures/forms.py b/ishtar/furnitures/forms.py index 33a58cbfd..e547c6ffb 100644 --- a/ishtar/furnitures/forms.py +++ b/ishtar/furnitures/forms.py @@ -20,6 +20,8 @@ """ Forms definition """ +import datetime + from django.utils.translation import ugettext_lazy as _ from django.template import Context from django.shortcuts import render_to_response @@ -38,19 +40,7 @@ class Step(BasicStep): self.label = label super(Step, self).__init__(idx, form) -class FileForm1(forms.Form): - subject = forms.CharField(max_length=100) - sender = forms.EmailField() - -class FileForm2(forms.Form): - subject2 = forms.CharField(max_length=100) - sender2 = forms.EmailField() - -class FileWizard(SessionWizard): - def get_template(self, request, step, form): - return ['templates/file_wizard_%s.html' % step, - 'file_wizard.html'] - +class Wizard(SessionWizard): def process_show_form(self, request, step, form): previous_steps = [] for stp in self.base_steps: @@ -60,7 +50,29 @@ class FileWizard(SessionWizard): previous_steps.append(stp) return Context({'previous_steps':previous_steps}) +class FileWizard(Wizard): + def get_template(self, request, step, form): + return ['templates/file_wizard_%s.html' % step, + 'file_wizard.html'] + def done(self, request, form_list): return render_to_response('done.html', { 'form_data': [form.cleaned_data for form in form_list], }) + +class FileForm1(forms.Form): + in_charge = forms.IntegerField(label=_("Person in charge")) + year = forms.IntegerField(label=_("Year"), + initial=lambda:datetime.datetime.now().year) + internal_reference = forms.CharField(label=_(u"Internal reference"), + max_length=60) + creation_date = forms.DateField(label=_(u"Creation date"), + initial=datetime.datetime.now) + file_type = forms.ChoiceField(label=_("File type"), + choices=models.FileType.objects.filter(available=True)) + comment = forms.CharField(label=_(u"Comment"), widget=forms.Textarea) + + +class FileForm2(forms.Form): + town = forms.IntegerField(label=_(u"Town")) + diff --git a/ishtar/furnitures/models.py b/ishtar/furnitures/models.py index ee488d52c..f770fc6c6 100644 --- a/ishtar/furnitures/models.py +++ b/ishtar/furnitures/models.py @@ -182,7 +182,7 @@ class File(BaseHistorizedItem, OwnPerms): max_length=60) file_type = models.ForeignKey(FileType, verbose_name=_(u"File type")) in_charge = models.ForeignKey(Person, related_name='+', - verbose_name=_(u"Person in charge")) + verbose_name=_(u"Person in charge")) general_contractor = models.ForeignKey(Organization, related_name='+', verbose_name=_(u"General contractor"), blank=True, null=True) is_active = models.BooleanField(_(u"Is active?")) diff --git a/ishtar/locale/fr/LC_MESSAGES/django.po b/ishtar/locale/fr/LC_MESSAGES/django.po index 66ac4fcd0..8d6035e91 100644 --- a/ishtar/locale/fr/LC_MESSAGES/django.po +++ b/ishtar/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: alpha\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-12-29 13:18+0100\n" +"POT-Creation-Date: 2010-12-29 16:14+0100\n" "PO-Revision-Date: 2010-12-09\n" "Last-Translator: Étienne Loks <etienne.loks at peacefrogs net>\n" "Language-Team: \n" @@ -18,6 +18,35 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n>1;\n" +#: furnitures/forms.py:64 furnitures/models.py:185 furnitures/models.py:429 +msgid "Person in charge" +msgstr "Responsable" + +#: furnitures/forms.py:65 furnitures/models.py:179 +msgid "Year" +msgstr "Année" + +#: furnitures/forms.py:67 furnitures/models.py:181 +msgid "Internal reference" +msgstr "Référence interne" + +#: furnitures/forms.py:69 furnitures/models.py:190 +msgid "Creation date" +msgstr "Date de création" + +#: furnitures/forms.py:71 furnitures/models.py:183 +msgid "File type" +msgstr "Type de dossier" + +#: furnitures/forms.py:73 furnitures/models.py:48 furnitures/models.py:239 +#: furnitures/models.py:430 furnitures/models.py:498 +msgid "Comment" +msgstr "Commentaire" + +#: furnitures/forms.py:77 furnitures/models.py:91 furnitures/models.py:529 +msgid "Town" +msgstr "Commune" + #: furnitures/menus.py:61 msgid "File management" msgstr "Gestion des dossiers" @@ -39,11 +68,6 @@ msgstr "Suppression de dossier" msgid "Label" msgstr "Libellé" -#: furnitures/models.py:48 furnitures/models.py:239 furnitures/models.py:430 -#: furnitures/models.py:498 -msgid "Comment" -msgstr "Commentaire" - #: furnitures/models.py:49 msgid "Available" msgstr "Disponible" @@ -76,10 +100,6 @@ msgstr "Complément d'adresse" msgid "Postal code" msgstr "Code postal" -#: furnitures/models.py:91 furnitures/models.py:529 -msgid "Town" -msgstr "Commune" - #: furnitures/models.py:92 msgid "Country" msgstr "Pays" @@ -230,22 +250,6 @@ msgstr "Types de dossier archéologique" msgid "Delay (in days)" msgstr "Delai (en jours)" -#: furnitures/models.py:179 -msgid "Year" -msgstr "Année" - -#: furnitures/models.py:181 -msgid "Internal reference" -msgstr "Référence interne" - -#: furnitures/models.py:183 -msgid "File type" -msgstr "Type de dossier" - -#: furnitures/models.py:185 furnitures/models.py:429 -msgid "Person in charge" -msgstr "Responsable" - #: furnitures/models.py:187 msgid "General contractor" msgstr "" @@ -254,10 +258,6 @@ msgstr "" msgid "Is active?" msgstr "Est actif ?" -#: furnitures/models.py:190 -msgid "Creation date" -msgstr "Date de création" - #: furnitures/models.py:192 msgid "Reception date" msgstr "Date de réception" @@ -786,6 +786,10 @@ msgstr "Changement de mot de passe" msgid "Log in" msgstr "Connexion" +#: templates/file_wizard.html:18 +msgid "Validate" +msgstr "Valider" + #: templates/admin/base_site.html:4 templates/admin/base_site.html.py:7 msgid "Ishtar administration" msgstr "Administration d'Ishtar" @@ -800,7 +804,7 @@ msgstr "La création du compte a échouée" #: templates/registration/login.html:16 msgid "Forgot password?" -msgstr "Oublie de mot de passe ?" +msgstr "Oubli de mot de passe ?" #: templates/registration/login.html:16 msgid "Reset it" @@ -859,12 +863,15 @@ msgstr "" "Vous être maintenant enregistré. Un courriel d'activation de votre compte " "vous a été envoyé." +#~ msgid "Internal field" +#~ msgstr "Référence interne" + # overload of translation of registration module # uncomment it after regenerating the PO file with makemessage -msgid "username" -msgstr "identifiant" +#~ msgid "username" +#~ msgstr "identifiant" # overload of translation of registration module # uncomment it after regenerating the PO file with makemessage -msgid "email address" -msgstr "courriel" +#~ msgid "email address" +#~ msgstr "courriel" diff --git a/ishtar/templates/file_wizard.html b/ishtar/templates/file_wizard.html index 99719920c..aa19420e2 100644 --- a/ishtar/templates/file_wizard.html +++ b/ishtar/templates/file_wizard.html @@ -8,12 +8,14 @@ {% endfor %} <li class='current'>» <a href='{%url action_form CURRENT_ACTION extra_context.current_step.slug%}'>{{extra_context.current_step.label}}</a></li> </ul> +<div class='form'> <form action="." method="post">{% csrf_token %} <table> {{ form }} </table> <input type="hidden" name="{{ step_field }}" value="{{ step0 }}" /> {{ previous_fields|safe }} -<input type="submit"> +<input type="submit" value="{% trans "Validate" %}"/> </form> +</div> {% endblock %} diff --git a/static/media/style.css b/static/media/style.css index ef721fb3b..c8f24857c 100644 --- a/static/media/style.css +++ b/static/media/style.css @@ -84,7 +84,13 @@ div#main_menu > ul{ } div#content{ - margin-left:200px; + margin:0 200px; + text-align:center; +} + +ul#form_path{ + text-align:left; + margin:10px 60px; } ul#form_path li{ |