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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt (-13 / +17 lines)
Lines 820-826 Link Here
820
    <script>
820
    <script>
821
        var table_settings = [% TablesSettings.GetTableSettings( 'admin', 'libraries', 'libraries', 'json' ) | $raw %];
821
        var table_settings = [% TablesSettings.GetTableSettings( 'admin', 'libraries', 'libraries', 'json' ) | $raw %];
822
        var calendarFirstDayOfWeek = '[% Koha.Preference('CalendarFirstDayOfWeek') | html %]';
822
        var calendarFirstDayOfWeek = '[% Koha.Preference('CalendarFirstDayOfWeek') | html %]';
823
    </script>
823
824
825
    <script>
824
        var libraries_table;
826
        var libraries_table;
825
        $(document).ready(function() {
827
        $(document).ready(function() {
826
828
Lines 983-1000 Link Here
983
                ],
985
                ],
984
                bKohaColumnsUseNames: true,
986
                bKohaColumnsUseNames: true,
985
            }, table_settings);
987
            }, table_settings);
986
987
            [% UNLESS library %]
988
                $("#Aform").on("submit", function( event ) {
989
                    if ( $("#branchcode").val().match(/\s/) ) {
990
                        event.preventDefault();
991
                        alert(_("The library code entered contains whitespace characters. Please remove any whitespace characters from the library code"));
992
                        return false;
993
                    } else {
994
                        return true;
995
                    }
996
                });
997
            [% END %]
998
        });
988
        });
999
989
1000
        $( ".expand-textarea" ).on("click", function(e){
990
        $( ".expand-textarea" ).on("click", function(e){
Lines 1035-1040 Link Here
1035
            $( "#" + target ).hide();
1025
            $( "#" + target ).hide();
1036
        });
1026
        });
1037
    </script>
1027
    </script>
1028
1029
    [% UNLESS library %]
1030
        <script>
1031
            $("#Aform").on("submit", function( event ) {
1032
                if ( $("#branchcode").val().match(/\s/) ) {
1033
                    event.preventDefault();
1034
                    alert(_("The library code entered contains whitespace characters. Please remove any whitespace characters from the library code"));
1035
                    return false;
1036
                } else {
1037
                    return true;
1038
                }
1039
            });
1040
        </script>
1041
    [% END %]
1042
1038
[% END %]
1043
[% END %]
1039
1044
1040
[% INCLUDE 'intranet-bottom.inc' %]
1045
[% INCLUDE 'intranet-bottom.inc' %]
1041
- 

Return to bug 41564