Revised the text messages in the option forms.

This commit is contained in:
依瑪貓 2023-03-22 19:11:07 +08:00
parent b394c58ec6
commit f9c39709c8
2 changed files with 4 additions and 4 deletions

View File

@ -127,7 +127,7 @@ class RecurringExpenseForm(RecurringItemForm):
filters=[strip_text],
validators=[
DataRequired(lazy_gettext(
"Please fill in the template of the description."))])
"Please fill in the description template."))])
"""The template for the line item description."""
@property
@ -242,7 +242,7 @@ class OptionForm(FlaskForm):
filters=[strip_text],
validators=[
DataRequired(lazy_gettext(
"Please fill in the default account code"
"Please select the default account"
" for the income and expenses log."))])
"""The default account code for the income and expenses log."""
recurring = FormField(RecurringForm)

View File

@ -72,8 +72,8 @@ def update_options() -> redirect:
form = OptionForm(request.form)
form.populate_obj(options)
if not options.is_modified:
flash(s(lazy_gettext("The options were not modified.")), "success")
flash(s(lazy_gettext("The settings were not modified.")), "success")
return redirect(inherit_next(url_for("accounting.option.detail")))
options.commit()
flash(s(lazy_gettext("The options are saved successfully.")), "success")
flash(s(lazy_gettext("The settings are saved successfully.")), "success")
return redirect(inherit_next(url_for("accounting.option.detail")))