SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 7246039b authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Merge branch 'master' into dev_JSC_20221207_edadmin_all_in_pool

parents a97962c0 78f41b82
No related branches found
No related tags found
No related merge requests found
{% include 'colleges/_hx_nominations_invitations_tablist.html' with selected=selected %} {% include 'colleges/_hx_nominations_invitations_tablist.html' with selected=selected %}
{% for invitation in invitations.all %} {% for invitation in invitations.all %}
<details class="m-2 mt-4 border border-2"> <details id="invitation-{{ invitation.id }}-details"
class="m-2 mt-4 border border-2"
>
<summary class="bg-light p-2">{{ invitation }}</summary> <summary class="bg-light p-2">{{ invitation }}</summary>
<details class="m-2 mt-4 border"> <details class="m-2 mt-4 border">
<summary class="p-2 bg-light">Events for this nomination</summary> <summary class="p-2 bg-light">Events for this nomination</summary>
...@@ -30,7 +32,7 @@ ...@@ -30,7 +32,7 @@
<h4>Update the response to this invitation:</h4> <h4>Update the response to this invitation:</h4>
<div id="invitation-{{ invitation.id }}-update-response" <div id="invitation-{{ invitation.id }}-update-response"
hx-get="{% url 'colleges:_hx_fellowship_invitation_update_response' invitation_id=invitation.id %}" hx-get="{% url 'colleges:_hx_fellowship_invitation_update_response' invitation_id=invitation.id %}"
hx-trigger="revealed" hx-trigger="toggle from:#invitation-{{ invitation.id }}-details"
hx-target="this" hx-target="this"
> >
</div> </div>
......
{% for nomination in nominations_needing_specialties %} {% for nomination in nominations_needing_specialties %}
<details class="border border-2 mt-4"> <details id="nomination-{{ nomination.id }}-specialties"
class="border border-2 mt-4"
>
<summary class="p-2 bg-light">{{ nomination }}</summary> <summary class="p-2 bg-light">{{ nomination }}</summary>
<div id="profile-{{ nomination.profile.id }}-specialties" <div id="profile-{{ nomination.profile.id }}-specialties"
class="p-2 mt-2" class="p-2 mt-2"
hx-get="{% url 'profiles:_hx_profile_specialties' profile_id=nomination.profile.id %}" hx-get="{% url 'profiles:_hx_profile_specialties' profile_id=nomination.profile.id %}"
hx-trigger="revealed" hx-trigger="toggle from:#nomination-{{ nomination.id }}-specialties"
> >
</div> </div>
<button class="btn btn-success text-white m-2" <button class="btn btn-success text-white m-2"
......
...@@ -84,7 +84,9 @@ ...@@ -84,7 +84,9 @@
</details> </details>
{% if "edadmin" in user_roles or "active_senior_fellow" in user_roles %} {% if "edadmin" in user_roles or "active_senior_fellow" in user_roles %}
<details class="border border-danger border-2 mt-4"> <details id="ensure-specialties-details"
class="border border-danger border-2 mt-4"
>
<summary class="bg-danger bg-opacity-10 p-2"> <summary class="bg-danger bg-opacity-10 p-2">
<h2 class="ms-2"> <h2 class="ms-2">
<strong class="text-danger">EdAdmin/Senior Fellows</strong>: <strong class="text-danger">EdAdmin/Senior Fellows</strong>:
...@@ -93,21 +95,23 @@ ...@@ -93,21 +95,23 @@
<div class="p-2 mt-2"> <div class="p-2 mt-2">
<div id="nominations_needing_specialties" <div id="nominations_needing_specialties"
hx-get="{% url 'colleges:_hx_nominations_needing_specialties' %}" hx-get="{% url 'colleges:_hx_nominations_needing_specialties' %}"
hx-trigger="revealed" hx-trigger="toggle from:#ensure-specialties-details"
> >
</div> </div>
</div> </div>
</details> </details>
{% endif %} {% endif %}
<details class="border border-primary border-2 mt-4"> <details id="voting-details"
class="border border-primary border-2 mt-4"
>
<summary class="bg-primary bg-opacity-10 p-2"> <summary class="bg-primary bg-opacity-10 p-2">
<h2 class="ms-2 text-primary">Vote{% if 'edadmin' in user_roles %}&emsp;<span class="text-danger">(EdAdmin: manage voting)</span>{% endif %}</h2> <h2 class="ms-2 text-primary">Vote{% if 'edadmin' in user_roles %}&emsp;<span class="text-danger">(EdAdmin: manage voting)</span>{% endif %}</h2>
</summary> </summary>
<div class="p-2 mt-2"> <div class="p-2 mt-2">
<div id="voting_tablist" <div id="voting_tablist"
hx-get="{% url 'colleges:_hx_voting_rounds' %}?tab={% if 'edadmin' in user_roles %}ongoing{% else %}ongoing-vote_required{% endif %}" hx-get="{% url 'colleges:_hx_voting_rounds' %}?tab={% if 'edadmin' in user_roles %}ongoing{% else %}ongoing-vote_required{% endif %}"
hx-trigger="load" hx-trigger="toggle from:#voting-details"
hx-target="this" hx-target="this"
hx-swap="innerHTML" hx-swap="innerHTML"
> >
...@@ -116,7 +120,9 @@ ...@@ -116,7 +120,9 @@
</details> </details>
{% if "edadmin" in user_roles %} {% if "edadmin" in user_roles %}
<details class="border border-success border-2 mt-4"> <details id="invitations-details"
class="border border-success border-2 mt-4"
>
<summary class="bg-success bg-opacity-10 p-2"> <summary class="bg-success bg-opacity-10 p-2">
<h2 class="ms-2"> <h2 class="ms-2">
<strong class="text-success">EdAdmin</strong>: <strong class="text-success">EdAdmin</strong>:
...@@ -125,7 +131,7 @@ ...@@ -125,7 +131,7 @@
<div class="p-2 mt-2"> <div class="p-2 mt-2">
<div id="invitations_tablist" <div id="invitations_tablist"
hx-get="{% url 'colleges:_hx_nominations_invitations' %}?response=notyetinvited" hx-get="{% url 'colleges:_hx_nominations_invitations' %}?response=notyetinvited"
hx-trigger="load" hx-trigger="toggle from:#invitations-details"
hx-target="this" hx-target="this"
hx-swap="innerHTML" hx-swap="innerHTML"
> >
...@@ -134,14 +140,16 @@ ...@@ -134,14 +140,16 @@
</details> </details>
{% endif %} {% endif %}
<details class="border border-2 mt-4"> <details id="list-details"
class="border border-2 mt-4"
>
<summary class="bg-light p-2"> <summary class="bg-light p-2">
<h2 class="ms-2">List / filter</h2> <h2 class="ms-2">List / filter</h2>
</summary> </summary>
<div class="p-2 mt-2"> <div class="p-2 mt-2">
<form <form
hx-post="{% url 'colleges:_hx_nominations' %}" hx-post="{% url 'colleges:_hx_nominations' %}"
hx-trigger="load, keyup delay:500ms, change" hx-trigger="toggle from:#list-details, keyup delay:500ms, change"
hx-target="#search-nominations-results" hx-target="#search-nominations-results"
hx-indicator="#indicator-search" hx-indicator="#indicator-search"
> >
......
...@@ -960,7 +960,6 @@ def _hx_fellowship_invitation_update_response(request, invitation_id): ...@@ -960,7 +960,6 @@ def _hx_fellowship_invitation_update_response(request, invitation_id):
form.cleaned_data["response"], form.cleaned_data["response"],
) )
) )
context = {"invitation": invitation, "form": form,} context = {"invitation": invitation, "form": form,}
return render( return render(
request, request,
......
...@@ -204,7 +204,7 @@ class RegistrationForm(forms.Form): ...@@ -204,7 +204,7 @@ class RegistrationForm(forms.Form):
) )
profile = Profile.objects.filter( profile = Profile.objects.filter(
emails__email__icontains=self.cleaned_data["email"] emails__email__iexact=self.cleaned_data["email"]
).first() ).first()
try: try:
if profile and profile.contributor: if profile and profile.contributor:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment