1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00

update for "create archive" interface

This commit is contained in:
A.Avenel 2012-11-26 21:52:25 +01:00
parent ee7459025d
commit 8b114c5718
3 changed files with 5 additions and 4 deletions

View file

@ -187,6 +187,6 @@ class InviteForm(Form):
class CreateArchiveForm(Form):
start_date = DateField(_("Start date"), validators=[Required(), ])
end_date = DateField(_("End date"), validators=[Required(), ])
name = TextField(_("Name for this archive (optional)"))
name = TextField(_("Name for this archive (optional)"), validators=[])
start_date = DateField(_("Start date"), validators=[Required()])
end_date = DateField(_("End date"), validators=[Required()], default=datetime.now)

View file

@ -108,6 +108,7 @@
<fieldset>
<legend>{{ _("Create an archive") }}</legend>
{{ form.hidden_tag() }}
{{ input(form.name) }}
{{ input(form.start_date) }}
{{ input(form.end_date) }}
</fieldset>

View file

@ -389,7 +389,7 @@ def compute_bills():
return render_template("compute_bills.html")
@main.route("/<project_id>/archives/create")
@main.route("/<project_id>/archives/create", methods=["GET", "POST"])
def create_archive():
form = CreateArchiveForm()
if request.method == "POST":