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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-1 / +1 lines)
Lines 372-378 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 noEnterSubmit" size="20" name="patronlogin" />
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" />
378
                                            <fieldset class="action">
378
                                            <fieldset class="action">
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/global.js (-1 / +22 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
$("body").on("keypress", ".noEnterSubmit", function(e){
56
    return checkEnter(e);
57
});
58
59
// http://jennifermadden.com/javascript/stringEnterKeyDetector.html
60
function checkEnter(e){ //e is event object passed from function invocation
61
    var characterCode; // literal character code will be stored in this variable
62
    if(e && e.which){ //if which property of event object is supported (NN4)
63
        characterCode = e.which; //character code is contained in NN4's which property
64
    } else {
65
        characterCode = e.keyCode; //character code is contained in IE's keyCode property
66
    }
67
    if( characterCode == 13 //if generated character code is equal to ascii 13 (if enter key)
68
        && e.target.nodeName == "INPUT"
69
        && e.target.type != "submit" // Allow enter to submit using the submit button
70
    ){
71
        return false;
72
    } else {
73
        return true;
74
    }
75
}
76
55
// Adapted from https://gist.github.com/jnormore/7418776
77
// Adapted from https://gist.github.com/jnormore/7418776
56
function confirmModal(message, title, yes_label, no_label, callback) {
78
function confirmModal(message, title, yes_label, no_label, callback) {
57
    $("#bootstrap-confirm-box-modal").data('confirm-yes', false);
79
    $("#bootstrap-confirm-box-modal").data('confirm-yes', false);
58
- 

Return to bug 25349