Bugzilla – Attachment 113111 Details for
Bug 26727
Fix <p/> appearing in the templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26727: (follow-up) More markup corrections
Bug-26727-follow-up-More-markup-corrections.patch (text/plain), 17.10 KB, created by
Martin Renvoize (ashimema)
on 2020-11-05 13:30:58 UTC
(
hide
)
Description:
Bug 26727: (follow-up) More markup corrections
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-11-05 13:30:58 UTC
Size:
17.10 KB
patch
obsolete
>From 49f2f8bd5645a73f9c23c207b3330b61d8932c09 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 3 Nov 2020 18:00:57 +0000 >Subject: [PATCH] Bug 26727: (follow-up) More markup corrections > >This patch makes more markup changes to the templates previously >modified in order to try to arrive at some agreeable solutions. > >- In the value_builder EXAMPLE template, the <p> is unnecessary and is > removed. Also removed is the script "type" attribute and obsolete > CDATA markers. >- In the article request template an unnecessary <p> is removed. >- In the merge patrons template the submit button is now in a <fieldset > class="action"> as is consistent with other forms. >- In the MARC modifications template I've added <div>s around each > "line" in the form to add the line break, along with some CSS to add > margins. >- The submit button is now inside a <fieldset class="action"> and the > "Cancel" link now has the "cancel" class. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../cataloguing/value_builder/EXAMPLE.tt | 6 +- > .../prog/en/modules/circ/request-article.tt | 1 - > .../prog/en/modules/members/merge-patrons.tt | 14 +- > .../tools/marc_modification_templates.tt | 142 ++++++++++-------- > 4 files changed, 86 insertions(+), 77 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/EXAMPLE.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/EXAMPLE.tt >index c2323f2c3b..6431c3faf9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/EXAMPLE.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/EXAMPLE.tt >@@ -10,7 +10,7 @@ > <p>Hi, you are looking at the result of launching the EXAMPLE plugin.</p> > <p>I received this from you:</p> > <input type="text" id="received" value="[% result | html %]" disabled /> >-</p> >+ > <p>I will pass back what you type here, if you press OK.</p> > <input type="text" id="return" value="[% result | html %]" /> > <p> >@@ -19,8 +19,7 @@ > </p> > </form> > >-<script type="text/javascript"> >-//<![CDATA[ >+<script> > $(document).ready(function () { > $('#return').focus(); > }); >@@ -31,7 +30,6 @@ > $(window.opener.document).find('#[% index | html %]').val($('#return').val() ); > window.close(); > } >-//]]> > </script> > > [% INCLUDE 'popup-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >index 6c76b1fa5b..3a228ba1cd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt >@@ -90,7 +90,6 @@ > > <fieldset class="rows"> > <legend>Place article request from [% biblio.title | html %] for [% patron.firstname | html %] [% patron.surname | html %] ( [% patron.cardnumber | html %] )</legend> >- <p> > <ul> > <li> > <label for="title">Title:</label> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt >index 0448127e46..3ac0fbe1cc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt >@@ -85,14 +85,14 @@ > </tbody> > </table> > >- [% FOREACH p IN patrons %] >- <input type="hidden" name="id" value="[% p.id | html %]" /> >- [% END %] >- >- <br> >+ <fieldset class="action"> >+ [% FOREACH p IN patrons %] >+ <input type="hidden" name="id" value="[% p.id | html %]" /> >+ [% END %] >+ <input type="hidden" name="action" value="merge" /> >+ <input id="merge-patrons" type="submit" value="Merge patrons" /> >+ </fieldset> > >- <input type="hidden" name="action" value="merge" /> >- <input id="merge-patrons" type="submit" value="Merge patrons" /> > [% ELSE %] > <div class="dialog alert">Error: Two or more patrons need to be selected for merging</div> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >index 8fdf30cf8e..3e3db1997f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt >@@ -5,9 +5,17 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › MARC modification templates</title> > [% INCLUDE 'doc-head-close.inc' %] >-<style> >- #add_action { display: none; } >-</style> >+[% FILTER collapse %] >+ <style> >+ #add_action { >+ display: none; >+ } >+ >+ .action_line { >+ margin-bottom: 1em; >+ } >+ </style> >+[% END %] > </head> > > <body id="tools_marc_modification_templates" class="tools"> >@@ -183,84 +191,88 @@ > <legend id="modaction_legend">Add a new action</legend> > <div id="warning_multivalued" style="color:red; display:none;">You have chosen a condition on the same field as the original field. If your records contain multivalued fields it is highly recommended not to do that.</div> > >- <select name="action" id="action" onchange="onActionChange(this);"> >- <option value="delete_field">Delete</option> >- <option value="add_field">Add new</option> >- <option value="update_field">Update existing or add new</option> >- <option value="move_field">Move</option> >- <option value="copy_field">Copy</option> >- <option value="copy_and_replace_field">Copy and replace</option> >- </select> >- >- <span id="field_number_block"> >- <select name="field_number" id="field_number"> >- <option value="0">All</option> >- <option value="1">1st</option> >+ <div class="action_line"> >+ <select name="action" id="action" onchange="onActionChange(this);"> >+ <option value="delete_field">Delete</option> >+ <option value="add_field">Add new</option> >+ <option value="update_field">Update existing or add new</option> >+ <option value="move_field">Move</option> >+ <option value="copy_field">Copy</option> >+ <option value="copy_and_replace_field">Copy and replace</option> > </select> >- </span> >- >- field(s) <input type="text" name="from_field" id="from_field" size="3" maxlength="3" /> <input type="text" name="from_subfield" id="from_subfield" size="1" maxlength="1" title="let blank for the entire field" /> > >- <span name="with_value_block" id="with_value_block" style="display:none;"> >- with value <input type="text" name="field_value" id="field_value" /> >- </span> >- >- <span name="to_field_block" id="to_field_block" style="display:none;"> >- to field <input type="text" name="to_field" id="to_field" size="3" maxlength="3" /> <input type="text" name="to_subfield" id="to_subfield" size="1" maxlength="1" title="let blank for the entire field" /> >+ <span id="field_number_block"> >+ <select name="field_number" id="field_number"> >+ <option value="0">All</option> >+ <option value="1">1st</option> >+ </select> >+ </span> > >- <span name="to_field_regex_block" id="to_field_regex_block"> >- <sup> >- <label for="to_field_regex">RegEx</label> >- <input type="checkbox" name="to_field_regex" id="to_field_regex" onchange="onToFieldRegexChange(this);" /> >+ field(s) <input type="text" name="from_field" id="from_field" size="3" maxlength="3" /> <input type="text" name="from_subfield" id="from_subfield" size="1" maxlength="1" title="let blank for the entire field" /> > >- <span name="to_field_regex_value_block" id="to_field_regex_value_block" style="display:none;"> >- s/<input type="text" name="to_regex_search" id="to_regex_search" placeholder="regex pattern" />/<input type="text" name="to_regex_replace" id="to_regex_replace" placeholder="regex replacement" />/<input type="text" name="to_regex_modifiers" id="to_regex_modifiers" placeholder="ig" size="3" /> >- </span> >- </sup> >+ <span name="with_value_block" id="with_value_block" style="display:none;"> >+ with value <input type="text" name="field_value" id="field_value" /> > </span> >- </span> > >- <br><br> >+ <span name="to_field_block" id="to_field_block" style="display:none;"> >+ to field <input type="text" name="to_field" id="to_field" size="3" maxlength="3" /> <input type="text" name="to_subfield" id="to_subfield" size="1" maxlength="1" title="let blank for the entire field" /> > >- <select name="conditional" id="conditional" onchange="onConditionalChange(this);"> >- <option value="" selected="selected" /> >- <option value="if">if</option> >- <option value="unless">unless</option> >- </select> >+ <span name="to_field_regex_block" id="to_field_regex_block"> >+ <sup> >+ <label for="to_field_regex">RegEx</label> >+ <input type="checkbox" name="to_field_regex" id="to_field_regex" onchange="onToFieldRegexChange(this);" /> > >- <span name="conditional_block" id="conditional_block" style="display:none;"> >- field <input type="text" name="conditional_field" id="conditional_field" size="3" maxlength="3" /> <input type="text" name="conditional_subfield" id="conditional_subfield" size="1" maxlength="1" /> >+ <span name="to_field_regex_value_block" id="to_field_regex_value_block" style="display:none;"> >+ s/<input type="text" name="to_regex_search" id="to_regex_search" placeholder="regex pattern" />/<input type="text" name="to_regex_replace" id="to_regex_replace" placeholder="regex replacement" />/<input type="text" name="to_regex_modifiers" id="to_regex_modifiers" placeholder="ig" size="3" /> >+ </span> >+ </sup> >+ </span> >+ </span> >+ </div> > >- <select name="conditional_comparison" id="conditional_comparison" onchange="onConditionalComparisonChange(this);"> >- <option value="" /> >- <option value="exists">exists</option> >- <option value="not_exists">doesn't exist</option> >- <option value="equals">matches</option> >- <option value="not_equals">doesn't match</option> >+ <div class="action_line"> >+ <select name="conditional" id="conditional" onchange="onConditionalChange(this);"> >+ <option value="" selected="selected" /> >+ <option value="if">if</option> >+ <option value="unless">unless</option> > </select> > >- <span name="conditional_comparison_block" id="conditional_comparison_block" style="display:none;"> >- >- <span class="match_regex_prefix">m/</span><input type="text" id="conditional_value" name="conditional_value" /><span class="match_regex_suffix">/</span> >+ <span name="conditional_block" id="conditional_block" style="display:none;"> >+ field <input type="text" name="conditional_field" id="conditional_field" size="3" maxlength="3" /> <input type="text" name="conditional_subfield" id="conditional_subfield" size="1" maxlength="1" /> > >- <sup> >- <label for="conditional_regex">RegEx</label> >- <input type="checkbox" name="conditional_regex" id="conditional_regex" onchange="onConditionalRegexChange(this);" /> >- </sup> >+ <select name="conditional_comparison" id="conditional_comparison" onchange="onConditionalComparisonChange(this);"> >+ <option value="" /> >+ <option value="exists">exists</option> >+ <option value="not_exists">doesn't exist</option> >+ <option value="equals">matches</option> >+ <option value="not_equals">doesn't match</option> >+ </select> > >- </span> >- </span> >+ <span name="conditional_comparison_block" id="conditional_comparison_block" style="display:none;"> > >- <input type="hidden" name="template_id" value="[% template_id | html %]" /> >- <input type="hidden" name="mmta_id" id="mmta_id" /> >- <input type="hidden" name="op" value="add_action" /> >+ <span class="match_regex_prefix">m/</span><input type="text" id="conditional_value" name="conditional_value" /><span class="match_regex_suffix">/</span> > >- <br/><br/> >- <label for="description">Description:</label> >- <input type="text" name="description" id="description" size="60" /> >+ <sup> >+ <label for="conditional_regex">RegEx</label> >+ <input type="checkbox" name="conditional_regex" id="conditional_regex" onchange="onConditionalRegexChange(this);" /> >+ </sup> > >- <br/><br/> >- <input id="action_submit" type="submit" value="Add action" /> <a href="#modaction" id="cancel_edit" onclick="cancelEditAction();">Cancel</a> >+ </span> >+ </span> >+ </div> >+ >+ <div class="action_line"> >+ <label for="description">Description:</label> >+ <input type="text" name="description" id="description" size="60" /> >+ </div> >+ >+ <fieldset class="action"> >+ <input type="hidden" name="template_id" value="[% template_id | html %]" /> >+ <input type="hidden" name="mmta_id" id="mmta_id" /> >+ <input type="hidden" name="op" value="add_action" /> >+ <input id="action_submit" type="submit" value="Add action" /> >+ <a href="#modaction" class="cancel" id="cancel_edit" onclick="cancelEditAction();">Cancel</a> >+ </fieldset> > > </fieldset> > </form> >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26727
:
111948
|
112761
|
112945
|
112961
|
112962
|
113110
| 113111