-
Notifications
You must be signed in to change notification settings - Fork 168
Update contact modal #2657
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
Open
styrix560
wants to merge
34
commits into
e-valuation:main
Choose a base branch
from
styrix560:2129-update-contact-modal
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update contact modal #2657
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
9a755dd
wip
styrix560 b9bd11b
wip
styrix560 3278548
wip
styrix560 0313622
wip
styrix560 99afb55
wip
styrix560 b6c1b3c
Change contact modals to new variant
styrix560 a335c30
Remove console.log
styrix560 4b34bfe
Remove unused code
styrix560 6e86616
Add success message
styrix560 a7f0776
Add whitespace
styrix560 fa99ecf
Fix tests
styrix560 59f37a1
Fix whitespace
styrix560 fc80c3a
More whitespace
styrix560 6a39445
Add label and placeholder to contact modal textarea
styrix560 814ac35
Fix text in profile contact_modal
styrix560 75ba230
stuff :)
styrix560 bdb7014
whitespace
styrix560 90c7ef3
Add modals block back in
styrix560 fad45cd
Fix ids
styrix560 77c2d59
Fix ids
styrix560 1f86019
Remove custom JS from contact modal
styrix560 b760cdf
Fix button UI
styrix560 3c00f37
Add code review suggestions
styrix560 73027da
Change modal in test
styrix560 2cccadb
Update test
styrix560 65214e4
Remove unecessary input
styrix560 3c9b7e3
Add changes
styrix560 0c58c48
Remove comment
styrix560 be73c7b
Apply suggestions from code review
styrix560 34293fb
Make forms external to the confirmation-modal
styrix560 a36aa27
Fix formatting
styrix560 e067e66
Make contact-modal scroll when there is not enough space
styrix560 cafc548
Merge branch 'main' into 2129-update-contact-modal
styrix560 25dd3c6
Fix formatting
styrix560 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,112 +1,81 @@ | ||
| {% load static %} | ||
|
|
||
| <div | ||
| class="modal fade" | ||
| id="successMessageModal_{{ modal_id }}" | ||
| tabindex="-1" | ||
| role="dialog" | ||
| aria-labelledby="successMessageModalLabel_{{ modal_id }}" | ||
| aria-hidden="true" | ||
| > | ||
| <div class="modal-dialog" role="document"> | ||
| <div class="modal-content"> | ||
| <div class="modal-header"> | ||
| <h5 class="modal-title" id="successMessageModalLabel_{{ modal_id }}">{% translate 'Message sent' %}</h5> | ||
| </div> | ||
| <div class="modal-body"> | ||
| {% translate 'Your message was successfully sent.' %} | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <confirmation-modal type="submit" form="{{ form_id }}" dialog-extra-class="overflow-scroll"> | ||
| <span slot="title">{{ title }}</span> | ||
| <span slot="question">{{ teaser }}</span> | ||
| <span slot="action-text">{% translate 'Send Message' %}</span> | ||
|
|
||
| <div | ||
| class="modal fade" | ||
| id="{{ modal_id }}" | ||
| tabindex="-1" | ||
| role="dialog" | ||
| aria-labelledby="{{ modal_id }}Label" | ||
| aria-hidden="true" | ||
| > | ||
| <div class="modal-dialog modal-lg" role="document"> | ||
| <div class="modal-content"> | ||
| <div class="modal-header"> | ||
| <h5 class="modal-title" id="{{ modal_id }}Label">{{ title }}</h5> | ||
| <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> | ||
| </div> | ||
| <form id="{{ modal_id }}Form"> | ||
| <div class="modal-body"> | ||
| {{ teaser }} | ||
| <div class="modal-grid"> | ||
| <label | ||
| for="{{ modal_id }}SenderName" | ||
| class="control-label my-auto pe-4" | ||
| >{% translate 'Sender' %}</label> | ||
| {% if modal_id == "feedbackModal" and allow_anonymous_feedback_messages %} | ||
| <div class="btn-group text-wrap" role="group" aria-label="{{ modal_id }} Radio Group"> | ||
| <input | ||
| type="radio" | ||
| class="btn-check" | ||
| name="{{ modal_id }}RadioGroup" | ||
| id="{{ modal_id }}SenderName" | ||
| checked | ||
| > | ||
| <label | ||
| class="btn btn-sm btn-outline-primary text-break" | ||
| for="{{ modal_id }}SenderName" | ||
| >{{ user.full_name }}</label> | ||
| <input | ||
| type="radio" | ||
| class="btn-check" | ||
| name="{{ modal_id }}RadioGroup" | ||
| id="{{ modal_id }}AnonymousName" | ||
| > | ||
| <label | ||
| class="btn btn-sm btn-outline-primary text-break" | ||
| for="{{ modal_id }}AnonymousName" | ||
| >{% translate 'Anonymous' %}</label> | ||
| </div> | ||
| {% else %} | ||
| <input | ||
| type="text" | ||
| class="form-control mx-auto text-break" | ||
| id="{{ modal_id }}SenderName" | ||
| disabled | ||
| value="{{ user.full_name }}" | ||
| /> | ||
| {% endif %} | ||
| <label | ||
| for="{{ modal_id }}Subject" | ||
| class="control-label my-auto pe-4 text-break" | ||
| >{% translate 'Subject' %}</label> | ||
| <input | ||
| type="text" | ||
| class="form-control mx-auto" | ||
| id="{{ modal_id }}Subject" | ||
| disabled | ||
| value="{{ title }}" | ||
| /> | ||
| </div> | ||
| <textarea | ||
| autofocus | ||
| class="form-control modal-textfield my-4" | ||
| id="{{ modal_id }}MessageText" | ||
| ></textarea> | ||
| <div class="modal-submit-group"> | ||
| <button type="button" class="btn btn-light me-1" data-bs-dismiss="modal"> | ||
| {% translate 'Cancel' %} | ||
| </button> | ||
| <button type="submit" id="{{ modal_id }}ActionButton" class="btn btn-primary ms-1"> | ||
| {% translate 'Send Message' %} | ||
| </button> | ||
| </div> | ||
| <div slot="extra-inputs"> | ||
| <div class="modal-grid"> | ||
| <label for="{{ modal_id }}SenderName" class="control-label my-auto pe-4">{% translate 'Sender' %}</label> | ||
| {% if anonymous_mode_enabled %} | ||
| <div class="btn-group text-wrap" role="group" aria-label="{{ modal_id }} Radio Group"> | ||
| <input | ||
| type="radio" | ||
| class="btn-check" | ||
| form="{{ form_id }}" | ||
| name="anonymous" | ||
| value="false" | ||
| id="{{ modal_id }}SenderName" | ||
| checked | ||
| /> | ||
| <label | ||
| class="btn btn-sm btn-outline-primary text-break" | ||
| for="{{ modal_id }}SenderName" | ||
| >{{ user.full_name }}</label> | ||
| <input | ||
| type="radio" | ||
| class="btn-check" | ||
| form="{{ form_id }}" | ||
| name="anonymous" | ||
| value="true" | ||
| id="{{ modal_id }}AnonymousName" | ||
| /> | ||
| <label | ||
| class="btn btn-sm btn-outline-primary text-break" | ||
| for="{{ modal_id }}AnonymousName" | ||
| >{% translate 'Anonymous' %}</label> | ||
| </div> | ||
| </form> | ||
| {% else %} | ||
| <input | ||
| type="text" | ||
| class="form-control mx-auto text-break" | ||
| form="{{ form_id }}" | ||
| id="{{ modal_id }}SenderName" | ||
| disabled | ||
| value="{{ user.full_name }}" | ||
| /> | ||
| {% endif %} | ||
| <label | ||
| for="{{ modal_id }}Subject" | ||
| class="control-label my-auto pe-4 text-break" | ||
| >{% translate 'Subject' %}</label> | ||
| <input | ||
| name="title" | ||
| type="text" | ||
| class="form-control mx-auto" | ||
| form="{{ form_id }}" | ||
| id="{{ modal_id }}Subject" | ||
| disabled | ||
| value="{{ title }}" | ||
| size="70" | ||
| /> | ||
| </div> | ||
| <label for="{{ modal_id }}MessageText" class="d-none">{% translate 'Message' %}</label> | ||
| <textarea | ||
| autofocus | ||
| required | ||
| class="form-control modal-textfield my-4" | ||
| form="{{ form_id }}" | ||
| id="{{ modal_id }}MessageText" | ||
| name="message" | ||
| placeholder="{% translate 'Message' %}" | ||
| ></textarea> | ||
| </div> | ||
| </div> | ||
| <script type="module"> | ||
| import { ContactModalLogic } from "{% static 'js/contact_modal.js' %}"; | ||
|
|
||
| new ContactModalLogic("{{ modal_id }}", "{{ title|escapejs }}").attach(); | ||
| </script> | ||
| <div slot="show-button"> | ||
| <button type="button" class="{{ show_button_class }}" id="{{ modal_id }}ShowButton"> | ||
| {{ show_button_text }} | ||
| </button> | ||
| </div> | ||
| </confirmation-modal> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.