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

(-)a/koha-tmpl/intranet-tmpl/prog/css/login.css (-4 / +4 lines)
Lines 96-101 label { Link Here
96
	padding: 3px;
96
	padding: 3px;
97
}
97
}
98
98
99
#login select {
100
    width: 98%;
101
}
102
99
#login ul {
103
#login ul {
100
	list-style: none;
104
	list-style: none;
101
	margin: 0;
105
	margin: 0;
Lines 113-122 label { Link Here
113
	width: 97%;
117
	width: 97%;
114
}
118
}
115
119
116
#login #branch {
117
	width : 99%;
118
}
119
120
#login #submit, #login .button {
120
#login #submit, #login .button {
121
	font-size: 1.4em;
121
	font-size: 1.4em;
122
	padding : .3em .6em;
122
	padding : .3em .6em;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt (+12 lines)
Lines 1-7 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% USE Koha %]
3
[% USE Koha %]
3
[% USE Branches %]
4
[% USE Branches %]
4
[% USE Categories %]
5
[% USE Categories %]
6
[% USE Registers %]
5
[% SET footerjs = 1 %]
7
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
8
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; 
9
<title>Koha &rsaquo; 
Lines 83-88 Link Here
83
    </p>
85
    </p>
84
[% END %]
86
[% END %]
85
87
88
[% IF Koha.Preference('UseCashRegisters') %]
89
    <p>
90
        <label for="register_id">Cash register:</label>
91
        <select name="register_id" id="register_id" class="input" tabindex="4">
92
            [% PROCESS options_for_registers registers => Registers.all() %]
93
        </select>
94
    </p>
95
[% END %]
96
86
<!-- <p><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />Remember me</label></p> -->
97
<!-- <p><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="3" />Remember me</label></p> -->
87
98
88
<p class="submit"><input id="submit" type="submit" value="Login" tabindex="4" /></p>
99
<p class="submit"><input id="submit" type="submit" value="Login" tabindex="4" /></p>
Lines 121-126 Link Here
121
</div>
132
</div>
122
133
123
[% MACRO jsinclude BLOCK %]
134
[% MACRO jsinclude BLOCK %]
135
    [% Asset.js("js/register_selection.js") | $raw %]
124
    <script type="text/javascript">
136
    <script type="text/javascript">
125
        $(document).ready( function() {
137
        $(document).ready( function() {
126
            if ( document.location.hash ) {
138
            if ( document.location.hash ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt (-30 / +3 lines)
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' %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/register_selection.js (-1 / +27 lines)
Line 0 Link Here
0
- 
1
$(document).ready(function() {
2
    $("#branch").on("change", function() {
3
        var selectedBranch = $("#branch").children(
4
            "option:selected").val();
5
6
        $("#register_id").children().each(function() {
7
            // default to no-register
8
            if ($(this).is("#noregister")) {
9
                $(this).prop("selected", true)
10
            }
11
            // display branch registers
12
            else if ($(this).hasClass(selectedBranch)) {
13
                $(this).prop("disabled", false);
14
                $(this).show();
15
                // default to branch default if there is one
16
                if ($(this).hasClass("default")) {
17
                    $(this).prop("selected", true)
18
                }
19
            }
20
            // hide non-branch registers
21
            else {
22
                $(this).hide();
23
                $(this).prop("disabled", true);
24
            }
25
        });
26
    });
27
});

Return to bug 24786