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 <https://openfifth.co.uk> Signed-off-by: Marion Durand <marion.durand@biblibre.com> Signed-off-by: Thomas Klausner <domm@plix.at> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
308fdcec48
commit
b6506f8e54
|
|
@ -548,13 +548,13 @@
|
|||
[% WRAPPER accordion_panel panel_id="all_notice_css" %]
|
||||
<p class="alert alert-info">CSS to be applied to all notice types</p>
|
||||
[%- IF Koha.Preference('AllNoticeCSS') -%]
|
||||
<div class="card">
|
||||
<div class="card-body bg-light">
|
||||
<pre class="mb-0"><code class="language-css">[%- Koha.Preference('AllNoticeCSS') | html -%]</code></pre>
|
||||
<div class="card">
|
||||
<div class="card-body bg-light">
|
||||
<pre class="mb-0"><code class="language-css">[%- Koha.Preference('AllNoticeCSS') | html -%]</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
[%- ELSE -%]
|
||||
<p class="alert alert-warning">None defined</p>
|
||||
<p class="alert alert-warning">None defined</p>
|
||||
[%- END -%]
|
||||
[% IF ( CAN_user_parameters_manage_sysprefs ) %]
|
||||
<a class="syspref-link" href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AllNoticeCSS">Edit</a>
|
||||
|
|
@ -568,13 +568,13 @@
|
|||
[% WRAPPER accordion_panel panel_id="email_notice_css" %]
|
||||
<p class="alert alert-info">CSS to be applied to email notices in addition to that already in "All Notice CSS"</p>
|
||||
[%- IF Koha.Preference('EmailNoticeCSS') -%]
|
||||
<div class="card">
|
||||
<div class="card-body bg-light">
|
||||
<pre><code>[%- Koha.Preference('EmailNoticeCSS') | html -%]</code></pre>
|
||||
<div class="card">
|
||||
<div class="card-body bg-light">
|
||||
<pre><code>[%- Koha.Preference('EmailNoticeCSS') | html -%]</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
[%- ELSE -%]
|
||||
<p class="alert alert-warning">None defined</p>
|
||||
<p class="alert alert-warning">None defined</p>
|
||||
[%- END -%]
|
||||
[% IF ( CAN_user_parameters_manage_sysprefs ) %]
|
||||
<a class="syspref-link" href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EmailNoticeCSS">Edit</a>
|
||||
|
|
@ -588,13 +588,13 @@
|
|||
[% WRAPPER accordion_panel panel_id="print_notice_css" %]
|
||||
<p class="alert alert-info">CSS to be applied to print notices in addition to that already in "All Notice CSS"</p>
|
||||
[%- IF Koha.Preference('PrintNoticeCSS') -%]
|
||||
<div class="card">
|
||||
<div class="card-body bg-light">
|
||||
<pre><code>[%- Koha.Preference('PrintNoticeCSS') | html -%]</code></pre>
|
||||
<div class="card">
|
||||
<div class="card-body bg-light">
|
||||
<pre><code>[%- Koha.Preference('PrintNoticeCSS') | html -%]</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
[%- ELSE -%]
|
||||
<p class="alert alert-warning">None defined</p>
|
||||
<p class="alert alert-warning">None defined</p>
|
||||
[%- END -%]
|
||||
[% IF ( CAN_user_parameters_manage_sysprefs ) %]
|
||||
<a class="syspref-link" href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PrintNoticeCSS">Edit</a>
|
||||
|
|
@ -889,17 +889,6 @@
|
|||
<label for="style_[% lang | html %]">Style (CSS): </label>
|
||||
<textarea id="style_[% lang | html %]" name="style_[% lang | html %]" rows="15" cols="80">[% letters.$lang.params.style | $raw %]</textarea>
|
||||
</li>
|
||||
<li class="format_all_notices_option">
|
||||
<label for="format_all_[% lang | html %]">
|
||||
[% IF Koha.Preference('TranslateNotices') %]
|
||||
Apply format settings to all notices for this language:
|
||||
[% ELSE %]
|
||||
Apply format settings to all notices:
|
||||
[% END %]
|
||||
</label>
|
||||
<input type="checkbox" name="format_all_[% lang | html %]" id="format_all_[% lang | html %]" class="format_all" value="1" />
|
||||
<span class="hint">Existing format settings will be overwritten.</span>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue