|
Lines 143-178
Updated:<ul>
Link Here
|
| 143 |
|
143 |
|
| 144 |
[% MACRO jsinclude BLOCK %] |
144 |
[% MACRO jsinclude BLOCK %] |
| 145 |
[% Asset.js("js/desk_selection.js") | $raw %] |
145 |
[% Asset.js("js/desk_selection.js") | $raw %] |
| 146 |
<script> |
146 |
[% Asset.js("js/register_selection.js") | $raw %] |
| 147 |
$(document).ready(function() { |
|
|
| 148 |
$("#branch").on("change", function() { |
| 149 |
var selectedBranch = $("#branch").children( |
| 150 |
"option:selected").val(); |
| 151 |
|
| 152 |
$("#register_id").children().each(function() { |
| 153 |
// default to no-register |
| 154 |
if ($(this).is("#noregister")) { |
| 155 |
$(this).prop("selected", true) |
| 156 |
} |
| 157 |
// display branch registers |
| 158 |
else if ($(this).hasClass(selectedBranch)) { |
| 159 |
$(this).prop("disabled", false); |
| 160 |
$(this).show(); |
| 161 |
// default to branch default if there is one |
| 162 |
if ($(this).hasClass("default")) { |
| 163 |
$(this).prop("selected", true) |
| 164 |
} |
| 165 |
} |
| 166 |
// hide non-branch registers |
| 167 |
else |
| 168 |
{ |
| 169 |
$(this).hide(); |
| 170 |
$(this).prop("disabled", true); |
| 171 |
} |
| 172 |
}); |
| 173 |
}); |
| 174 |
}); |
| 175 |
</script> |
| 176 |
[% END %] |
147 |
[% END %] |
| 177 |
|
148 |
|
| 178 |
[% INCLUDE 'intranet-bottom.inc' %] |
149 |
[% INCLUDE 'intranet-bottom.inc' %] |