Sistema de Apoio ao Processo Legislativo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

36 lines
954 B

{% extends "crud/form.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block extra_js %}
<script type="text/javascript">
function disable_fields() {
$("#id_tipo_materia").val("");
$("#id_numero_materia").val("");
$("#id_ano_materia").val("");
$("#id_tipo_materia").attr("disabled", "disabled");
$("#id_numero_materia").attr("disabled", "disabled");
$("#id_ano_materia").attr("disabled", "disabled");
$("#id_data_envio").attr("disabled", "disabled");
}
function enable_fields() {
$("#id_tipo_materia").removeAttr('disabled');
$("#id_numero_materia").removeAttr('disabled');
$("#id_ano_materia").removeAttr('disabled');
}
$(function () {
disable_fields();
$("#id_tipo").change(function() {
if ($("#id_tipo").val() == 9) { // parecer
enable_fields();
}
else {
disable_fields();
}
});
});
</script>
{% endblock %}