mirror of https://github.com/interlegis/sapl.git
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.
23 lines
719 B
23 lines
719 B
{% extends "crud/form.html" %}
|
|
{% load i18n %}
|
|
{% block extra_js %}
|
|
<script language="Javascript">
|
|
function atualizar_numero_documento(){
|
|
var tipo = $("#id_tipo").val()
|
|
var ano = $("#id_ano").val()
|
|
if (tipo){
|
|
$.get(
|
|
"{% url 'sapl.protocoloadm:atualizar_numero_documento' %}",
|
|
{tipo: tipo, ano:ano},
|
|
function(data, status) {
|
|
$("#id_numero").val(data.numero);
|
|
$("#id_ano").val(data.ano);
|
|
});
|
|
}
|
|
}
|
|
var fields = ["#id_tipo", "#id_ano"]
|
|
for (i = 0; i < fields.length; i++) {
|
|
$(fields[i]).change(atualizar_numero_documento);
|
|
}
|
|
</script>
|
|
{% endblock %}
|
|
|