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

29 lines
806 B
JavaScript
Raw Normal View History

2020-09-26 16:19:37 +02:00
// Gestion formulaire UE externes
function toggle_new_ue_form(state) {
// active/desactive le formulaire "nouvelle UE"
var text_color;
if (state) {
text_color = "rgb(180,160,160)";
} else {
text_color = "rgb(0,0,0)";
}
2020-09-26 16:19:37 +02:00
$("#tf_extue_titre td:eq(1) input").prop("disabled", state);
$("#tf_extue_titre").css("color", text_color);
2020-09-26 16:19:37 +02:00
$("#tf_extue_acronyme td:eq(1) input").prop("disabled", state);
$("#tf_extue_acronyme").css("color", text_color);
2020-09-26 16:19:37 +02:00
$("#tf_extue_type td:eq(1) select").prop("disabled", state);
$("#tf_extue_type").css("color", text_color);
$("#tf_extue_ects td:eq(1) input").prop("disabled", state);
$("#tf_extue_ects").css("color", text_color);
2020-09-26 16:19:37 +02:00
}
function update_external_ue_form() {
var state = tf.existing_ue.value != "";
toggle_new_ue_form(state);
2020-09-26 16:19:37 +02:00
}