Skip to content

Commit

Permalink
dev: added month-field test page
Browse files Browse the repository at this point in the history
  • Loading branch information
tymees committed Aug 4, 2023
1 parent f52ae96 commit 54b24b1
Show file tree
Hide file tree
Showing 9 changed files with 203 additions and 71 deletions.
13 changes: 12 additions & 1 deletion dev/main/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
from django.utils.safestring import mark_safe

from cdh.core import fields as core_fields
from cdh.core.forms import TemplatedForm
from cdh.core.forms import SplitMonthInput, TemplatedForm, TemplatedModelForm
from cdh.core.mail import EmailContentEditWidget
from cdh.files.forms import FileField, TrackedFileField
from main.emails import ExampleCustomTemplateEmail
from main.models import MonthFieldTest


class FormStylesForm(forms.Form):
Expand Down Expand Up @@ -169,3 +170,13 @@ class CustomEmailForm(TemplatedForm):
)

footer = forms.CharField()


class MonthFieldTestForm(TemplatedModelForm):
show_valid_fields = False
class Meta:
model = MonthFieldTest
fields = ['single_month_field', 'split_month_field']
widgets = {
'split_month_field': SplitMonthInput
}
72 changes: 38 additions & 34 deletions dev/main/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-09-26 04:12-0500\n"
"POT-Creation-Date: 2023-08-04 10:22+0000\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"
Expand All @@ -16,139 +16,143 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: dev/main/emails.py:8
#: main/emails.py:8
msgid "example_email.vars.name"
msgstr "Recipient Name"

#: dev/main/emails.py:9
#: main/emails.py:9
msgid "example_email.vars.date"
msgstr "Current Date"

#: dev/main/emails.py:11
#: main/emails.py:11
msgid "example_email.vars.random_number"
msgstr "A random number"

#: dev/main/menus.py:5
#: main/menus.py:5
msgid "main:menu:home"
msgstr "Home"

#: dev/main/menus.py:10
#: main/menus.py:10
msgid "main:menu:core"
msgstr "CDH Core"

#: dev/main/menus.py:15
#: main/menus.py:15
msgid "main:menu:core:base"
msgstr "General CSS"

#: dev/main/menus.py:20
#: main/menus.py:20
msgid "main:menu:core:form"
msgstr "Table Form CSS"

#: dev/main/menus.py:25
#: main/menus.py:25
msgid "main:menu:core:custom_form"
msgstr "Custom Template Form CSS"

#: dev/main/menus.py:30
#: main/menus.py:30
msgid "main:menu:core:jquery_form"
msgstr "jQuery UI Form CSS"

#: dev/main/menus.py:35
#: main/menus.py:35
msgid "main:menu:core:custom_email_form"
msgstr "Custom email edit form"

#: dev/main/menus.py:42
#: main/menus.py:40
msgid "main:menu:core:month_field"
msgstr "Month field"

#: main/menus.py:47
msgid "main:footer:login"
msgstr "Log in"

#: dev/main/menus.py:47
#: main/menus.py:52
msgid "main:footer:logout"
msgstr "Log out"

#: dev/main/templates/base/login_header.html:6
#: main/templates/base/login_header.html:6
msgid "site:header:login"
msgstr "Welcome {}!"

#: dev/main/templates/base/login_header.html:7
#: main/templates/base/login_header.html:7
msgid "main:globals:logout"
msgstr "Logout"

#: dev/main/templates/base/login_header.html:10
#: main/templates/base/login_header.html:10
msgid "main:globals:login"
msgstr "Log in"

#. Translators: This is the title that will end up in the header (in blue)
#: dev/main/templates/base/site_header.html:4
#: main/templates/base/site_header.html:4
msgid "site:header:title"
msgstr "DSC dev-project"

#. Translators: This is the title that will end up in the tab of the browser
#: dev/main/templates/base/site_title.html:5
#: main/templates/base/site_title.html:5
msgid "site:name"
msgstr "USL dev project"

