From b6506f8e543eb3b764c2ea2fdf9c8f1ad222148c 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 Signed-off-by: Marion Durand Signed-off-by: Thomas Klausner Signed-off-by: Lucas Gass --- .../prog/en/modules/tools/letter.tt | 41 +++++++------------ tools/letter.pl | 11 +---- 2 files changed, 17 insertions(+), 35 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 5168d579e2..681eac458b 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,17 +889,6 @@ -
  • - - - Existing format settings will be overwritten. -
  • diff --git a/tools/letter.pl b/tools/letter.pl index 631cfa2646..8cce32b8f5 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;