From 72272b92a421bd1d1a123467364946629ad95b81 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 10 Jan 2022 15:52:16 +0000 Subject: [PATCH] Bug 26975: Reindent authorities editor template This patch performs general template cleanup to the authorities editor: Make indentation consistent, replace tabs with spaces, and trim trailing whitespace. To test, apply the patch and edit or create a new authority record. Test the functionality of the authority editor and confirm that everything works correctly, including JS interactions like subfield reordering, tag and subfield cloning, and tag and subfield deletion. Signed-off-by: David Nind Signed-off-by: Katrin Fischer --- .../en/modules/authorities/authorities.tt | 850 +++++++++--------- 1 file changed, 426 insertions(+), 424 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt index e9bcf3f8cb..3b322f0340 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt @@ -33,7 +33,7 @@ if(Check()){ $("#f").submit(); } - }); + }); $("#z3950submit").click(function(){ var strQuery = GetZ3950Terms(); var index = "&index=[% index | html %]"; @@ -44,467 +44,469 @@ }); }); -/** - * check if z3950 mandatories are set or not - */ -function GetZ3950Terms(){ - var strQuery="&authtypecode="+document.forms['f'].authtypecode.value; - var mandatories = new Array(); - var mandatories_label = new Array(); - [% FOREACH BIG_LOO IN BIG_LOOP %][% FOREACH innerloo IN BIG_LOO.innerloop %][% FOREACH subfield_loo IN innerloo.subfield_loop %][% IF ( subfield_loo.z3950_mandatory ) %]mandatories.push("[% subfield_loo.id | html %]"); - mandatories_label.push("[% subfield_loo.z3950_mandatory | html %]");[% END %][% END %][% END %][% END %] - - for(var i=0,len=mandatories.length; i= 10){ + elem = document.getElementById(divid); + eleminputs = elem.getElementsByTagName('input'); + + for(var j=0,len2=eleminputs.length; j= 10){ - elem = document.getElementById(divid); - eleminputs = elem.getElementsByTagName('input'); - - for(var j=0,len2=eleminputs.length; j [% Asset.css("css/addbiblio.css") | $raw %] -
-
Loading, please wait...
-
- -[% INCLUDE 'header.inc' %] +
+
Loading, please wait...
+
- + +
+
+
+ + [% IF ( authid ) %] +

Modify authority #[% authid | html %] [% authtypetext | html %]

[% ELSE %] - +

Adding authority [% authtypetext | html %]

[% END %] - [% UNLESS advancedMARCEditor %] - [% IF ( subfield_loo.mandatory ) %] -
- [% ELSE %] -
- [% END %] - [% IF ( subfield_loo.fixedfield ) %] -
- -
-[% FOREACH hidden_loo IN hidden_loop %] - - - - - -[% END %] -
-[% IF ( oldauthnumtagfield ) %] - - - - - - - - - -[% END %] - - - -[% INCLUDE 'modals/cataloguing_create_av.inc' %] - -
-
-
+
+ [% INCLUDE 'intranet-bottom.inc' %] -- 2.30.2