#: dev/main/templates/error/400.html:8
#: main/templates/error/400.html:8
msgid "main:error:400:title"
msgstr "Bad Request"

#: dev/main/templates/error/400.html:14
#: main/templates/error/400.html:14
msgid "main:error:400:text"
msgstr "The server encountered an error processing your request."

#: dev/main/templates/error/403.html:8
#: main/templates/error/403.html:8
msgid "main:error:403:title"
msgstr "Not authorized"

#: dev/main/templates/error/403.html:14
#: main/templates/error/403.html:14
msgid "main:error:403:text"
msgstr ""
"It looks like you are trying to access a page you are not allowed to view."

#: dev/main/templates/error/404.html:8
#: main/templates/error/404.html:8
msgid "main:error:404:title"
msgstr "Page not found"

#: dev/main/templates/error/404.html:14
#: main/templates/error/404.html:14
msgid "main:error:404:text"
msgstr ""
"We can't seem to find the page you're looking for. The link you clicked may "
"be broken or the page may have been moved."

#: dev/main/templates/error/500.html:8
#: main/templates/error/500.html:8
msgid "main:error:500:title"
msgstr "Something went wrong"

#: dev/main/templates/error/500.html:14
#: main/templates/error/500.html:14
msgid "main:error:500:text"
msgstr "Sorry! It looks like we may have made a mistake!"

#: dev/main/templates/registration/logged_out.html:9
#: main/templates/registration/logged_out.html:9
msgid "main:logout:title"
msgstr ""

#: dev/main/templates/registration/logged_out.html:12
#: main/templates/registration/logged_out.html:12
msgid "main:logout:text"
msgstr ""

#: dev/main/templates/registration/login.html:9
#: main/templates/registration/login.html:9
msgid "main:login:title"
msgstr ""

#: dev/main/templates/registration/login.html:12
#: main/templates/registration/login.html:12
msgid "main:login:text"
msgstr ""

#: dev/main/templates/registration/login.html:16
#: main/templates/registration/login.html:16
msgid "main:login:error"
msgstr ""

#: dev/main/templates/registration/login.html:20
#: main/templates/registration/login.html:20
msgid "main:login:username"
msgstr ""

#: dev/main/templates/registration/login.html:21
#: main/templates/registration/login.html:21
msgid "main:login:password"
msgstr ""

#: dev/main/templates/registration/login.html:22
#: main/templates/registration/login.html:22
msgid "main:login:submit"
msgstr ""
72 changes: 38 additions & 34 deletions dev/main/locale/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-09-26 04:12-0500\n"
"POT-Creation-Date: 2023-08-04 10:22+0000\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"
Expand All @@ -16,138 +16,142 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: dev/main/emails.py:8
#: main/emails.py:8
msgid "example_email.vars.name"
msgstr "Naam van ontvanger"

#: dev/main/emails.py:9
#: main/emails.py:9
msgid "example_email.vars.date"
msgstr "Huidige datum"

#: dev/main/emails.py:11
#: main/emails.py:11
msgid "example_email.vars.random_number"
msgstr "Willekeurig cijfer"

#: dev/main/menus.py:5
#: main/menus.py:5
msgid "main:menu:home"
msgstr ""

#: dev/main/menus.py:10
#: main/menus.py:10
msgid "main:menu:core"
msgstr "CDH Core"

#: dev/main/menus.py:15
#: main/menus.py:15
msgid "main:menu:core:base"
msgstr "General CSS"

#: dev/main/menus.py:20
#: main/menus.py:20
msgid "main:menu:core:form"
msgstr "Tabel Form CSS"

#: dev/main/menus.py:25
#: main/menus.py:25
msgid "main:menu:core:custom_form"
msgstr "Custom Template Form CSS"

#: dev/main/menus.py:30
#: main/menus.py:30
msgid "main:menu:core:jquery_form"
msgstr "jQuery UI Form CSS"

#: dev/main/menus.py:35
#: main/menus.py:35
msgid "main:menu:core:custom_email_form"
msgstr "Custom email bewerk form"

