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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt (-20 / +15 lines)
Lines 548-560 Link Here
548
                        [% WRAPPER accordion_panel panel_id="all_notice_css" %]
548
                        [% WRAPPER accordion_panel panel_id="all_notice_css" %]
549
                            <p class="alert alert-info">CSS to be applied to all notice types</p>
549
                            <p class="alert alert-info">CSS to be applied to all notice types</p>
550
                            [%- IF Koha.Preference('AllNoticeCSS') -%]
550
                            [%- IF Koha.Preference('AllNoticeCSS') -%]
551
                            <div class="card">
551
                                <div class="card">
552
                                <div class="card-body bg-light">
552
                                    <div class="card-body bg-light">
553
                                    <pre class="mb-0"><code class="language-css">[%- Koha.Preference('AllNoticeCSS') | html -%]</code></pre>
553
                                        <pre class="mb-0"><code class="language-css">[%- Koha.Preference('AllNoticeCSS') | html -%]</code></pre>
554
                                    </div>
554
                                </div>
555
                                </div>
555
                            </div>
556
                            [%- ELSE -%]
556
                            [%- ELSE -%]
557
                            <p class="alert alert-warning">None defined</p>
557
                                <p class="alert alert-warning">None defined</p>
558
                            [%- END -%]
558
                            [%- END -%]
559
                            [% IF ( CAN_user_parameters_manage_sysprefs ) %]
559
                            [% IF ( CAN_user_parameters_manage_sysprefs ) %]
560
                                <a class="syspref-link" href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AllNoticeCSS">Edit</a>
560
                                <a class="syspref-link" href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AllNoticeCSS">Edit</a>
Lines 568-580 Link Here
568
                        [% WRAPPER accordion_panel panel_id="email_notice_css" %]
568
                        [% WRAPPER accordion_panel panel_id="email_notice_css" %]
569
                            <p class="alert alert-info">CSS to be applied to email notices in addition to that already in "All Notice CSS"</p>
569
                            <p class="alert alert-info">CSS to be applied to email notices in addition to that already in "All Notice CSS"</p>
570
                            [%- IF Koha.Preference('EmailNoticeCSS') -%]
570
                            [%- IF Koha.Preference('EmailNoticeCSS') -%]
571
                            <div class="card">
571
                                <div class="card">
572
                                <div class="card-body bg-light">
572
                                    <div class="card-body bg-light">
573
                                    <pre><code>[%- Koha.Preference('EmailNoticeCSS') | html -%]</code></pre>
573
                                        <pre><code>[%- Koha.Preference('EmailNoticeCSS') | html -%]</code></pre>
574
                                    </div>
574
                                </div>
575
                                </div>
575
                            </div>
576
                            [%- ELSE -%]
576
                            [%- ELSE -%]
577
                            <p class="alert alert-warning">None defined</p>
577
                                <p class="alert alert-warning">None defined</p>
578
                            [%- END -%]
578
                            [%- END -%]
579
                            [% IF ( CAN_user_parameters_manage_sysprefs ) %]
579
                            [% IF ( CAN_user_parameters_manage_sysprefs ) %]
580
                                <a class="syspref-link" href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EmailNoticeCSS">Edit</a>
580
                                <a class="syspref-link" href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EmailNoticeCSS">Edit</a>
Lines 588-600 Link Here
588
                        [% WRAPPER accordion_panel panel_id="print_notice_css" %]
588
                        [% WRAPPER accordion_panel panel_id="print_notice_css" %]
589
                            <p class="alert alert-info">CSS to be applied to print notices in addition to that already in "All Notice CSS"</p>
589
                            <p class="alert alert-info">CSS to be applied to print notices in addition to that already in "All Notice CSS"</p>
590
                            [%- IF Koha.Preference('PrintNoticeCSS') -%]
590
                            [%- IF Koha.Preference('PrintNoticeCSS') -%]
591
                            <div class="card">
591
                                <div class="card">
592
                                <div class="card-body bg-light">
592
                                    <div class="card-body bg-light">
593
                                    <pre><code>[%- Koha.Preference('PrintNoticeCSS') | html -%]</code></pre>
593
                                        <pre><code>[%- Koha.Preference('PrintNoticeCSS') | html -%]</code></pre>
594
                                    </div>
594
                                </div>
595
                                </div>
595
                            </div>
596
                            [%- ELSE -%]
596
                            [%- ELSE -%]
597
                            <p class="alert alert-warning">None defined</p>
597
                                <p class="alert alert-warning">None defined</p>
598
                            [%- END -%]
598
                            [%- END -%]
599
                            [% IF ( CAN_user_parameters_manage_sysprefs ) %]
599
                            [% IF ( CAN_user_parameters_manage_sysprefs ) %]
600
                                <a class="syspref-link" href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PrintNoticeCSS">Edit</a>
600
                                <a class="syspref-link" href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PrintNoticeCSS">Edit</a>
Lines 889-899 Link Here
889
                                    <label for="style_[% lang | html %]">Style (CSS): </label>
889
                                    <label for="style_[% lang | html %]">Style (CSS): </label>
890
                                    <textarea id="style_[% lang | html %]" name="style_[% lang | html %]" rows="15" cols="80">[% letters.$lang.params.style | $raw %]</textarea>
890
                                    <textarea id="style_[% lang | html %]" name="style_[% lang | html %]" rows="15" cols="80">[% letters.$lang.params.style | $raw %]</textarea>
891
                                </li>
891
                                </li>
892
                                <li class="format_all_notices_option">
893
                                    <label for="format_all_[% lang | html %]">Apply format settings to all notices[% IF Koha.Preference('TranslateNotices') %]for this language[% END %]:</label>
894
                                    <input type="checkbox" name="format_all_[% lang | html %]" id="format_all_[% lang | html %]" class="format_all" value="1" />
895
                                    <span class="hint">Existing format settings will be overwritten.</span>
896
                                </li>
897
                            </ol>
892
                            </ol>
898
                        </div>
893
                        </div>
899
                    </fieldset>
894
                    </fieldset>
(-)a/tools/letter.pl (-10 / +2 lines)
Lines 326-340 sub add_validate { Link Here
326
    my @lang       = $input->multi_param('lang');
326
    my @lang       = $input->multi_param('lang');
327
327
328
    for my $mtt (@mtt) {
328
    for my $mtt (@mtt) {
329
        my $lang       = shift @lang;
329
        my $lang    = shift @lang;
330
        my $style      = $input->param("style_$lang");
330
        my $style   = $input->param("style_$lang");
331
        my $format_all = $input->param("format_all_$lang");
332
        if ($format_all) {
333
            my @letters = Koha::Notice::Templates->search( { lang => $lang } )->as_list;
334
            foreach my $letter (@letters) {
335
                $letter->set( { style => $style } )->store;
336
            }
337
        }
338
        my $is_html = $input->param("is_html_$mtt\_$lang");
331
        my $is_html = $input->param("is_html_$mtt\_$lang");
339
        my $title   = shift @title;
332
        my $title   = shift @title;
340
        my $content = shift @content;
333
        my $content = shift @content;
341
- 

Return to bug 35267