From afd1624de0103cc01514ac8a19261cb43fca2eac Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 3 Apr 2025 16:34:35 +0200 Subject: [PATCH] Bug 35267: (follow-up) Remove 'apply to all' from format With the introduction of more granular global preferences for notice CSS we no longer need the somewhat confusing per notice but apply to all format checkbox. As suggested by Lucas, this patch removes that option. This is safe to remove at this stage as the feature in question isn't really working given the second bug implimenting most of the functionality to expose it is still in the queue. Sponsored-by: Open Fifth --- .../prog/en/modules/tools/letter.tt | 35 ++++++++----------- tools/letter.pl | 11 ++---- 2 files changed, 17 insertions(+), 29 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt index e13a224e468..36441bb5e5c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt @@ -548,13 +548,13 @@ [% WRAPPER accordion_panel panel_id="all_notice_css" %]

CSS to be applied to all notice types

[%- IF Koha.Preference('AllNoticeCSS') -%] -
-
-
[%- Koha.Preference('AllNoticeCSS') | html -%]
+
+
+
[%- Koha.Preference('AllNoticeCSS') | html -%]
+
-
[%- ELSE -%] -

None defined

+

None defined

[%- END -%] [% IF ( CAN_user_parameters_manage_sysprefs ) %] Edit @@ -568,13 +568,13 @@ [% WRAPPER accordion_panel panel_id="email_notice_css" %]

CSS to be applied to email notices in addition to that already in "All Notice CSS"

[%- IF Koha.Preference('EmailNoticeCSS') -%] -
-
-
[%- Koha.Preference('EmailNoticeCSS') | html -%]
+
+
+
[%- Koha.Preference('EmailNoticeCSS') | html -%]
+
-
[%- ELSE -%] -

None defined

+

None defined

[%- END -%] [% IF ( CAN_user_parameters_manage_sysprefs ) %] Edit @@ -588,13 +588,13 @@ [% WRAPPER accordion_panel panel_id="print_notice_css" %]

CSS to be applied to print notices in addition to that already in "All Notice CSS"

[%- IF Koha.Preference('PrintNoticeCSS') -%] -
-
-
[%- Koha.Preference('PrintNoticeCSS') | html -%]
+
+
+
[%- Koha.Preference('PrintNoticeCSS') | html -%]
+
-
[%- ELSE -%] -

None defined

+

None defined

[%- END -%] [% IF ( CAN_user_parameters_manage_sysprefs ) %] Edit @@ -889,11 +889,6 @@ -
  • - - - Existing format settings will be overwritten. -
  • diff --git a/tools/letter.pl b/tools/letter.pl index bd5111afedf..4135fc5c690 100755 --- a/tools/letter.pl +++ b/tools/letter.pl @@ -326,15 +326,8 @@ sub add_validate { my @lang = $input->multi_param('lang'); for my $mtt (@mtt) { - my $lang = shift @lang; - my $style = $input->param("style_$lang"); - my $format_all = $input->param("format_all_$lang"); - if ($format_all) { - my @letters = Koha::Notice::Templates->search( { lang => $lang } )->as_list; - foreach my $letter (@letters) { - $letter->set( { style => $style } )->store; - } - } + my $lang = shift @lang; + my $style = $input->param("style_$lang"); my $is_html = $input->param("is_html_$mtt\_$lang"); my $title = shift @title; my $content = shift @content; -- 2.50.1