#: dev/main/menus.py:42
#: main/menus.py:40
msgid "main:menu:core:month_field"
msgstr "Month Field"

#: main/menus.py:47
msgid "main:footer:login"
msgstr "Log in"

#: dev/main/menus.py:47
#: main/menus.py:52
msgid "main:footer:logout"
msgstr "Log uit"

#: dev/main/templates/base/login_header.html:6
#: main/templates/base/login_header.html:6
msgid "site:header:login"
msgstr ""

#: dev/main/templates/base/login_header.html:7
#: main/templates/base/login_header.html:7
msgid "main:globals:logout"
msgstr ""

#: dev/main/templates/base/login_header.html:10
#: main/templates/base/login_header.html:10
msgid "main:globals:login"
msgstr "Log in"

#. Translators: This is the title that will end up in the header (in blue)
#: dev/main/templates/base/site_header.html:4
#: main/templates/base/site_header.html:4
msgid "site:header:title"
msgstr "DSC dev-project"

#. Translators: This is the title that will end up in the tab of the browser
#: dev/main/templates/base/site_title.html:5
#: main/templates/base/site_title.html:5
msgid "site:name"
msgstr "USL dev project"

#: dev/main/templates/error/400.html:8
#: main/templates/error/400.html:8
msgid "main:error:400:title"
msgstr "Bad Request"

#: dev/main/templates/error/400.html:14
#: main/templates/error/400.html:14
msgid "main:error:400:text"
msgstr "Er is een fout opgetreden bij het verwerken van uw verzoek."

#: dev/main/templates/error/403.html:8
#: main/templates/error/403.html:8
msgid "main:error:403:title"
msgstr "Geen toegang"

#: dev/main/templates/error/403.html:14
#: main/templates/error/403.html:14
msgid "main:error:403:text"
msgstr "Het lijkt er op dat je een pagina wilt bezoeken waar je niet bij mag."

#: dev/main/templates/error/404.html:8
#: main/templates/error/404.html:8
msgid "main:error:404:title"
msgstr "Pagina niet gevonden"

#: dev/main/templates/error/404.html:14
#: main/templates/error/404.html:14
msgid "main:error:404:text"
msgstr ""
"We kunnen de pagina waarnaar u op zoek bent niet vinden.De link waarop u "
"hebt geklikt is mogelijk incorrect of de pagina is verplaatst."

#: dev/main/templates/error/500.html:8
#: main/templates/error/500.html:8
msgid "main:error:500:title"
msgstr "Er is iets fout gegaan"

#: dev/main/templates/error/500.html:14
#: main/templates/error/500.html:14
msgid "main:error:500:text"
msgstr "Sorry! Het lijkt er op dat wij iets fout hebben gedaan aan onze kant!"

#: dev/main/templates/registration/logged_out.html:9
#: main/templates/registration/logged_out.html:9
msgid "main:logout:title"
msgstr ""

#: dev/main/templates/registration/logged_out.html:12
#: main/templates/registration/logged_out.html:12
msgid "main:logout:text"
msgstr ""

#: dev/main/templates/registration/login.html:9
#: main/templates/registration/login.html:9
msgid "main:login:title"
msgstr ""

#: dev/main/templates/registration/login.html:12
#: main/templates/registration/login.html:12
msgid "main:login:text"
msgstr ""

#: dev/main/templates/registration/login.html:16
#: main/templates/registration/login.html:16
msgid "main:login:error"
msgstr ""

#: dev/main/templates/registration/login.html:20
#: main/templates/registration/login.html:20
msgid "main:login:username"
msgstr ""

#: dev/main/templates/registration/login.html:21
#: main/templates/registration/login.html:21
msgid "main:login:password"
msgstr ""

#: dev/main/templates/registration/login.html:22
#: main/templates/registration/login.html:22
msgid "main:login:submit"
msgstr ""
Loading

0 comments on commit 54b24b1

Please sign in to comment.