Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added anthem translation field as of enhancement issue #21 #54

Merged
merged 5 commits into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Translations field converted to dropdown list
  • Loading branch information
MonEstCha committed Aug 1, 2024
commit 70d8b6421705e1d675acd5746fd69d0118f9c4d8
4 changes: 1 addition & 3 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def from_form(cls, form: 'PewSheetForm') -> 'Service':
else:
secondary_feasts = []

if form.anthem_title.data or form.anthem_composer.data or form.anthem_lyrics.data:
if form.anthem_title.data or form.anthem_composer.data or form.anthem_lyrics.data or form.anthem_translation.data:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would be simplified if we could group stuff together

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I will give it a try!

anthem = Music(
title=form.anthem_title.data,
composer=form.anthem_composer.data,
Expand All @@ -452,8 +452,6 @@ def from_form(cls, form: 'PewSheetForm') -> 'Service':
else:
anthem = None

print(form.anthem_translation.data)

return Service(
title=form.title.data,
date=form.date.data,
Expand Down
2 changes: 1 addition & 1 deletion templates/serviceForm.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ <h3 id="titleH3"></h3>
<div class="row mb-3">
{{ form.anthem_translation.label(class='col-sm-2 col-form-label') }}
<div class="col-sm-5">
{{ form.anthem_translation(class='form-control') }}
{{ form.anthem_translation(class='form-select') }}
{% if form.anthem_translation.errors %}
{% for error in form.anthem_translation.errors %}
<small class="font-small text-danger">
Expand Down
Loading