Lines 1-3
Link Here
|
|
|
1 |
[% USE raw %] |
2 |
[% USE Asset %] |
1 |
[% USE Branches %] |
3 |
[% USE Branches %] |
2 |
[% USE Registers %] |
4 |
[% USE Registers %] |
3 |
[% USE Koha %] |
5 |
[% USE Koha %] |
Lines 118-153
Updated:<ul>
Link Here
|
118 |
</div> <!-- /.row --> |
120 |
</div> <!-- /.row --> |
119 |
|
121 |
|
120 |
[% MACRO jsinclude BLOCK %] |
122 |
[% MACRO jsinclude BLOCK %] |
121 |
<script> |
123 |
[% Asset.js("js/register_selection.js") | $raw %] |
122 |
$(document).ready(function() { |
|
|
123 |
$("#branch").on("change", function() { |
124 |
var selectedBranch = $("#branch").children( |
125 |
"option:selected").val(); |
126 |
|
127 |
$("#register_id").children().each(function() { |
128 |
// default to no-register |
129 |
if ($(this).is("#noregister")) { |
130 |
$(this).prop("selected", true) |
131 |
} |
132 |
// display branch registers |
133 |
else if ($(this).hasClass(selectedBranch)) { |
134 |
$(this).prop("disabled", false); |
135 |
$(this).show(); |
136 |
// default to branch default if there is one |
137 |
if ($(this).hasClass("default")) { |
138 |
$(this).prop("selected", true) |
139 |
} |
140 |
} |
141 |
// hide non-branch registers |
142 |
else |
143 |
{ |
144 |
$(this).hide(); |
145 |
$(this).prop("disabled", true); |
146 |
} |
147 |
}); |
148 |
}); |
149 |
}); |
150 |
</script> |
151 |
[% END %] |
124 |
[% END %] |
152 |
|
125 |
|
153 |
[% INCLUDE 'intranet-bottom.inc' %] |
126 |
[% INCLUDE 'intranet-bottom.inc' %] |