View | Details | Raw Unified | Return to bug 36844
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt (-9 / +7 lines)
Lines 144-154 Link Here
144
        <p>
144
        <p>
145
            [% IF Koha.Preference('ForceLibrarySelection') %]
145
            [% IF Koha.Preference('ForceLibrarySelection') %]
146
                <label for="branch" class="required">Library:</label>
146
                <label for="branch" class="required">Library:</label>
147
                <select name="branch" id="branch" class="input" tabindex="3" required="required">
147
                <select name="branch" id="set-library-branch" class="input" tabindex="3" required="required">
148
                <option value=""></option>
148
                <option value=""></option>
149
            [% ELSE %]
149
            [% ELSE %]
150
                <label for="branch">Library:</label>
150
                <label for="set-library-branch">Library:</label>
151
                <select name="branch" id="branch" class="input" tabindex="3">
151
                <select name="branch" id="set-library-branch" class="input" tabindex="3">
152
                <option value="">My library</option>
152
                <option value="">My library</option>
153
            [% END %]
153
            [% END %]
154
                [% FOREACH l IN Branches.all( unfiltered => 1 ) %]
154
                [% FOREACH l IN Branches.all( unfiltered => 1 ) %]
Lines 162-169 Link Here
162
162
163
        [% IF Koha.Preference('UseCirculationDesks') && Desks.all %]
163
        [% IF Koha.Preference('UseCirculationDesks') && Desks.all %]
164
        <p>
164
        <p>
165
            <label for="desk">Desk:</label>
165
            <label for="set-library-desk_id">Desk:</label>
166
            <select name="desk_id" id="desk_id" class="input" tabindex="3">
166
            <select name="desk_id" id="set-library-desk_id" class="input" tabindex="3">
167
                <option id="nodesk" value="">---</option>
167
                <option id="nodesk" value="">---</option>
168
                    [% FOREACH d IN Desks.all %]
168
                    [% FOREACH d IN Desks.all %]
169
                    <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" disabled >[% d.desk_name | html %]</option>
169
                    <option class="[% d.branchcode | html %]" value="[% d.desk_id | html %]" disabled >[% d.desk_name | html %]</option>
Lines 174-181 Link Here
174
174
175
        [% IF Koha.Preference('UseCashRegisters') && Registers.all().size %]
175
        [% IF Koha.Preference('UseCashRegisters') && Registers.all().size %]
176
        <p>
176
        <p>
177
            <label for="register_id">Cash register:</label>
177
            <label for="set-library-register_id">Cash register:</label>
178
            <select name="register_id" id="register_id" class="input" tabindex="4">
178
            <select name="register_id" id="set-library-register_id" class="input" tabindex="4">
179
                <option id="noregister" value="" selected="selected">Library default</option>
179
                <option id="noregister" value="" selected="selected">Library default</option>
180
                [% PROCESS options_for_registers registers => Registers.all() %]
180
                [% PROCESS options_for_registers registers => Registers.all() %]
181
            </select>
181
            </select>
Lines 255-262 Link Here
255
</div>
255
</div>
256
256
257
[% MACRO jsinclude BLOCK %]
257
[% MACRO jsinclude BLOCK %]
258
    [% Asset.js("js/desk_selection.js") | $raw %]
259
    [% Asset.js("js/register_selection.js") | $raw %]
260
    <script>
258
    <script>
261
        $(document).ready( function() {
259
        $(document).ready( function() {
262
            if ( document.location.hash ) {
260
            if ( document.location.hash ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt (-9 / +28 lines)
Lines 222-242 Link Here
222
     </div> <!-- /.row -->
222
     </div> <!-- /.row -->
223
223
224
[% MACRO jsinclude BLOCK %]
224
[% MACRO jsinclude BLOCK %]
225
    [% Asset.js("js/register_selection.js") | $raw %]
226
    [% INCLUDE 'datatables.inc' %]
225
    [% INCLUDE 'datatables.inc' %]
227
    <script id="js">
226
    [% INCLUDE 'calendar.inc' %]
227
    <script>
228
        actTotal = "";
228
        $(document).ready(function() {
229
        $(document).ready(function() {
229
            $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
230
            $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
230
                "pageLength": 50,
231
                "pageLength": 50,
231
                "pagingType": "full_numbers"
232
                "pagingType": "full_numbers"
232
            }));
233
            }));
233
        });
234
    </script>
235
    [% INCLUDE 'calendar.inc' %]
236
    <script>
237
        actTotal = "";
238
234
239
        $(document).ready(function() {
235
            $("#branch").on("change", function() {
236
                var selectedBranch = $("#branch").children(
237
                    "option:selected").val();
238
239
                $("#registerid").children().each(function() {
240
                    // default to no-register
241
                    if ($(this).is("#noregister")) {
242
                        $(this).prop("selected", true)
243
                    }
244
                    // display branch registers
245
                    else if ($(this).hasClass(selectedBranch)) {
246
                        $(this).prop("disabled", false);
247
                        $(this).show();
248
                        // default to branch default if there is one
249
                        if ($(this).hasClass("default")) {
250
                            $(this).prop("selected", true)
251
                        }
252
                    }
253
                    // hide non-branch registers
254
                    else {
255
                        $(this).hide();
256
                        $(this).prop("disabled", true);
257
                    }
258
                });
259
            });
240
260
241
            $('#frmCashRegister').submit(function() {
261
            $('#frmCashRegister').submit(function() {
242
                var isFormValid = true;
262
                var isFormValid = true;
243
- 

Return to bug 36844