Skip to content

Commit ecdc064

Browse files
Add JavaScript to show/hide Review settings
1 parent 4d15593 commit ecdc064

File tree

1 file changed

+22
-1
lines changed
  • app/eventyay/eventyay_common/templates/eventyay_common/organizers/teams

1 file changed

+22
-1
lines changed

app/eventyay/eventyay_common/templates/eventyay_common/organizers/teams/team_edit.html

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,25 @@ <h1>{% translate "Create a new team" %}</h1>
6464
</button>
6565
</div>
6666
</form>
67-
{% endblock %}
67+
68+
<script>
69+
$(document).ready(function() {
70+
// Function to toggle review settings visibility
71+
function toggleReviewSettings() {
72+
if ($('#id_is_reviewer').is(':checked')) {
73+
$('#review-settings').show();
74+
} else {
75+
$('#review-settings').hide();
76+
}
77+
}
78+
79+
// Toggle on page load
80+
toggleReviewSettings();
81+
82+
// Toggle when checkbox changes
83+
$('#id_is_reviewer').change(function() {
84+
toggleReviewSettings();
85+
});
86+
});
87+
</script>
88+
{% endblock %}

0 commit comments

Comments
 (0)