diff --git a/portal/static/portal/js/onboarding_school.js b/portal/static/portal/js/school.js similarity index 59% rename from portal/static/portal/js/onboarding_school.js rename to portal/static/portal/js/school.js index 2c46b482a..cd0b3e8a5 100644 --- a/portal/static/portal/js/onboarding_school.js +++ b/portal/static/portal/js/school.js @@ -1,8 +1,10 @@ $(document).ready(() => { - $('#form-row-county').hide(); + if ($("#id_country").val() !== 'GB') { + $('#form-row-county').hide(); + } $('#id_country').on('change', (event) => { - if (event.target.value == 'GB') { + if (event.target.value === 'GB') { $('#form-row-county').show(); } else { $('#form-row-county').hide(); diff --git a/portal/templates/portal/teach/dashboard.html b/portal/templates/portal/teach/dashboard.html index 96a825e90..b50266de1 100644 --- a/portal/templates/portal/teach/dashboard.html +++ b/portal/templates/portal/teach/dashboard.html @@ -235,10 +235,10 @@
Update details of your school or club
{{ update_school_form.non_field_errors }}
{% for field in update_school_form %} -
+
{{ field }} - {% if not field == update_school_form.country %} + {% if not field == update_school_form.country and not field == update_school_form.county %} {% endif %}
@@ -553,4 +553,7 @@
Delete account
+ + {% endblock content %} diff --git a/portal/templates/portal/teach/onboarding_school.html b/portal/templates/portal/teach/onboarding_school.html index 1eb69bc2c..6893f3582 100644 --- a/portal/templates/portal/teach/onboarding_school.html +++ b/portal/templates/portal/teach/onboarding_school.html @@ -61,6 +61,6 @@

Create a school or club

{% endif %} + src="{% static 'portal/js/school.js' %}"> {% endblock content %}