diff --git a/forms/login.py b/forms/login.py index a458a8b..b95dd09 100644 --- a/forms/login.py +++ b/forms/login.py @@ -1,14 +1,19 @@ -from wtforms import Form, BooleanField, IntegerField, DecimalField, StringField, DateField, PasswordField, validators +from wtforms import Form, BooleanField, StringField, PasswordField, TextAreaField, validators +from wtforms.fields.html5 import DateField, DecimalField, IntegerField +from wtforms.widgets import TextArea from flask_login import UserMixin from objects import glob class BillForm(Form): - payment_to = StringField("Payment to", [validators.DataRequired()]) - description = StringField("Description") - sum = DecimalField("Sum") - kid = IntegerField("KID") - date_due = DateField("Date Due (YYYY-MM-DD )") + payment_to = StringField("lbl_to", [validators.DataRequired()]) + description = TextAreaField("lbl_desc", render_kw = { + "cols": 55, + "rows": 8 + }) + sum = DecimalField("lbl_sum") + kid = IntegerField("lbl_id") + date_due = DateField("lbl_date") class LoginForm(Form): email = StringField("Email", [ diff --git a/locale/en/bills.json b/locale/en/bills.json new file mode 100644 index 0000000..b8fe2b9 --- /dev/null +++ b/locale/en/bills.json @@ -0,0 +1,8 @@ +{ + "lbl_to": "Payment to", + "lbl_desc": "Description", + "lbl_sum": "Sum", + "lbl_id": "KID", + "lbl_date": "Date due", + "lbl_status": "Payment status" +} \ No newline at end of file diff --git a/locale/en/etc.buttons.json b/locale/en/etc.buttons.json new file mode 100644 index 0000000..396be21 --- /dev/null +++ b/locale/en/etc.buttons.json @@ -0,0 +1,4 @@ +{ + "add": "Add", + "close": "Close" +} \ No newline at end of file diff --git a/locale/en/side_nav.json b/locale/en/layout.side_nav.json similarity index 100% rename from locale/en/side_nav.json rename to locale/en/layout.side_nav.json diff --git a/locale/no/bills.json b/locale/no/bills.json new file mode 100644 index 0000000..c8403fb --- /dev/null +++ b/locale/no/bills.json @@ -0,0 +1,8 @@ +{ + "lbl_to": "Betaling til", + "lbl_desc": "Tekst", + "lbl_sum": "Sum", + "lbl_id": "KID", + "lbl_date": "Forfallsdato", + "lbl_status": "Betalingsstatus" +} \ No newline at end of file diff --git a/locale/no/etc.buttons.json b/locale/no/etc.buttons.json new file mode 100644 index 0000000..367c2ca --- /dev/null +++ b/locale/no/etc.buttons.json @@ -0,0 +1,4 @@ +{ + "add": "Legg til", + "close": "Lukk" +} \ No newline at end of file diff --git a/locale/no/side_nav.json b/locale/no/layout.side_nav.json similarity index 100% rename from locale/no/side_nav.json rename to locale/no/layout.side_nav.json diff --git a/templates/pages/bills.html b/templates/pages/bills.html index 256b870..20358af 100644 --- a/templates/pages/bills.html +++ b/templates/pages/bills.html @@ -12,7 +12,7 @@
- +
@@ -55,12 +55,12 @@ - - - - - - + + + + + +
Payment toDescriptionSumKIDDate DuePayment status{{ locale(LANG, "lbl_to") }}{{ locale(LANG, "lbl_desc") }}{{ locale(LANG, "lbl_sum") }}{{ locale(LANG, "lbl_id") }}{{ locale(LANG, "lbl_date") }}{{ locale(LANG, "lbl_status") }}