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

(-)a/authorities/authorities.pl (+5 lines)
Lines 543-548 my $myindex = $input->param('index'); Link Here
543
my $linkid=$input->param('linkid');
543
my $linkid=$input->param('linkid');
544
my $authtypecode = $input->param('authtypecode');
544
my $authtypecode = $input->param('authtypecode');
545
my $breedingid    = $input->param('breedingid');
545
my $breedingid    = $input->param('breedingid');
546
my $changed_authtype = $input->param('changed_authtype') // q{};
546
547
547
548
548
my $dbh = C4::Context->dbh;
549
my $dbh = C4::Context->dbh;
Lines 634-639 if ($op eq "duplicate") Link Here
634
        {
635
        {
635
                $authid = "";
636
                $authid = "";
636
        }
637
        }
638
        if($changed_authtype eq "changed"){
639
            $record = TransformHtmlToMarc( $input, 0 );
640
        }
641
637
        build_tabs ($template, $record, $dbh, $input);
642
        build_tabs ($template, $record, $dbh, $input);
638
        build_hidden_data;
643
        build_hidden_data;
639
        $template->param(oldauthtypetagfield=>$oldauthtypetagfield, oldauthtypetagsubfield=>$oldauthtypetagsubfield,
644
        $template->param(oldauthtypetagfield=>$oldauthtypetagfield, oldauthtypetagsubfield=>$oldauthtypetagsubfield,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt (-1 / +39 lines)
Lines 79-84 Link Here
79
            selectTab( tablink );
79
            selectTab( tablink );
80
            window.scrollTo( 0, getScrollto( field, "toolbar" ) );
80
            window.scrollTo( 0, getScrollto( field, "toolbar" ) );
81
        });
81
        });
82
83
        $(".change-authtype").on("click", function(){
84
            var authtypecode = $(this).data("authtypecode");
85
            var f = document.f;
86
            f.op.value = "[% op | html %]";
87
            f.authid.value = "[% authid | html %]";
88
            f.changed_authtype.value = "changed";
89
            f.authtypecode.value = authtypecode;
90
            f.submit();
91
        });
82
    });
92
    });
83
93
84
    function selectTab( tablink ){
94
    function selectTab( tablink ){
Lines 314-319 Link Here
314
                    <input type="hidden" name="authid" value="[% authid | html %]" />
324
                    <input type="hidden" name="authid" value="[% authid | html %]" />
315
                    <input type="hidden" name="index" value="[% index | html %]" />
325
                    <input type="hidden" name="index" value="[% index | html %]" />
316
                    <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" />
326
                    <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" />
327
                    <input type="hidden" name="changed_authtype" value="" />
317
328
318
                    <div id="toolbar" class="btn-toolbar">
329
                    <div id="toolbar" class="btn-toolbar">
319
                        <div class="btn-group"><a href="#" id="addauth" class="btn btn-primary" accesskey="w"><i class="fa fa-save"></i> Save</a></div>
330
                        <div class="btn-group"><a href="#" id="addauth" class="btn btn-primary" accesskey="w"><i class="fa fa-save"></i> Save</a></div>
Lines 325-330 Link Here
325
                            [% END %]
336
                            [% END %]
326
                        </div>
337
                        </div>
327
                        <div class="btn-group">
338
                        <div class="btn-group">
339
                            <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-cog"></i> Settings <span class="caret"></span></button>
340
                            <ul id="settings-menu" class="dropdown-menu">
341
                                <li class="dropdown-header">Change authority type</li>
342
                                <li>
343
                                    <a href="#" class="change-authtype" data-authtypecode="">
344
                                        [% IF ( authtypecode ) %]
345
                                           <i class="fa fa-fw">&nbsp;</i>
346
                                        [% ELSE %]
347
                                            <i class="fa fa-fw fa-check"></i>
348
                                        [% END %]
349
                                        Default
350
                                    </a>
351
                                </li>
352
                                [% FOREACH authority_type IN authority_types %]
353
                                    <li>
354
                                        <a href="#" class="change-authtype" data-authtypecode="[% authority_type.authtypecode | html %]">
355
                                            [% IF authority_type.authtypecode == authtypecode %]
356
                                                <i class="fa fa-fw fa-check"></i>
357
                                            [% ELSE %]
358
                                                <i class="fa fa-fw">&nbsp;</i>
359
                                            [% END %]
360
                                            [% authority_type.authtypetext | html %]
361
                                        </a>
362
                                    </li>
363
                                [% END %]
364
                            </ul> <!-- /#settings-menu -->
365
                        </div> <!-- /.btn-group -->
366
                        <div class="btn-group">
328
                            [% IF ( authid ) %]
367
                            [% IF ( authid ) %]
329
                                <a class="btn btn-default" id="cancel" href="/cgi-bin/koha/authorities/detail.pl?authid=[% authid | url %]">Cancel</a>
368
                                <a class="btn btn-default" id="cancel" href="/cgi-bin/koha/authorities/detail.pl?authid=[% authid | url %]">Cancel</a>
330
                            [% ELSE %]
369
                            [% ELSE %]
331
- 

Return to bug 30930