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

(-)a/Koha/KeyboardShortcut.pm (+44 lines)
Line 0 Link Here
1
package Koha::KeyboardShortcut;
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it under the
6
# terms of the GNU General Public License as published by the Free Software
7
# Foundation; either version 3 of the License, or (at your option) any later
8
# version.
9
#
10
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License along
15
# with Koha; if not, write to the Free Software Foundation, Inc.,
16
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18
use Modern::Perl;
19
20
use Carp;
21
22
use Koha::Database;
23
24
use base qw(Koha::Object);
25
26
=head1 NAME
27
28
Koha::KeyboardShortcut - Koha KeyboardShortcut Object class
29
30
=head1 API
31
32
=head2 Class Methods
33
34
=cut
35
36
=head3 type
37
38
=cut
39
40
sub _type {
41
    return 'KeyboardShortcut';
42
}
43
44
1;
(-)a/Koha/KeyboardShortcuts.pm (+50 lines)
Line 0 Link Here
1
package Koha::KeyboardShortcuts;
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it under the
6
# terms of the GNU General Public License as published by the Free Software
7
# Foundation; either version 3 of the License, or (at your option) any later
8
# version.
9
#
10
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License along
15
# with Koha; if not, write to the Free Software Foundation, Inc.,
16
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18
use Modern::Perl;
19
20
use Carp;
21
22
use Koha::Database;
23
24
use Koha::KeyboardShortcut;
25
26
use base qw(Koha::Objects);
27
28
=head1 NAME
29
30
Koha::KeyboardShortcuts - Koha KeyboardShortcut Object set class
31
32
=head1 API
33
34
=head2 Class Methods
35
36
=cut
37
38
=head3 type
39
40
=cut
41
42
sub _type {
43
    return 'KeyboardShortcut';
44
}
45
46
sub object_class {
47
    return 'Koha::KeyboardShortcut';
48
}
49
50
1;
(-)a/cataloguing/editor.pl (+8 lines)
Lines 31-36 use DBIx::Class::ResultClass::HashRefInflator; Link Here
31
use Koha::Database;
31
use Koha::Database;
32
use Koha::MarcSubfieldStructures;
32
use Koha::MarcSubfieldStructures;
33
use Koha::BiblioFrameworks;
33
use Koha::BiblioFrameworks;
34
use Koha::KeyboardShortcuts;
34
35
35
my $input = CGI->new;
36
my $input = CGI->new;
36
37
Lines 51-56 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
51
52
52
my $schema = Koha::Database->new->schema;
53
my $schema = Koha::Database->new->schema;
53
54
55
my @keyboard_shortcuts = Koha::KeyboardShortcuts->search();
56
57
# Keyboard shortcuts
58
$template->param(
59
    shortcuts => \@keyboard_shortcuts,
60
);
61
54
# Available import batches
62
# Available import batches
55
$template->{VARS}->{editable_batches} = [ $schema->resultset('ImportBatch')->search(
63
$template->{VARS}->{editable_batches} = [ $schema->resultset('ImportBatch')->search(
56
    {
64
    {
(-)a/installer/data/mysql/atomicupdate/add_keyboard_shortcuts.perl (+30 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    unless ( TableExists( 'keyboard_shortcuts' ) ) {
4
        $dbh->do(q|
5
            CREATE TABLE keyboard_shortcuts (
6
            shortcut_name varchar(80) NOT NULL,
7
            shortcut_keys varchar(80) NOT NULL,
8
            shortcut_desc varchar(200) NOT NULL,
9
            PRIMARY KEY (shortcut_name)
10
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;|
11
        );
12
    }
13
    $dbh->do(q|
14
        INSERT IGNORE INTO keyboard_shortcuts (shortcut_name, shortcut_keys, shortcut_desc) VALUES
15
        ("insert_copyright","Alt-C","Insert copyright symbol (©)"),
16
        ("insert_copyright_sound","Alt-P","Insert copyright symbol (℗) (sound recordings)"),
17
        ("insert_delimiter","Ctrl-D","Insert delimiter (‡)"),
18
        ("subfield_help","Ctrl-H","Get help on current subfield"),
19
        ("link_authorities","Shift-Ctrl-L","Link field to authorities"),
20
        ("delete_field","Ctrl-X","Delete current field"),
21
        ("delete_subfield","Shift-Ctrl-X","Delete current subfield"),
22
        ("new_line","Enter","New field on next line"),
23
        ("line_break","Shift-Enter","Insert line break"),
24
        ("next_position","Tab","Move to next position"),
25
        ("prev_position","Shift-Tab","Move to previous position")
26
        ;|
27
    );
28
    SetVersion( $DBversion );
29
    print "Upgrade to $DBversion done (Bug XXXXX - Add keyboard_shortcuts table)\n";
30
}
(-)a/installer/data/mysql/en/mandatory/keyboard_shortcuts.sql (+35 lines)
Line 0 Link Here
1
--
2
-- Default keyboard shortcuts
3
-- for Koha.
4
--
5
-- Copyright (C) 2007 LiblimeA
6
-- Copyright 2018 Koha Development Team
7
--
8
-- This file is part of Koha.
9
--
10
-- Koha is free software; you can redistribute it and/or modify it under the
11
-- terms of the GNU General Public License as published by the Free Software
12
-- Foundation; either version 2 of the License, or (at your option) any later
13
-- version.
14
--
15
-- Koha is distributed in the hope that it will be useful, but WITHOUT ANY
16
-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
17
-- A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
18
--
19
-- You should have received a copy of the GNU General Public License along
20
-- with Koha; if not, write to the Free Software Foundation, Inc.,
21
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22
23
-- keyboard shortcuts
24
INSERT INTO keyboard_shortcuts (shortcut_name, shortcut_keys, shortcut_desc) VALUES
25
    ("insert_copyright","Alt-C","Insert copyright symbol (©)"),
26
    ("insert_copyright_sound","Alt-P","Insert copyright symbol (℗) (sound recordings)"),
27
    ("insert_delimiter","Ctrl-D","Insert delimiter (‡)"),
28
    ("subfield_help","Ctrl-H","Get help on current subfield"),
29
    ("link_authorities","Shift-Ctrl-L","Link field to authorities"),
30
    ("delete_field","Ctrl-X","Delete current field"),
31
    ("delete_subfield","Shift-Ctrl-X","Delete current subfield"),
32
    ("new_line","Enter","New field on next line"),
33
    ("line_break","Shift-Enter","Insert line break"),
34
    ("next_position","Tab","Move to next position"),
35
    ("prev_position","Shift-Tab","Move to previous position");
(-)a/installer/data/mysql/en/mandatory/keyboard_shortcuts.txt (+1 lines)
Line 0 Link Here
1
Default keyboard shorcuts
(-)a/installer/data/mysql/kohastructure.sql (+12 lines)
Lines 4324-4329 CREATE TABLE stockrotationitems ( Link Here
4324
      ON UPDATE CASCADE ON DELETE CASCADE
4324
      ON UPDATE CASCADE ON DELETE CASCADE
4325
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4325
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4326
4326
4327
--
4328
-- Table structure for table `keyboardshortcuts`
4329
--
4330
4331
DROP TABLE IF EXISTS `keyboard_shortcuts`;
4332
CREATE TABLE keyboard_shortcuts (
4333
shortcut_name varchar(80) NOT NULL,
4334
shortcut_keys varchar(80) NOT NULL,
4335
shortcut_desc varchar(200) NOT NULL,
4336
PRIMARY KEY (shortcut_name)
4337
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
4338
4327
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4339
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
4328
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4340
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
4329
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
4341
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
(-)a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js (-25 / +23 lines)
Lines 135-170 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
135
            return [];
135
            return [];
136
        }
136
        }
137
    }
137
    }
138
    var _editorKeys = {};
138
139
139
    var _editorKeys = {
140
    _editorKeys[insert_copyright] =  function( cm ) {
140
        'Alt-C': function( cm ) {
141
            cm.replaceRange( '©', cm.getCursor() );
141
            cm.replaceRange( '©', cm.getCursor() );
142
        },
142
        }
143
143
144
        'Alt-P': function( cm ) {
144
    _editorKeys[insert_copyright_sound] = function( cm ) {
145
            cm.replaceRange( '℗', cm.getCursor() );
145
            cm.replaceRange( '℗', cm.getCursor() );
146
        },
146
        }
147
147
148
        Enter: function( cm ) {
148
    _editorKeys[new_line] = function( cm ) {
149
            var cursor = cm.getCursor();
149
            var cursor = cm.getCursor();
150
            cm.replaceRange( '\n', { line: cursor.line }, null, 'marcAware' );
150
            cm.replaceRange( '\n', { line: cursor.line }, null, 'marcAware' );
151
            cm.setCursor( { line: cursor.line + 1, ch: 0 } );
151
            cm.setCursor( { line: cursor.line + 1, ch: 0 } );
152
        },
152
        }
153
153
154
        'Shift-Enter': function( cm ) {
154
    _editorKeys[line_break] =  function( cm ) {
155
            var cur = cm.getCursor();
155
            var cur = cm.getCursor();
156
156
157
            cm.replaceRange( "\n", cur, null );
157
            cm.replaceRange( "\n", cur, null );
158
        },
158
        }
159
159
160
        'Ctrl-X': function( cm ) {
160
    _editorKeys[delete_field] =  function( cm ) {
161
            // Delete line (or cut)
161
            // Delete line (or cut)
162
            if ( cm.somethingSelected() ) return true;
162
            if ( cm.somethingSelected() ) return true;
163
163
164
            cm.execCommand('deleteLine');
164
            cm.execCommand('deleteLine');
165
        },
165
        }
166
166
167
        'Shift-Ctrl-L': function( cm ) {
167
    _editorKeys[link_authorities] =  function( cm ) {
168
            // Launch the auth search popup
168
            // Launch the auth search popup
169
            var field = cm.marceditor.getCurrentField();
169
            var field = cm.marceditor.getCurrentField();
170
170
Lines 186-203 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
186
            }
186
            }
187
            newin=window.open("../authorities/auth_finder.pl?source=biblio&authtypecode="+authtype+"&index="+index+"&value_mainstr="+encodeURI(mainmainstring)+"&value_main="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes');
187
            newin=window.open("../authorities/auth_finder.pl?source=biblio&authtypecode="+authtype+"&index="+index+"&value_mainstr="+encodeURI(mainmainstring)+"&value_main="+encodeURI(mainstring), "_blank",'width=700,height=550,toolbar=false,scrollbars=yes');
188
188
189
        },
189
        }
190
190
191
        'Shift-Ctrl-X': function( cm ) {
191
    _editorKeys[delete_subfield] = function( cm ) {
192
            // Delete subfield
192
            // Delete subfield
193
            var field = cm.marceditor.getCurrentField();
193
            var field = cm.marceditor.getCurrentField();
194
            if ( !field ) return;
194
            if ( !field ) return;
195
195
196
            var subfield = field.getSubfieldAt( cm.getCursor().ch );
196
            var subfield = field.getSubfieldAt( cm.getCursor().ch );
197
            if ( subfield ) subfield.delete();
197
            if ( subfield ) subfield.delete();
198
        },
198
        }
199
199
200
        Tab: function( cm ) {
200
     _editorKeys[next_position] =  function( cm ) {
201
            // Move through parts of tag/fixed fields
201
            // Move through parts of tag/fixed fields
202
            var positions = getTabPositions( cm.marceditor );
202
            var positions = getTabPositions( cm.marceditor );
203
            var cur = cm.getCursor();
203
            var cur = cm.getCursor();
Lines 210-218 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
210
            }
210
            }
211
211
212
            cm.setCursor( { line: cur.line + 1, ch: 0 } );
212
            cm.setCursor( { line: cur.line + 1, ch: 0 } );
213
        },
213
        }
214
214
215
        'Shift-Tab': function( cm ) {
215
    _editorKeys[prev_position] = function( cm ) {
216
            // Move backwards through parts of tag/fixed fields
216
            // Move backwards through parts of tag/fixed fields
217
            var positions = getTabPositions( cm.marceditor );
217
            var positions = getTabPositions( cm.marceditor );
218
            var cur = cm.getCursor();
218
            var cur = cm.getCursor();
Lines 233-247 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
233
            } else {
233
            } else {
234
                cm.setCursor( { line: cur.line - 1, ch: 0 } );
234
                cm.setCursor( { line: cur.line - 1, ch: 0 } );
235
            }
235
            }
236
        },
236
        }
237
237
238
        'Ctrl-D': function( cm ) {
238
    _editorKeys[insert_delimiter] = function(cm){
239
            // Insert subfield delimiter
239
        var cur = cm.getCursor();
240
            var cur = cm.getCursor();
241
240
242
            cm.replaceRange( "‡", cur, null );
241
        cm.replaceRange( "‡", cur, null );
243
        },
242
    }
244
    };
