1
0
forked from ScoDoc/ScoDoc
ScoDoc/app/static/js/user_form.js

31 lines
1.1 KiB
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");
} else {
// Le mot de passe doit être saisi
2021-10-15 15:12:46 +02:00
$("#tf_password").closest('tr').css("display", "table-row");
$("#tf_password2").closest('tr').css("display", "table-row");
}
} 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");
}
}
$(function () {
$("input[name='welcome:list']").click(function () {
2021-10-15 15:12:46 +02:00
refresh();
})
$("input[name='reset_password:list']").click(function () {
2021-10-15 15:12:46 +02:00
refresh();
})
refresh();
})