Merge branch 'develop' into 'master'

Edit labels on form fields

See merge request !65
This commit is contained in:
Jan Tuomi
2017-10-16 18:13:39 +03:00
5 changed files with 29 additions and 10 deletions
Binary file not shown.
+13 -5
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-16 15:35+0300\n"
"POT-Creation-Date: 2017-10-16 18:10+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -550,23 +550,31 @@ msgstr ""
msgid "Copyright Aalto-yliopiston Sähköinsinöörikilta ry"
msgstr "Copyright Aalto-yliopiston Sähköinsinöörikilta ry"
#: webapp/forms.py:28
#: webapp/forms.py:25
msgid "Email (not public)"
msgstr ""
#: webapp/forms.py:26
msgid "Phone number (not public)"
msgstr ""
#: webapp/forms.py:31
#, fuzzy
#| msgid "Total challenges:"
msgid "Custom roles"
msgstr "Total challenges:"
#: webapp/forms.py:35 webapp/templates/kaehmy.html:30
#: webapp/forms.py:38 webapp/templates/kaehmy.html:30
#, fuzzy
#| msgid "Total challenges:"
msgid "Preset roles"
msgstr "Total challenges:"
#: webapp/forms.py:57
#: webapp/forms.py:60
msgid "Invalid phone number"
msgstr ""
#: webapp/forms.py:65
#: webapp/forms.py:68
msgid "Custom role with the same name already exists."
msgstr ""
Binary file not shown.
+13 -5
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-16 15:35+0300\n"
"POT-Creation-Date: 2017-10-16 18:10+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -543,19 +543,27 @@ msgstr "Vaihda"
msgid "Copyright Aalto-yliopiston Sähköinsinöörikilta ry"
msgstr "Copyright Aalto-yliopiston Sähköinsinöörikilta ry"
#: webapp/forms.py:28
#: webapp/forms.py:25
msgid "Email (not public)"
msgstr "Sähköposti (ei julkinen)"
#: webapp/forms.py:26
msgid "Phone number (not public)"
msgstr "Puhelinnumero (ei julkinen)"
#: webapp/forms.py:31
msgid "Custom roles"
msgstr "Uudet virat"
#: webapp/forms.py:35 webapp/templates/kaehmy.html:30
#: webapp/forms.py:38 webapp/templates/kaehmy.html:30
msgid "Preset roles"
msgstr "Kaehmyvirat"
#: webapp/forms.py:57
#: webapp/forms.py:60
msgid "Invalid phone number"
msgstr "Virheellinen puhelinnumero"
#: webapp/forms.py:65
#: webapp/forms.py:68
msgid "Custom role with the same name already exists."
msgstr "Samanniminen virka on jo olemassa"
+3
View File
@@ -22,6 +22,9 @@ class KaehmyForm_Form(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(KaehmyForm_Form, self).__init__(*args, **kwargs)
self.fields["email"].label = _('Email (not public)')
self.fields["phone_number"].label = _('Phone number (not public)')
custom_roles_exist = CustomKaehmyRole.objects.all().exists()
self.fields["custom_roles"].widget = forms.widgets.CheckboxSelectMultiple() if custom_roles_exist else forms.HiddenInput()
self.fields["custom_roles"].help_text = ""