From 113d258b3d478dcbf3fd96d5a8a30e4a48689eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Ko=CC=88cher?= Date: Fri, 13 Apr 2012 21:55:13 +0200 Subject: [PATCH] #85: New import option: set status of all imported applications to 'permit' --- openslides/application/forms.py | 2 +- openslides/application/views.py | 4 ++++ openslides/locale/de/LC_MESSAGES/django.mo | Bin 28943 -> 29178 bytes openslides/locale/de/LC_MESSAGES/django.po | 18 +++++++++++++----- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/openslides/application/forms.py b/openslides/application/forms.py index bb4efb80e..8488ffe19 100644 --- a/openslides/application/forms.py +++ b/openslides/application/forms.py @@ -56,7 +56,7 @@ class ApplicationManagerForm(ModelForm, CssClassMixin): class ApplicationImportForm(Form, CssClassMixin): csvfile = FileField(widget=FileInput(attrs={'size':'50'}), label=_("CSV File")) - + import_permitted = BooleanField(required=False, label=_("Import applications with status \"permitted\""), help_text=_("Set the initial status for each application to \"permitted\"")) class ConfigForm(Form, CssClassMixin): application_min_supporters = IntegerField( diff --git a/openslides/application/views.py b/openslides/application/views.py index eb802555a..ddf3a854e 100644 --- a/openslides/application/views.py +++ b/openslides/application/views.py @@ -495,6 +495,7 @@ def application_import(request): if request.method == 'POST': form = ApplicationImportForm(request.POST, request.FILES) if form.is_valid(): + import_permitted = form.cleaned_data['import_permitted'] try: users_generated = 0 applications_generated = 0 @@ -563,6 +564,9 @@ def application_import(request): application.title = form.cleaned_data['title'] application.text = form.cleaned_data['text'] application.reason = form.cleaned_data['reason'] + if import_permitted: + application.status = 'per' + application.save(user, trivial_change=True) if applications_generated: diff --git a/openslides/locale/de/LC_MESSAGES/django.mo b/openslides/locale/de/LC_MESSAGES/django.mo index 40abb2a857c74bf8bec7054448c7e46864778cb6..953b7c69ef7c0123eb866eea2045678eaa5d7fde 100644 GIT binary patch delta 8408 zcmY+}30PKD9>?*6q9B57Dgq)eD5BtoLT8tw`zuAsgMh=71=+EpiKG&L(SE7Q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Language-Team: LANGUAGE \n" @@ -17,11 +17,11 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -#: openslides_settings.py:42 settings.py:60 +#: openslides_settings.py:42 msgid "German" msgstr "Deutsch" -#: openslides_settings.py:43 settings.py:61 +#: openslides_settings.py:43 msgid "English" msgstr "Englisch" @@ -246,14 +246,14 @@ msgstr "Triviale Änderung" msgid "Trivial changes don't create a new version." msgstr "Triviale Änderungen erzeugen keine neue Version." -#: application/forms.py:49 application/models.py:53 +#: application/forms.py:49 application/models.py:54 #: application/templates/application/overview.html:39 #: application/templates/application/view.html:13 #: application/templates/projector/Application.html:22 utils/pdf.py:311 msgid "Submitter" msgstr "Antragsteller/in" -#: application/forms.py:50 application/models.py:55 +#: application/forms.py:50 application/models.py:56 #: application/templates/application/view.html:27 utils/pdf.py:324 msgid "Supporters" msgstr "Unterstützer/innen" @@ -262,6 +262,14 @@ msgstr "Unterstützer/innen" msgid "CSV File" msgstr "CSV-Datei" +#: application/forms.py:59 +msgid "Import applications with status \"permitted\"" +msgstr "Anträge als \"Zugelassen\" importieren" + +#: application/forms.py:59 +msgid "Set the initial status for each application to \"permitted\"" +msgstr "Setzt den initialen Status für jeden Antrag auf \"zugelassen\"" + #: application/forms.py:64 msgid "Number of (minimum) required supporters for a application" msgstr "Mindestanzahl erforderlicher Unterstützer/innen für einen Antrag"