245
243
246
    // The objects below are part of a field/subfield manipulation API, accessed through the base
244
    // The objects below are part of a field/subfield manipulation API, accessed through the base
247
    // editor object.
245
    // editor object.
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc (+3 lines)
Lines 5-10 Link Here
5
[% Asset.js("lib/koha/cateditor/marc-mode.js") | $raw %]
5
[% Asset.js("lib/koha/cateditor/marc-mode.js") | $raw %]
6
[% Asset.js("lib/require.js") | $raw %]
6
[% Asset.js("lib/require.js") | $raw %]
7
<script>
7
<script>
8
[% FOREACH shortcut IN shortcuts -%]
9
    var [% shortcut.shortcut_name | html %] = "[% shortcut.shortcut_keys | html %]";
10
[% END %]
8
    var authInfo = {
11
    var authInfo = {
9
        [%- FOREACH authtag = authtags -%]
12
        [%- FOREACH authtag = authtags -%]
10
            [% authtag.tagfield | html %]: {
13
            [% authtag.tagfield | html %]: {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt (-45 / +8 lines)
Lines 268-273 Link Here
268
</div>
268
</div>
269
269
270
<div id="shortcuts-contents" style="display: none">
270
<div id="shortcuts-contents" style="display: none">
271
<a id="redefine_shortcuts" href="/cgi-bin/koha/tools/adveditorshortcuts.pl">Redefine shortcuts</a>
271
<table class="table table-condensed">
272
<table class="table table-condensed">
272
    <thead>
273
    <thead>
273
        <tr>
274
        <tr>
Lines 276-328 Link Here
276
        </tr>
277
        </tr>
277
    </thead>
278
    </thead>
278
    <tbody>
279
    <tbody>
279
        <tr>
280
        [% FOREACH shortcut IN shortcuts %]
280
            <td>Alt-C</td>
281
            <tr>
281
            <td>Insert copyright symbol (©)</td>
282
                <td>[% shortcut.shortcut_keys %]</td>
282
        </tr>
283
                <td>[% shortcut.shortcut_desc %]</td>
283
        <tr>
284
            </tr>
284
            <td>Alt-P</td>
285
        [% END %]
285
            <td>Insert copyright symbol (℗) (sound recordings)</td>
286
        </tr>
287
        <tr>
288
            <td>Ctrl-D</td>
289
            <td>Insert delimiter (‡)</td>
290
        </tr>
291
        <tr>
292
            <td>Ctrl-H</td>
293
            <td>Get help on current subfield</td>
294
        </tr>
295
        <tr>
296
            <td>Ctrl-Shift-L</td>
297
            <td>Link field to authorities</td>
298
        </tr>
299
        <tr>
286
        <tr>
300
            <td>Ctrl-S</td>
287
            <td>Ctrl-S</td>
301
            <td>Save record</td>
288
            <td>Save record (cannot be remapped)</td>
302
        </tr>
303
        <tr>
304
            <td>Ctrl-X</td>
305
            <td>Delete current field</td>
306
        </tr>
307
        <tr>
308
            <td>Ctrl-Shift-X</td>
309
            <td>Delete current subfield</td>
310
        </tr>
311
        <tr>
312
            <td>Enter</td>
313
            <td>New field on next line</td>
314
        </tr>
315
        <tr>
316
            <td>Shift-Enter</td>
317
            <td>Insert line break</td>
318
        </tr>
319
        <tr>
320
            <td>Tab</td>
321
            <td>Move to next position</td>
322
        </tr>
323
        <tr>
324
            <td>Shift-Tab</td>
325
            <td>Move to previous position</td>
326
        </tr>
289
        </tr>
327
    </tbody>
290
    </tbody>
328
</table>
291
</table>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/adveditorshortcuts.tt (+68 lines)
Line 0 Link Here
1
[% USE raw %]
2
[% USE Asset %]
3
[% SET footerjs = 1 %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Koha &rsaquo; Tools &rsaquo; Advanced editor shortcuts</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
</head>
8
<body id="adveditor_shortcuts" class="tools">
9
    [% INCLUDE 'header.inc' %]
10
    [% INCLUDE 'cat-search.inc' %]
11
12
<div id="breadcrumbs">
13
    <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
14
    <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
15
    <a href="/cgi-bin/koha/tools/adveditorshortcuts.pl">Advanced editor shortcuts</a>
16
</div>
17
18
<div class="main container-fluid">
19
    <div class="row">
20
        <div class="col-sm-10 col-sm-push-2">
21
            <main>
22
                <h1>Advanced editor keyboard shortcuts</h1>
23
                <ul>
24
                    <li>Separate keys using a hyphen "-"</li>
25
                    <li>Control key is "Ctrl"</li>
26
                    <li>Alt key is "Alt"</li>
27
                    <li>Shift is "Shift"</li>
28
                    <li>If combing multiple keys they must be in specified order: Shift-Cmd-Ctrl-Alt</li>
29
                    <li><a href="https://codemirror.net/doc/manual.html#keymaps">More documentation on defining key maps</a></li>
30
                </ul>
31
32
                <form id="adveditor_shortcuts" method="post" action="/cgi-bin/koha/tools/adveditorshortcuts.pl">
33
                    <input type=hidden name="op" value="save" />
34
35
                    <table id="adv_editor_keyboard_shortcuts">
36
                        <thead>
37
                            <th>Description</th>
38
                            <th>Shortcut keys</th>
39
                        </thead>
40
                        <tbody>
41
                           [% FOREACH shortcut IN shortcuts %]
42
                        <tr>
43
                            <td><label for="shortcut_keys">[% shortcut.shortcut_desc %]</label></td>
44
                            <td>
45
                                <input type="hidden" name="shortcut_name" value="[% shortcut.shortcut_name %]">
46
                                <input type="text" name="shortcut_keys" value="[% shortcut.shortcut_keys %]">
47
                           </td>
48
                        </tr>
49
                   [% END %]
50
                   </table>
51
                   <input type="submit" value="Save shortcuts">
52
               </form>
53
54
           </main>
55
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
56
57
        <div class="col-sm-2 col-sm-pull-10">
58
            <aside>
59
                [% INCLUDE 'tools-menu.inc' %]
60
            </aside>
61
        </div> <!-- /.col-sm-2.col-sm-pull-10 -->
62
    </div> <!-- /.row -->
63
64
[% MACRO jsinclude BLOCK %]
65
    [% Asset.js("js/tools-menu.js") | $raw %]
66
[% END %]
67
68
[% INCLUDE 'intranet-bottom.inc' %]
(-)a/tools/adveditorshortcuts.pl (-1 / +79 lines)
Line 0 Link Here
0
- 
1
#!/usr/bin/perl
2
3
# Copyright 2018 Koha Development Team
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
=head1 NAME
21
22
adveditorshortcuts.pl : Define keyboard shortcuts for the advanced cataloging editor (rancor)
23
24
=head1 SYNOPSIS
25
26
=cut
27
28
=head1 DESCRIPTION
29
30
This script allows the user to redefine the keyboard shortcuts for the advacned cataloging editor
31
32
=head1 FUNCTIONS
33
34
=cut
35
36
use Modern::Perl;
37
use Encode;
38
39
use C4::Auth;
40
use C4::Context;
41
use C4::Output;
42
use CGI qw ( -utf8 );
43
use C4::Koha;
44
use Koha::KeyboardShortcuts;
45
46
my $input            = new CGI;
47
my $op               = $input->param('op') || 'list';
48
my @messages;
49
50
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
51
    {   template_name   => "tools/adveditorshortcuts.tt",
52
        query           => $input,
53
        type            => "intranet",
54
        authnotrequired => 1,
55
        flagsrequired   => {},
56
        debug           => 1,
57
    }
58
);
59
60
my $shortcuts = Koha::KeyboardShortcuts->search();
61
62
if ( $op eq 'save' ) {
63
    my @shortcut_names = $input->multi_param('shortcut_name');
64
    my @shortcut_keys  = $input->multi_param('shortcut_keys');
65
    my %updated_shortcuts;
66
    @updated_shortcuts{@shortcut_names} = @shortcut_keys;
67
68
    while ( my $shortcut = $shortcuts->next() ){
69
        $shortcut->shortcut_keys( $updated_shortcuts{$shortcut->shortcut_name} );
70
        $shortcut->store();
71
    }
72
}
73
74
75
$template->param(
76
    shortcuts  => $shortcuts,
77
);
78
79
output_html_with_http_headers $input, $cookie, $template->output;

Return to bug 21411