mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 09:02:11 +01:00 
			
		
		
		
	Fix signup
This commit is contained in:
		@@ -14,35 +14,30 @@
 | 
				
			|||||||
    <form method="post">
 | 
					    <form method="post">
 | 
				
			||||||
        {% csrf_token %}
 | 
					        {% csrf_token %}
 | 
				
			||||||
        {{ form|crispy }}
 | 
					        {{ form|crispy }}
 | 
				
			||||||
        <div id="student_registration_form">
 | 
					        <div id="registration_form"></div>
 | 
				
			||||||
            {{ student_registration_form|crispy }}
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        <div id="coach_registration_form" class="d-none">
 | 
					 | 
				
			||||||
            {{ coach_registration_form|crispy }}
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        <button class="btn btn-success" type="submit">
 | 
					        <button class="btn btn-success" type="submit">
 | 
				
			||||||
            {% trans "Sign up" %}
 | 
					            {% trans "Sign up" %}
 | 
				
			||||||
        </button>
 | 
					        </button>
 | 
				
			||||||
    </form>
 | 
					    </form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div id="student_registration_form" class="d-none">
 | 
				
			||||||
 | 
					        {{ student_registration_form|crispy }}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div id="coach_registration_form" class="d-none">
 | 
				
			||||||
 | 
					        {{ coach_registration_form|crispy }}
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% block extrajavascript %}
 | 
					{% block extrajavascript %}
 | 
				
			||||||
    <script>
 | 
					    <script>
 | 
				
			||||||
    $(document).ready(function() {
 | 
					    $("#id_role").change(function() {
 | 
				
			||||||
        $("#id_role").change(function() {
 | 
					        let selected_role = $("#id_role :selected");
 | 
				
			||||||
            let selected_role = $("#id_role :selected");
 | 
					        if (selected_role.val() === "participant") {
 | 
				
			||||||
            if (selected_role.val() === "participant") {
 | 
					            $("#registration_form").html($("#student_registration_form").html());
 | 
				
			||||||
                $("#student_registration_form").removeClass("d-none");
 | 
					        }
 | 
				
			||||||
                $("#coach_registration_form").addClass("d-none");
 | 
					        else {
 | 
				
			||||||
            }
 | 
					            $("#registration_form").html($("#coach_registration_form").html());
 | 
				
			||||||
            else {
 | 
					        }
 | 
				
			||||||
                $("#student_registration_form").addClass("d-none");
 | 
					    }).change();
 | 
				
			||||||
                $("#coach_registration_form").removeClass("d-none");
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        $("#student_registration_form :input").removeAttr("required");
 | 
					 | 
				
			||||||
        $("#coach_registration_form :input").removeAttr("required");
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
    </script>
 | 
					    </script>
 | 
				
			||||||
{% endblock %}
 | 
					{% endblock %}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -687,7 +687,7 @@ msgstr "date de naissance"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#: apps/registration/models.py:128
 | 
					#: apps/registration/models.py:128
 | 
				
			||||||
msgid "address"
 | 
					msgid "address"
 | 
				
			||||||
msgstr "Adresse IP"
 | 
					msgstr "adresse"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#: apps/registration/models.py:134
 | 
					#: apps/registration/models.py:134
 | 
				
			||||||
msgid "phone number"
 | 
					msgid "phone number"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user