mirror of https://github.com/interlegis/sapl.git
				
				
			
				 3 changed files with 22 additions and 2 deletions
			
			
		| @ -0,0 +1,20 @@ | |||
| {% 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 && ano){ | |||
|             $.get( | |||
|                 "{% url 'sapl.protocoloadm:atualizar_numero_documento' %}", | |||
|                 {tipo: tipo, ano:ano}, | |||
|                 function(data, status) { | |||
|                     $("#id_numero").val(data.numero); | |||
|                 }); | |||
|         } | |||
|     } | |||
|     $("#id_tipo").change(atualizar_numero_documento) | |||
|     $("#id_ano").change(atualizar_numero_documento) | |||
| </script> | |||
| {% endblock extra_js %} | |||
					Loading…
					
					
				
		Reference in new issue