Updates forms

This commit is contained in:
Mouse Reeve 2022-12-05 17:09:10 -08:00
parent b8e403ce59
commit a2874bf460
2 changed files with 18 additions and 12 deletions

View file

@ -51,28 +51,28 @@
{% trans "Allow invite requests" %} {% trans "Allow invite requests" %}
</label> </label>
</div> </div>
<div class="field">
<label class="label" for="id_invite_request_text">{% trans "Invite request text:" %}</label>
{{ form.invite_request_text }}
{% include 'snippets/form_errors.html' with errors_list=form.invite_request_text.errors id="desc_invite_request_text" %}
</div>
<div class="field"> <div class="field">
<label class="label" for="id_invite_requests_question"> <label class="label" for="id_invite_requests_question">
{{ form.invite_request_question }} {{ form.invite_request_question }}
{% trans "Set a question for invite requests" %} {% trans "Set a question for invite requests" %}
</label> </label>
</div> </div>
<div class="field"> <div class="field">
<label class="label" for="id_invite_question_text"> <label class="label" for="id_invite_question_text">
{% trans "Question:" %} {% trans "Question:" %}
{{ form.invite_question_text }} {{ form.invite_question_text }}
</label> </label>
</div> </div>
<div class="field"> <div class="field">
<label class="label" for="id_registration_closed_text">{% trans "Registration closed text:" %}</label> <label class="label" for="id_registration_closed_text">{% trans "Registration closed text:" %}</label>
{{ form.registration_closed_text }} {{ form.registration_closed_text }}
</div> </div>
<div class="field">
<label class="label" for="id_invite_request_text">{% trans "Invite request text:" %}</label>
{{ form.invite_request_text }}
{% include 'snippets/form_errors.html' with errors_list=form.invite_request_text.errors id="desc_invite_request_text" %}
</div>
</section> </section>
<footer class="block"> <footer class="block">

View file

@ -56,6 +56,10 @@
{{ form.invite_question_text }} {{ form.invite_question_text }}
</label> </label>
</div> </div>
{% else %}
<input type="hidden" name="invite_request_text" value="{{ form.invite_request_text.value }}">
<input type="hidden" name="invite_request_question" value="{{ form.invite_request_question.value }}">
<input type="hidden" name="invite_question_text" value="{{ form.invite_question_text.value }}">
{% endif %} {% endif %}
{% if not site.allow_invite_requests and not site.allow_registration %} {% if not site.allow_invite_requests and not site.allow_registration %}
@ -63,6 +67,8 @@
<label class="label" for="id_registration_closed_text">{% trans "Registration closed text:" %}</label> <label class="label" for="id_registration_closed_text">{% trans "Registration closed text:" %}</label>
{{ form.registration_closed_text }} {{ form.registration_closed_text }}
</div> </div>
{% else %}
<input type="hidden" name="registration_closed_text" value="{{ form.registration_closed_text.value }}">
{% endif %} {% endif %}
</section> </section>