-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add Validation Summary component to edit template forms. #2028
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
312f005
add validation summary to template forms, add logic to manually order…
amazingphilippe 24c407b
undo some auto-format breaking translation keys
amazingphilippe 4e0de37
undo moving of the help boxes
amazingphilippe 5d68bda
some formatting
amazingphilippe 7129942
Merge branch 'main' into debt/template-validation-summary
amazingphilippe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,20 +18,22 @@ | |
back_link=url_for('main.view_template', service_id=current_service.id, template_id=template.id) if template else url_for('main.create_template', service_id=current_service.id, template_folder_id=template_folder_id), | ||
back_link_aria_label=_('Back to template {}').format(template.name) if template else _('Back') | ||
) }} | ||
|
||
{% call form_wrapper() %} | ||
|
||
{% call form_wrapper( | ||
show_validation_summary=True, | ||
form=form, | ||
field_order=['name', 'template_content', 'template_category_id'] | ||
) %} | ||
<div class="grid-row contain-floats md:flex my-gutterAndAHalf"> | ||
<div class="md:max-w-2/3 px-gutterHalf mb-gutterHalf"> | ||
{{ task_shortcut( | ||
description=_("You can put double brackets around a variable to insert custom content."), | ||
link_url=gca_url_for('personalisation_guide'), | ||
link_text=_("Guide: Send messages with custom content"), | ||
icon="arrow-up-right-from-square" | ||
) | ||
}} | ||
description=_("You can put double brackets around a variable to insert custom content."), | ||
link_url=gca_url_for('personalisation_guide'), | ||
link_text=_("Guide: Send messages with custom content"), | ||
icon="arrow-up-right-from-square" | ||
) }} | ||
Comment on lines
+30
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a code formatting change? |
||
</div> | ||
</div> | ||
|
||
<div class="grid-row contain-floats"> | ||
<div class="md:w-2/3 px-gutterHalf"> | ||
{{ textbox(form.name, width='w-full', hint=_('This will not show in the message. Use a name that helps you find the template when you need it.'), testid="template-name") }} | ||
|
@@ -51,4 +53,5 @@ <h2 class="heading-medium">{{ _('Template category') }}</h2> | |
</div> | ||
</div> | ||
{% endcall %} | ||
|
||
{% endblock %} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's best to avoid including code formatting changes that are unrelated to the actual change you are trying to make, since it makes the PR bigger than it needs to be. But maybe your editor is just doing this on its own?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I had to undo an earlier change as the AC for this story was changed a bit. And I couldn't quite get that section back to what it was exactly. And I'm also having some auto-formatting issues as well on html files... Maybe we should see if we can fix that at the container level by adding the correct extensions.