blob: 169b2757e9dae4b96fb7242706e82b90757247d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
{% extends "ishtar/wizard/wizard_person_orga.html" %}
{% load replace_underscore %}
{% block corporation %}
<tr class='required'>
<th>{{ wizard.form.corporation_general_contractor.label_tag }}</th>
<td> {{ wizard.form.corporation_general_contractor.errors }}{{wizard.form.corporation_general_contractor|safe}}</td>
</tr>
{% endblock %}
{% block natural %}
<tr class='required'>
<th>{{ wizard.form.general_contractor.label_tag }}</th>
<td> {{ wizard.form.general_contractor.errors }}{{wizard.form.general_contractor|safe}}</td>
</tr>
{% endblock %}
{% block extra_head_po %}
<script type='text/javascript'>
$(function() {
var corp_id = '#id_{{wizard.form.prefix}}-corporation_general_contractor';
var pers_id = "#id_select_{{wizard.form.prefix}}-general_contractor" ;
var pers_select_id = "#id_select_{{wizard.form.prefix}}-general_contractor" ;
$(corp_id).change(
function(){
$(pers_select_id).autocomplete(
"option", "source",
source_{{wizard.form.prefix|replace_underscore}}_general_contractor
+ $(corp_id).val() + '/');
$(pers_select_id).val("");
$(pers_id).val("");
if ($(corp_id).val()){
$(pers_select_id).prop("disabled", false);
} else {
$(pers_select_id).prop("disabled", true);
}
});
});
</script>
{% endblock %}
|