ScoDoc-PE/app/static/js/user_form.js

31 lines
1023 B
JavaScript
Raw Normal View History

2021-10-15 15:12:46 +02:00
function refresh() {
if ($("input[name='welcome:list']").is(":checked")) {
$("input[name='reset_password:list']")
.closest("tr")
.css("display", "table-row");
if ($("input[name='reset_password:list']").is(":checked")) {
$("#tf_password").closest("tr").css("display", "none");
$("#tf_password2").closest("tr").css("display", "none");
2021-10-15 15:12:46 +02:00
} else {
// Le mot de passe doit être saisi
$("#tf_password").closest("tr").css("display", "table-row");
$("#tf_password2").closest("tr").css("display", "table-row");
2021-10-15 15:12:46 +02:00
}
} else {
// Le mot de passe doit être saisi
$("input[name='reset_password:list']").closest("tr").css("display", "none");
$("#tf_password").closest("tr").css("display", "table-row");
$("#tf_password2").closest("tr").css("display", "table-row");
}
2021-10-15 15:12:46 +02:00
}
$(function () {
$("input[name='welcome:list']").click(function () {
2021-10-15 15:12:46 +02:00
refresh();
});
$("input[name='reset_password:list']").click(function () {
refresh();
});
refresh();
});