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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-3 / +3 lines)
Lines 372-387 Link Here
372
                                        [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
372
                                        [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
373
                                            <legend>Log in to your account</legend>
373
                                            <legend>Log in to your account</legend>
374
                                            <label for="patronlogin">Login:</label>
374
                                            <label for="patronlogin">Login:</label>
375
                                            <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
375
                                            <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" onkeypress="return checkEnter(event)" />
376
                                            <label for="patronpw">Password:</label>
376
                                            <label for="patronpw">Password:</label>
377
                                            <input type="password" id="patronpw" size="20" name="patronpw" />
377
                                            <input type="password" id="patronpw" size="20" name="patronpw" onkeypress="return checkEnter(event)" />
378
                                            <fieldset class="action">
378
                                            <fieldset class="action">
379
                                                <button type="submit" class="btn">Log in</button>
379
                                                <button type="submit" class="btn">Log in</button>
380
                                            </fieldset>
380
                                            </fieldset>
381
                                        [% ELSE %]
381
                                        [% ELSE %]
382
                                            <div class="input-append">
382
                                            <div class="input-append">
383
                                                <label for="patronid">Please enter your card number:</label>
383
                                                <label for="patronid">Please enter your card number:</label>
384
                                                <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
384
                                                <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" onkeypress="return checkEnter(event)" />
385
                                                <button type="submit" class="btn">Submit</button>
385
                                                <button type="submit" class="btn">Submit</button>
386
                                            </div>
386
                                            </div>
387
                                        [% END %]
387
                                        [% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/global.js (-1 / +18 lines)
Lines 52-57 function suffixOf (s, tok) { Link Here
52
    return s.substring(index + 1);
52
    return s.substring(index + 1);
53
}
53
}
54
54
55
// http://jennifermadden.com/javascript/stringEnterKeyDetector.html
56
function checkEnter(e){ //e is event object passed from function invocation
57
    var characterCode; // literal character code will be stored in this variable
58
    if(e && e.which){ //if which property of event object is supported (NN4)
59
        characterCode = e.which; //character code is contained in NN4's which property
60
    } else {
61
        characterCode = e.keyCode; //character code is contained in IE's keyCode property
62
    }
63
    if( characterCode == 13 //if generated character code is equal to ascii 13 (if enter key)
64
        && e.target.nodeName == "INPUT"
65
        && e.target.type != "submit" // Allow enter to submit using the submit button
66
    ){
67
        return false;
68
    } else {
69
        return true;
70
    }
71
}
72
55
// Adapted from https://gist.github.com/jnormore/7418776
73
// Adapted from https://gist.github.com/jnormore/7418776
56
function confirmModal(message, title, yes_label, no_label, callback) {
74
function confirmModal(message, title, yes_label, no_label, callback) {
57
    $("#bootstrap-confirm-box-modal").data('confirm-yes', false);
75
    $("#bootstrap-confirm-box-modal").data('confirm-yes', false);
58
- 

Return to bug 25349