diff --git a/scipost_django/submissions/forms/__init__.py b/scipost_django/submissions/forms/__init__.py index 97571d764c2fc13c585a8a240b3ff8ff4b23ddb2..e94841fd9994d5da0540c4c0f33edf5b8c411ebe 100644 --- a/scipost_django/submissions/forms/__init__.py +++ b/scipost_django/submissions/forms/__init__.py @@ -2723,7 +2723,7 @@ class ConfigureRefereeInvitationForm(forms.Form): self.helper = FormHelper() self.helper.form_action = reverse( - "submissions:_hx_configure_refereeing_invitation", + "submissions:_hx_customize_refereeing_invitation", kwargs={ "identifier_w_vn_nr": self.submission.preprint.identifier_w_vn_nr, "profile_id": self.profile.id, @@ -2740,7 +2740,7 @@ class ConfigureRefereeInvitationForm(forms.Form): ), Div(Field("profile_email"), css_class="mx-4"), ButtonHolder( - Submit("submit", "Invite", css_class="btn btn-sm btn-primary"), + Submit("submit", "Draft Email", css_class="btn btn-sm btn-primary"), Button( "cancel", "Cancel", diff --git a/scipost_django/submissions/templates/submissions/_hx_configure_refereeing_invitation.html b/scipost_django/submissions/templates/submissions/_hx_customize_refereeing_invitation.html similarity index 100% rename from scipost_django/submissions/templates/submissions/_hx_configure_refereeing_invitation.html rename to scipost_django/submissions/templates/submissions/_hx_customize_refereeing_invitation.html diff --git a/scipost_django/submissions/templates/submissions/_hx_select_referee_table_row.html b/scipost_django/submissions/templates/submissions/_hx_select_referee_table_row.html index 23dc51d2d19016d3cc3952846aebcf4bdccd7056..2609ebf0bc50bede7b787c838352ec680e0995b7 100644 --- a/scipost_django/submissions/templates/submissions/_hx_select_referee_table_row.html +++ b/scipost_django/submissions/templates/submissions/_hx_select_referee_table_row.html @@ -47,20 +47,22 @@ hx-swap="afterend">Add Email</button> <button id="ref-inv-{{ profile.id }}-send-btn" type="button" class="me-2 btn btn-sm btn-{% if profile.warned_against_invitation %}warning{% else %}light{% endif %}" - {% if profile.warned_against_invitation %}hx-confirm="Do you want to send an invitation to this referee despite the warning?"{% endif %} - hx-get="{% url 'submissions:_hx_configure_refereeing_invitation' identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr profile_id=profile.id %}" hx-target="closest tr" - {% if not profile.can_be_sent_invitation %}disabled{% endif %} - hx-swap="afterend">Configure</button> + {% if profile.warned_against_invitation %}hx-confirm="Do you want to send an invitation to this referee despite the warning?"{% endif %} + hx-get="{% url 'submissions:_hx_customize_refereeing_invitation' identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr profile_id=profile.id %}" + hx-target="closest tr" + hx-swap="afterend" + {% if not profile.can_be_sent_invitation %}disabled{% endif %} + >Customize Invitation</button> <button id="ref-inv-{{ profile.id }}-send-btn" type="button" class="ms-auto btn btn-sm btn-{% if profile.warned_against_invitation %}warning{% else %}primary{% endif %}" - {% if profile.warned_against_invitation %}hx-confirm="Do you want to send an invitation to this referee despite the warning?"{% endif %} - hx-get="{% url 'submissions:_hx_quick_invite_referee' identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr profile_id=profile.id %}" hx-target="closest td" - {% if not profile.can_be_sent_invitation %}disabled{% endif %} - hx-swap="outerHTML">Quick Send</button> + {% if profile.warned_against_invitation %}hx-confirm="Do you want to send an invitation to this referee despite the warning?"{% endif %} + hx-get="{% url 'submissions:_hx_quick_invite_referee' identifier_w_vn_nr=submission.preprint.identifier_w_vn_nr profile_id=profile.id %}" + hx-target="closest td" + hx-swap="outerHTML" + {% if not profile.can_be_sent_invitation %}disabled{% endif %} + >Quick Send</button> </div> - {% if profile.already_invited %} - <div class="text-warning">This person has already been invited</div> - {% endif %} + {% if profile.already_invited %}<div class="text-warning">This person has already been invited</div>{% endif %} {% if not profile.accepts_refereeing_requests %} <div class="text-danger">This person does not accept refereeing requests</div> diff --git a/scipost_django/submissions/templates/submissions/select_referee.html b/scipost_django/submissions/templates/submissions/select_referee.html index d08b075a07b8b16922cb7bb4555f28629f4f1e44..b800d97cef090e5083d70dc809d76d4c2b802096 100644 --- a/scipost_django/submissions/templates/submissions/select_referee.html +++ b/scipost_django/submissions/templates/submissions/select_referee.html @@ -52,7 +52,7 @@ There are three actions you can perform on a referee: <ul> <li><strong>Add</strong> an <strong>Email</strong> to the referee's profile.</li> - <li><strong>Configure</strong> the invitation by selecting an alternative email address, whether auto-reminders are sent, and the exact email content.</li> + <li><strong>Customize</strong> the invitation by selecting an alternative email address, whether auto-reminders are sent, and the exact email content.</li> <li><strong>Quick Send</strong> an invitation to the primary email, with auto-reminders, and the default email content.</li> </ul> </p> diff --git a/scipost_django/submissions/urls/__init__.py b/scipost_django/submissions/urls/__init__.py index 67a35cafa3865d366a74d54bc58977bd2866d22f..c0987200895e461f126e76a18f52514e999684f8 100644 --- a/scipost_django/submissions/urls/__init__.py +++ b/scipost_django/submissions/urls/__init__.py @@ -355,9 +355,9 @@ urlpatterns = [ name="_hx_quick_invite_referee", ), path( - "refereeing/_hx_configure_invitation/<identifier:identifier_w_vn_nr>/<int:profile_id>", - views._hx_configure_refereeing_invitation, - name="_hx_configure_refereeing_invitation", + "refereeing/_hx_customize_invitation/<identifier:identifier_w_vn_nr>/<int:profile_id>", + views._hx_customize_refereeing_invitation, + name="_hx_customize_refereeing_invitation", ), path( "refereeing/_hx_add_referee_profile_email/<int:profile_id>", diff --git a/scipost_django/submissions/views/__init__.py b/scipost_django/submissions/views/__init__.py index 6b7f8f44a8d4adc1fce180e14e795a1f28ca82c6..f7d7fcad5753d89b68509a2c1cc0065ee064349c 100644 --- a/scipost_django/submissions/views/__init__.py +++ b/scipost_django/submissions/views/__init__.py @@ -1263,7 +1263,7 @@ def select_referee(request, identifier_w_vn_nr): return render(request, "submissions/select_referee.html", context) -def _hx_configure_refereeing_invitation(request, identifier_w_vn_nr, profile_id): +def _hx_customize_refereeing_invitation(request, identifier_w_vn_nr, profile_id): submission = get_object_or_404( Submission.objects.in_pool_filter_for_eic(request.user), preprint__identifier_w_vn_nr=identifier_w_vn_nr, @@ -1295,7 +1295,7 @@ def _hx_configure_refereeing_invitation(request, identifier_w_vn_nr, profile_id) ) return render( - request, "submissions/_hx_configure_refereeing_invitation.html", context + request, "submissions/_hx_customize_refereeing_invitation.html", context ) @@ -1332,7 +1332,7 @@ def _hx_add_referee_profile_email(request, profile_id): return response return render( - request, "submissions/_hx_configure_refereeing_invitation.html", {"form": form} + request, "submissions/_hx_customize_refereeing_invitation.html", {"form": form} )