Bug 18904: (follow-up) Rebase onto 14769
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Amended: simplified if-then-else around cur_field.setIndicator[12]. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
db75d5bf03
commit
9e5297efaa
|
|
@ -112,6 +112,8 @@ if ($authid) {
|
|||
$template->param( "clear" => 1 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
$template->param(
|
||||
authid => $authid ? $authid : "",
|
||||
index => $index,
|
||||
|
|
@ -122,6 +124,8 @@ $template->param(
|
|||
indicator2 => $indicator2,
|
||||
SUBFIELD_LOOP => \@subfield_loop,
|
||||
tag_number => $tag_number,
|
||||
rancor => $index =~ /rancor$/,
|
||||
);
|
||||
|
||||
|
||||
output_html_with_http_headers $query, $cookie, $template->output;
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ],
|
|||
if ( !field ) return;
|
||||
if ( authInfo[field.tag] == undefined ) return;
|
||||
authtype = authInfo[field.tag].authtypecode;
|
||||
index = 'rancor';
|
||||
index = 'tag_'+field.tag+'_rancor';
|
||||
var mainmainstring = '';
|
||||
if( field.getSubfields( authInfo[field.tag].subfield ).length != 0 ){
|
||||
mainmainstring += field.getSubfields( authInfo[field.tag].subfield )[0].text;
|
||||
|
|
|
|||
|
|
@ -15,16 +15,15 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
[% MACRO jsinclude BLOCK %]
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
[% IF tag_number == 'rancor' %]
|
||||
[% IF rancor %]
|
||||
function RancorReplaceField( new_text, ind_1, ind_2 ){
|
||||
var cur_field = opener.opener.jQuery(".CodeMirror")[0].CodeMirror.marceditor.getCurrentField();
|
||||
cur_field.setText(new_text);
|
||||
cur_field.setIndicator1(ind_1);
|
||||
cur_field.setIndicator2(ind_2);
|
||||
[% IF update_ind1 %]cur_field.setIndicator1(ind_1);[% END %]
|
||||
[% IF update_ind2 %]cur_field.setIndicator2(ind_2);[% END %]
|
||||
return true;
|
||||
}
|
||||
[% IF ( clear ) %]
|
||||
|
|
@ -47,7 +46,6 @@
|
|||
} catch(e) {
|
||||
return;
|
||||
}
|
||||
|
||||
var field_start = whichfield.parentNode.parentNode;
|
||||
|
||||
// Sets the good number of form fields for the specified subfield
|
||||
|
|
@ -107,7 +105,6 @@
|
|||
i++;
|
||||
});
|
||||
}
|
||||
|
||||
[% UNLESS ( clear ) %]
|
||||
[% FOREACH SUBFIELD_LOO IN SUBFIELD_LOOP %]
|
||||
SetSubfieldValues(
|
||||
|
|
@ -117,7 +114,6 @@
|
|||
[% END %]
|
||||
);
|
||||
[% END %]
|
||||
[% END %]
|
||||
var indicators = field_start.getElementsByClassName('indicator flat');
|
||||
[% IF update_ind1 %]
|
||||
indicators[0].value="[% indicator1 %]";
|
||||
|
|
|
|||
Loading…
Reference in New Issue