| Lines 8-124
          
      
      
        Link Here | 
        
          | 8 |  [% Asset.js("js/cataloging.js") | $raw %] | 8 |  [% Asset.js("js/cataloging.js") | $raw %] | 
        
          | 9 | [% INCLUDE 'browser-strings.inc' %] | 9 | [% INCLUDE 'browser-strings.inc' %] | 
        
          | 10 | [% Asset.js("js/browser.js") | $raw %] | 10 | [% Asset.js("js/browser.js") | $raw %] | 
          
            
              | 11 | <script type="text/javascript"> | 11 | [% Asset.css("css/addholding.css") | $raw %] | 
            
              | 12 | //<![CDATA[ | 12 | [% INCLUDE 'select2.inc' %] | 
            
              | 13 |     var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10)); | 13 | [% IF ( bidi ) %] | 
            
              | 14 |     browser.show(); | 14 |    [% Asset.css("css/right-to-left.css") | $raw %] | 
            
              |  |  | 15 | [% END %] | 
            
              | 16 | </head> | 
            
              | 17 | <body id="cat_addholding" class="cat"> | 
        
          | 15 |  | 18 |  | 
          
            
              | 16 |     $(window).load(function() { | 19 |    <div id="loading"> | 
            
              | 17 |         $("#loading").hide(); | 20 |        <div>Loading, please wait...</div> | 
            
              | 18 |     }); | 21 |    </div> | 
            
              | 19 |     var Sticky; |  |  | 
            
              | 20 |     $(document).ready(function() { | 
            
              | 21 |         $('#addholdingtabs').tabs().bind('show.ui-tabs', function(e, ui) { | 
            
              | 22 |             $("#"+ui.panel.id+" input:eq(0)").focus(); | 
            
              | 23 |         }); | 
        
          | 24 |  | 22 |  | 
          
            
              | 25 |         [% IF tab %] | 23 | [% INCLUDE 'header.inc' %] | 
            
              | 26 |             $('#addholdingtabs').selectTabByID("#[% tab | html %]"); |  |  | 
            
              | 27 |         [% END %] | 
        
          | 28 |  | 24 |  | 
          
            
              | 29 |         Sticky = $("#toolbar"); | 25 | <div id="breadcrumbs"> | 
            
              | 30 |         Sticky.hcSticky({ | 26 |           <a href="/cgi-bin/koha/mainpage.pl">Home</a> | 
            
              | 31 |             stickTo: ".main", | 27 |  › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> | 
            
              | 32 |             stickyClass: "floating" | 28 |  › Edit <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | uri %]">[% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %])</a> | 
            
              | 33 |         }); | 29 |  › <a href="/cgi-bin/koha/cataloguing/addholding.pl?biblionumber=[% biblionumber | uri %]">Holdings</a> | 
            
              |  |  | 30 | </div> | 
        
          | 34 |  | 31 |  | 
          
            
              | 35 |         /* check cookie to hide/show marcdocs*/ | 32 | <div class="main container-fluid"> | 
            
              | 36 |         if($.cookie("marcdocs_[% borrowernumber | html %]") == 'hide'){ | 33 |     <div class="row"> | 
            
              | 37 |             toggleMARCdocLinks(false); | 34 |         <div class="col-md-10 col-md-offset-1"> | 
            
              | 38 |         } else { |  |  | 
            
              | 39 |             toggleMARCdocLinks(true); | 
            
              | 40 |         } | 
        
          | 41 |  | 35 |  | 
          
            
              | 42 |         $("#marcDocsSelect").click(function(){ | 36 | <h1> | 
            
              | 43 |             if($.cookie("marcdocs_[% borrowernumber | html %]") == 'hide'){ | 37 | [% IF ( holding_id ) %]Editing holdings record number [% holding_id | html %] | 
            
              | 44 |                 toggleMARCdocLinks(true); | 38 | [% ELSE %]Add holdings record | 
            
              | 45 |             } else { | 39 | [% END %] | 
            
              | 46 |                 toggleMARCdocLinks(false); | 40 | </h1> | 
            
              | 47 |             } |  |  | 
            
              | 48 |         }); | 
        
          | 49 |  | 41 |  | 
          
            
              | 50 |         /* check cookie to hide/show marc tags*/ | 42 | [% IF ( error_items_exist ) %]<div class="dialog alert"><strong>This holdings record has items attached.</strong> Please delete them first.</div>[% END %] | 
            
              | 51 |         var marctags_cookie = $.cookie("marctags_[% borrowernumber | html %]"); | 43 | [% IF ( error_delete_failed ) %]<div class="dialog alert"><strong>Error deleting the record.</strong></div>[% END %] | 
            
              | 52 |         if (marctags_cookie == 'hide'){ |  |  | 
            
              | 53 |             toggleMARCTagLinks(false); | 
            
              | 54 |         } else if( marctags_cookie == 'show'){ | 
            
              | 55 |             toggleMARCTagLinks(true) | 
            
              | 56 |         } else { | 
            
              | 57 |             [% UNLESS Koha.Preference("hide_marc") %] | 
            
              | 58 |                 toggleMARCTagLinks(true) | 
            
              | 59 |             [% ELSE %] | 
            
              | 60 |                 toggleMARCTagLinks(false); | 
            
              | 61 |             [% END %] | 
            
              | 62 |         } | 
        
          | 63 |  | 44 |  | 
          
            
              | 64 |         $("#marcTagsSelect").click(function(){ | 45 | [% IF ( done ) %] | 
            
              | 65 |             if( $.cookie("marctags_[% borrowernumber | html %]") == 'hide'){ | 46 |     <script> | 
            
              | 66 |                 toggleMARCTagLinks(true) | 47 |         opener.document.forms['f'].holding_id.value=[% holding_id | html %]; | 
            
              | 67 |             } else { | 48 |         window.close(); | 
            
              | 68 |                 toggleMARCTagLinks(false); | 49 |     </script> | 
            
              | 69 |             } | 50 | [% ELSE %] | 
            
              | 70 |         }); | 51 |     <form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addholding.pl" onsubmit="return Check();"> | 
            
              |  |  | 52 |     <input type="hidden" value="[% IF ( holding_id ) %]view[% ELSE %]holdings[% END %]" id="redirect" name="redirect" /> | 
            
              | 53 |     <input type="hidden" value="" id="current_tab" name="current_tab" /> | 
            
              | 54 | [% END %] | 
        
          | 71 |  | 55 |  | 
          
            
              | 72 |         $("#saverecord").click(function(){ | 56 | <div id="toolbar" class="btn-toolbar"> | 
            
              | 73 |             $(".btn-group").removeClass("open"); | 57 |     [% IF CAN_user_editcatalogue_edit_items %] | 
            
              | 74 |             onOption(); | 58 |         <div class="btn-group"> | 
            
              | 75 |             return false; | 59 |             <button class="btn btn-default btn-sm" id="saverecord"><i class="fa fa-save"></i> Save</button> | 
            
              | 76 |         }); | 60 |             <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"> | 
            
              |  |  | 61 |             <span class="caret"></span> | 
            
              | 62 |             </button> | 
            
              | 63 |             <ul class="dropdown-menu"> | 
            
              | 64 |                 <li><a id="saveandview" href="#">Save and view record</a></li> | 
            
              | 65 |                 <li><a id="saveanditems" href="#">Save and edit items</a></li> | 
            
              | 66 |                 <li><a id="saveandcontinue" href="#">Save and continue editing</a></li> | 
            
              | 67 |             </ul> | 
            
              | 68 |         </div> | 
            
              | 69 |     [% END %] | 
        
          | 77 |  | 70 |  | 
          
            
              | 78 |         $("#saveandview").click(function(){ | 71 |     <div class="btn-group"> | 
            
              | 79 |             $(".btn-group").removeClass("open"); | 72 |         <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><i class="fa fa-cog"></i> Settings <span class="caret"></span></button> | 
            
              | 80 |             redirect("view"); | 73 |         <ul id="settings-menu" class="dropdown-menu"> | 
            
              | 81 |             return false; | 74 |             [% IF Koha.Preference( 'EnableAdvancedCatalogingEditor' ) == 1 %] | 
            
              | 82 |         }); | 75 |                 [% # disabled until supported <li><a href="#" id="switcheditor">Switch to advanced editor</a></li> %] | 
            
              |  |  | 76 |             [% END %] | 
            
              | 77 |             [% IF marcflavour != 'NORMARC' AND NOT advancedMARCEditor %] | 
            
              | 78 |                 <li> | 
            
              | 79 |                     <a href="#" id="marcDocsSelect"><i class="fa fa-check-square-o"></i> Show MARC tag documentation links</a> | 
            
              | 80 |                 <li> | 
            
              | 81 |                     <a href="#" id="marcTagsSelect"><i class="fa fa-check-square-o"></i> Show tags</a> | 
            
              | 82 |                 </li> | 
            
              | 83 |             [% END %] | 
            
              | 84 |             <li class="divider"></li> | 
            
              | 85 |             <li class="nav-header">Change framework</li> | 
            
              | 86 |             <li> | 
            
              | 87 |                 <a href="#" class="change-framework" data-frameworkcode=""> | 
            
              | 88 |                     [% IF ( frameworkcode ) %] | 
            
              | 89 |                        <i class="fa fa-fw"> </i> | 
            
              | 90 |                     [% ELSE %] | 
            
              | 91 |                         <i class="fa fa-fw fa-check"></i> | 
            
              | 92 |                     [% END %] | 
            
              | 93 |                     Default | 
            
              | 94 |                 </a> | 
            
              | 95 |             </li> | 
            
              | 96 |             [% FOREACH framework IN frameworks%] | 
            
              | 97 |                 <li> | 
            
              | 98 |                     <a href="#" class="change-framework" data-frameworkcode="[% framework.frameworkcode | html %]"> | 
            
              | 99 |                         [% IF framework.frameworkcode == frameworkcode %] | 
            
              | 100 |                             <i class="fa fa-fw fa-check"></i> | 
            
              | 101 |                         [% ELSE %] | 
            
              | 102 |                             <i class="fa fa-fw"> </i> | 
            
              | 103 |                         [% END %] | 
            
              | 104 |                         [% framework.frameworktext | html %] | 
            
              | 105 |                     </a> | 
            
              | 106 |                 </li> | 
            
              | 107 |             [% END %] | 
            
              | 108 |         </ul> | 
            
              | 109 |     </div> | 
            
              | 110 |     <div class="btn-group"> | 
            
              | 111 |         <a class="btn btn-default btn-sm" id="cancel" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | url %]">Cancel</a> | 
            
              | 112 |     </div> | 
            
              | 113 | </div> | 
        
          | 83 |  | 114 |  | 
          
            
              | 84 |         $("#saveanditems").click(function(){ | 115 | [% IF ( popup ) %] | 
            
              | 85 |             $(".btn-group").removeClass("open"); | 116 |         <input type="hidden" name="mode" value="popup" /> | 
            
              | 86 |             redirect("items"); | 117 | [% END %] | 
            
              | 87 |             return false; | 118 |         <input type="hidden" name="op" value="add" /> | 
            
              | 88 |         }); | 119 |         <input type="hidden" id="frameworkcode" name="frameworkcode" value="[% frameworkcode | html %]" /> | 
            
              | 89 |         $("#saveandcontinue").click(function(){ | 120 |         <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> | 
            
              | 90 |             $(".btn-group").removeClass("open"); | 121 |         <input type="hidden" name="holding_id" value="[% holding_id | html %]" /> | 
            
              | 91 |             var tab = $("#addholdingtabs li.ui-tabs-active:first a").attr('href'); | 122 |         <input type="hidden" name="changed_framework" value="" /> | 
            
              | 92 |             tab = tab.replace('#', ''); |  |  | 
            
              | 93 |             $("#current_tab").val(tab); | 
            
              | 94 |             redirect("just_save", tab); | 
            
              | 95 |             return false; | 
            
              | 96 |         }); | 
        
          | 97 |  | 123 |  | 
          
            
              | 98 |         $( '#switcheditor' ).click( function() { | 124 | <div id="addholdingtabs" class="toptabs numbered"> | 
            
              |  |  | 125 |     <ul> | 
            
              | 126 |         [% FOREACH BIG_LOO IN BIG_LOOP %] | 
            
              | 127 |         <li><a href="#tab[% BIG_LOO.number | uri %]XX">[% BIG_LOO.number | html %]</a></li> | 
            
              | 128 |         [% END %] | 
            
              | 129 |     </ul> | 
        
          | 99 |  | 130 |  | 
          
            
              | 100 |             if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return false; | 131 | [% FOREACH BIG_LOO IN BIG_LOOP %] | 
            
              |  |  | 132 |     <div id="tab[% BIG_LOO.number | html %]XX"> | 
        
          | 101 |  | 133 |  | 
          
            
              | 102 |             $.cookie( 'catalogue_editor_[% USER_INFO.borrowernumber | html %]', 'advanced', { expires: 365, path: '/' } ); | 134 |     [% FOREACH innerloo IN BIG_LOO.innerloop %] | 
            
              |  |  | 135 |     [% IF ( innerloo.tag ) %] | 
            
              | 136 |     <div class="tag" id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]"> | 
            
              | 137 |         <div class="tag_title" id="div_indicator_tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]"> | 
            
              | 138 |             [% IF advancedMARCEditor %] | 
            
              | 139 |                 <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib | html %] - Click to Expand this Tag" onclick="ExpandField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;">[% innerloo.tag | html %]</a> | 
            
              | 140 |             [% ELSE %] | 
            
              | 141 |                 <span class="tagnum" title="[% innerloo.tag_lib | html %]">[% innerloo.tag | html %]</span> | 
            
              | 142 |                 [% IF marcflavour != 'NORMARC' %]<a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag | html %]'); return false;"> ?</a>[% END %] | 
            
              | 143 |             [% END %] | 
            
              | 144 |                 [% IF ( innerloo.fixedfield ) %] | 
            
              | 145 |                     <input type="text" | 
            
              | 146 |                         tabindex="1" | 
            
              | 147 |                         class="indicator flat" | 
            
              | 148 |                         style="display:none;" | 
            
              | 149 |                         name="tag_[% innerloo.tag | html %]_indicator1_[% innerloo.index | html %][% innerloo.random | html %]" | 
            
              | 150 |                         size="1" | 
            
              | 151 |                         maxlength="1" | 
            
              | 152 |                         value="[% innerloo.indicator1 | html %]" /> | 
            
              | 153 |                     <input type="text" | 
            
              | 154 |                         tabindex="1" | 
            
              | 155 |                         class="indicator flat" | 
            
              | 156 |                         style="display:none;" | 
            
              | 157 |                         name="tag_[% innerloo.tag | html %]_indicator2_[% innerloo.index | html %][% innerloo.random | html %]" | 
            
              | 158 |                         size="1" | 
            
              | 159 |                         maxlength="1" | 
            
              | 160 |                         value="[% innerloo.indicator2 | html %]" /> | 
            
              | 161 |                 [% ELSE %] | 
            
              | 162 |                     <input type="text" | 
            
              | 163 |                         tabindex="1" | 
            
              | 164 |                         class="indicator flat" | 
            
              | 165 |                         name="tag_[% innerloo.tag | html %]_indicator1_[% innerloo.index | html %][% innerloo.random | html %]" | 
            
              | 166 |                         size="1" | 
            
              | 167 |                         maxlength="1" | 
            
              | 168 |                         value="[% innerloo.indicator1 | html %]" /> | 
            
              | 169 |                     <input type="text" | 
            
              | 170 |                         tabindex="1" | 
            
              | 171 |                         class="indicator flat" | 
            
              | 172 |                         name="tag_[% innerloo.tag | html %]_indicator2_[% innerloo.index | html %][% innerloo.random | html %]" | 
            
              | 173 |                         size="1" | 
            
              | 174 |                         maxlength="1" | 
            
              | 175 |                         value="[% innerloo.indicator2 | html %]" /> | 
            
              | 176 |                 [% END %] - | 
        
          | 103 |  | 177 |  | 
          
            
              | 104 |             var holding_id = [% holding_id || "''" | html %]; | 178 |             [% UNLESS advancedMARCEditor %] | 
            
              | 105 |             window.location = '/cgi-bin/koha/cataloguing/editor.pl#catalog/' + biblionumber + '/holdings/' + holding_id; | 179 |                 <a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;" title="Click to Expand this Tag">[% innerloo.tag_lib | html %]</a> | 
            
              |  |  | 180 |             [% END %] | 
            
              | 181 |                 <span class="field_controls"> | 
            
              | 182 |                 [% IF ( innerloo.repeatable ) %] | 
            
              | 183 |                     <a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]','0','[% advancedMARCEditor | html %]'); return false;" title="Repeat this Tag"> | 
            
              | 184 |                         <img src="[% interface | html %]/[% theme | html %]/img/repeat-tag.png" alt="Repeat this Tag" /> | 
            
              | 185 |                     </a> | 
            
              | 186 |                 [% END %] | 
            
              | 187 |                     <a href="#" tabindex="1" class="buttonMinus" onclick="UnCloneField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;" title="Delete this Tag"> | 
            
              | 188 |                         <img src="[% interface | html %]/[% theme | html %]/img/delete-tag.png" alt="Delete this Tag" /> | 
            
              | 189 |                     </a> | 
            
              | 190 |                 </span> | 
        
          | 106 |  | 191 |  | 
          
            
              | 107 |             return false; | 192 |         </div> | 
            
              | 108 |         } ); |  |  | 
            
              | 109 |         $(".change-framework").on("click", function(){ | 
            
              | 110 |             var frameworkcode = $(this).data("frameworkcode"); | 
            
              | 111 |             $("#frameworkcode").val( frameworkcode ); | 
            
              | 112 |             Changefwk(); | 
            
              | 113 |         }); | 
            
              | 114 |     }); | 
        
          | 115 |  | 193 |  | 
          
            
              | 116 | function redirect(dest){ | 194 |         [% FOREACH subfield_loo IN innerloo.subfield_loop %] | 
            
              | 117 |     $("#redirect").attr("value",dest); | 195 |             <!--  One line on the marc editor --> | 
            
              | 118 |     return Check(); | 196 |             <div class="subfield_line" style="[% subfield_loo.visibility | html %]" id="subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]"> | 
            
              | 119 | } |  |  | 
        
          | 120 |  | 197 |  | 
          
            
              | 121 | [% IF ( CAN_user_editcatalogue_edit_items ) %] | 198 |                 [% UNLESS advancedMARCEditor %] | 
            
              |  |  | 199 |                     [% IF ( subfield_loo.fixedfield ) %]<label for="tag_[% subfield_loo.tag | html %]_subfield_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" style="display:none;" class="labelsubfield"> | 
            
              | 200 |                     [% ELSE %]<label for="tag_[% subfield_loo.tag | html %]_subfield_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" class="labelsubfield"> | 
            
              | 201 |                     [% END %] | 
            
              | 202 |                 [% END %] | 
            
              | 203 |  | 
            
              | 204 |                 <span class="subfieldcode"> | 
            
              | 205 |                     [% IF ( subfield_loo.fixedfield ) %] | 
            
              | 206 |                         <img class="buttonUp" style="display:none;" src="[% interface | html %]/[% theme | html %]/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]')" alt="Move Up" title="Move Up" /> | 
            
              | 207 |                     [% ELSE %] | 
            
              | 208 |                         <img class="buttonUp" src="[% interface | html %]/[% theme | html %]/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]')" alt="Move Up" title="Move Up" /> | 
            
              | 209 |                     [% END %] | 
            
              | 210 |                         <input type="text" | 
            
              | 211 |                             title="[% subfield_loo.marc_lib | html %]" | 
            
              | 212 |                             style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;" | 
            
              | 213 |                             name="tag_[% subfield_loo.tag | html %]_code_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" | 
            
              | 214 |                             value="[% subfield_loo.subfield | html %]" | 
            
              | 215 |                             size="1" | 
            
              | 216 |                             maxlength="1" | 
            
              | 217 |                             class="flat" | 
            
              | 218 |                             tabindex="0" /> | 
            
              | 219 |                 </span> | 
            
              | 220 |  | 
            
              | 221 |                 [% UNLESS advancedMARCEditor %] | 
            
              | 222 |                     [% IF ( subfield_loo.mandatory ) %]<span class="subfield subfield_mandatory">[% ELSE %]<span class="subfield">[% END %] | 
            
              | 223 |                         [% subfield_loo.marc_lib | html %] | 
            
              | 224 |                         [% IF ( subfield_loo.mandatory ) %]<span class="mandatory_marker" title="This field is mandatory">*</span>[% END %] | 
            
              | 225 |                     </span> | 
            
              | 226 |                     </label> | 
            
              | 227 |                 [% END %] | 
            
              | 228 |  | 
            
              | 229 |                 [% SET mv = subfield_loo.marc_value %] | 
            
              | 230 |                 [% IF ( mv.type == 'text' ) %] | 
            
              | 231 |                     [% IF ( mv.readonly == 1 ) %] | 
            
              | 232 |                     <input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor readonly" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" readonly="readonly" /> | 
            
              | 233 |                     [% ELSE %] | 
            
              | 234 |                     <input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" /> | 
            
              | 235 |                     [% END %] | 
            
              | 236 |                     [% IF ( mv.authtype ) %] | 
            
              | 237 |                     <span class="subfield_controls"><a href="#" class="buttonDot tag_editor" onclick="openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id,'[%- mv.authtype | html -%]','holding'); return false;" tabindex="1" title="Tag editor">Tag editor</a></span> | 
            
              | 238 |                     [% END %] | 
            
              | 239 |                 [% ELSIF ( mv.type == 'text_complex' ) %] | 
            
              | 240 |                     <input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor framework_plugin" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" /> | 
            
              | 241 |                     <span class="subfield_controls"> | 
            
              | 242 |                         [% IF mv.noclick %] | 
            
              | 243 |                             <a href="#" class="buttonDot tag_editor disabled" tabindex="-1" title="No popup"></a> | 
            
              | 244 |                         [% ELSE %] | 
            
              | 245 |                             <a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot tag_editor framework_plugin" tabindex="1" title="Tag editor">Tag editor</a> | 
            
              | 246 |                         [% END %] | 
            
              | 247 |                     </span> | 
            
              | 248 |                     [% mv.javascript | $raw %] | 
            
              | 249 |                 [% ELSIF ( mv.type == 'hidden' ) %] | 
            
              | 250 |                     <input tabindex="1" type="hidden" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" /> | 
            
              | 251 |                 [% ELSIF ( mv.type == 'textarea' ) %] | 
            
              | 252 |                     <textarea cols="70" rows="4" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" class="input_marceditor" tabindex="1">[%- mv.value | html -%]</textarea> | 
            
              | 253 |                 [% ELSIF ( mv.type == 'select' ) %] | 
            
              | 254 |                     <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]"> | 
            
              | 255 |                     [% FOREACH aval IN mv.values %] | 
            
              | 256 |                         [% IF aval == mv.default %] | 
            
              | 257 |                         <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option> | 
            
              | 258 |                         [% ELSE %] | 
            
              | 259 |                         <option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option> | 
            
              | 260 |                         [% END %] | 
            
              | 261 |                     [% END %] | 
            
              | 262 |                     </select> | 
            
              | 263 |                 [% END %] | 
            
              | 264 |  | 
            
              | 265 |                 <span class="subfield_controls"> | 
            
              | 266 |                 [% IF ( subfield_loo.repeatable ) %] | 
            
              | 267 |                     <a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]','[% advancedMARCEditor | html %]'); return false;"> | 
            
              | 268 |                         <img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" /> | 
            
              | 269 |                     </a> | 
            
              | 270 |                     <a href="#" class="buttonMinus" tabindex="1" onclick="UnCloneField('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]'); return false;"> | 
            
              | 271 |                         <img src="[% interface | html %]/[% theme | html %]/img/delete-subfield.png" alt="Delete" title="Delete this subfield" /> | 
            
              | 272 |                     </a> | 
            
              | 273 |                 [% END %] | 
            
              | 274 |                 </span> | 
            
              | 275 |  | 
            
              | 276 |             </div> | 
            
              | 277 |             <!-- End of the line --> | 
            
              | 278 |         [% END %] | 
            
              | 279 |  | 
            
              | 280 |     </div> | 
            
              | 281 |     [% END %]<!-- if innerloo.tag --> | 
            
              | 282 |     [% END %]<!-- BIG_LOO.innerloop --> | 
            
              | 283 |     </div> | 
            
              | 284 | [% END %]<!-- BIG_LOOP --> | 
            
              | 285 |  | 
            
              | 286 | </div><!-- tabs --> | 
            
              | 287 |  | 
            
              | 288 | </form> | 
            
              | 289 |  | 
            
              | 290 | </div> | 
            
              | 291 | </div> | 
            
              | 292 | </div> | 
            
              | 293 |  | 
            
              | 294 | <script> | 
            
              | 295 |     var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10)); | 
            
              | 296 |     browser.show(); | 
            
              | 297 |  | 
            
              | 298 |     $(window).load(function() { | 
            
              | 299 |         $("#loading").hide(); | 
            
              | 300 |     }); | 
            
              | 301 |     var Sticky; | 
            
              | 302 |     $(document).ready(function() { | 
            
              | 303 |         $('#addholdingtabs').tabs().bind('show.ui-tabs', function(e, ui) { | 
            
              | 304 |             $("#"+ui.panel.id+" input:eq(0)").focus(); | 
            
              | 305 |         }); | 
            
              | 306 |  | 
            
              | 307 |         [% IF tab %] | 
            
              | 308 |             $('#addholdingtabs').selectTabByID("#[% tab | html %]"); | 
            
              | 309 |         [% END %] | 
            
              | 310 |  | 
            
              | 311 |         Sticky = $("#toolbar"); | 
            
              | 312 |         Sticky.hcSticky({ | 
            
              | 313 |             stickTo: ".main", | 
            
              | 314 |             stickyClass: "floating" | 
            
              | 315 |         }); | 
            
              | 316 |  | 
            
              | 317 |         /* check cookie to hide/show marcdocs*/ | 
            
              | 318 |         if($.cookie("marcdocs_[% borrowernumber | html %]") == 'hide'){ | 
            
              | 319 |             toggleMARCdocLinks(false); | 
            
              | 320 |         } else { | 
            
              | 321 |             toggleMARCdocLinks(true); | 
            
              | 322 |         } | 
            
              | 323 |  | 
            
              | 324 |         $("#marcDocsSelect").click(function(){ | 
            
              | 325 |             if($.cookie("marcdocs_[% borrowernumber | html %]") == 'hide'){ | 
            
              | 326 |                 toggleMARCdocLinks(true); | 
            
              | 327 |             } else { | 
            
              | 328 |                 toggleMARCdocLinks(false); | 
            
              | 329 |             } | 
            
              | 330 |         }); | 
            
              | 331 |  | 
            
              | 332 |         /* check cookie to hide/show marc tags*/ | 
            
              | 333 |         var marctags_cookie = $.cookie("marctags_[% borrowernumber | html %]"); | 
            
              | 334 |         if (marctags_cookie == 'hide'){ | 
            
              | 335 |             toggleMARCTagLinks(false); | 
            
              | 336 |         } else if( marctags_cookie == 'show'){ | 
            
              | 337 |             toggleMARCTagLinks(true) | 
            
              | 338 |         } else { | 
            
              | 339 |             [% UNLESS Koha.Preference("hide_marc") %] | 
            
              | 340 |                 toggleMARCTagLinks(true) | 
            
              | 341 |             [% ELSE %] | 
            
              | 342 |                 toggleMARCTagLinks(false); | 
            
              | 343 |             [% END %] | 
            
              | 344 |         } | 
            
              | 345 |  | 
            
              | 346 |         $("#marcTagsSelect").click(function(){ | 
            
              | 347 |             if( $.cookie("marctags_[% borrowernumber | html %]") == 'hide'){ | 
            
              | 348 |                 toggleMARCTagLinks(true) | 
            
              | 349 |             } else { | 
            
              | 350 |                 toggleMARCTagLinks(false); | 
            
              | 351 |             } | 
            
              | 352 |         }); | 
            
              | 353 |  | 
            
              | 354 |         $("#saverecord").click(function(){ | 
            
              | 355 |             $(".btn-group").removeClass("open"); | 
            
              | 356 |             onOption(); | 
            
              | 357 |             return false; | 
            
              | 358 |         }); | 
            
              | 359 |  | 
            
              | 360 |         $("#saveandview").click(function(){ | 
            
              | 361 |             $(".btn-group").removeClass("open"); | 
            
              | 362 |             redirect("view"); | 
            
              | 363 |             return false; | 
            
              | 364 |         }); | 
            
              | 365 |  | 
            
              | 366 |         $("#saveanditems").click(function(){ | 
            
              | 367 |             $(".btn-group").removeClass("open"); | 
            
              | 368 |             redirect("items"); | 
            
              | 369 |             return false; | 
            
              | 370 |         }); | 
            
              | 371 |         $("#saveandcontinue").click(function(){ | 
            
              | 372 |             $(".btn-group").removeClass("open"); | 
            
              | 373 |             var tab = $("#addholdingtabs li.ui-tabs-active:first a").attr('href'); | 
            
              | 374 |             tab = tab.replace('#', ''); | 
            
              | 375 |             $("#current_tab").val(tab); | 
            
              | 376 |             redirect("just_save", tab); | 
            
              | 377 |             return false; | 
            
              | 378 |         }); | 
            
              | 379 |  | 
            
              | 380 |         $( '#switcheditor' ).click( function() { | 
            
              | 381 |  | 
            
              | 382 |             if ( !confirm( _("Any changes will not be saved. Continue?") ) ) return false; | 
            
              | 383 |  | 
            
              | 384 |             $.cookie( 'catalogue_editor_[% USER_INFO.borrowernumber | html %]', 'advanced', { expires: 365, path: '/' } ); | 
            
              | 385 |  | 
            
              | 386 |             var holding_id = [% holding_id || "''" | html %]; | 
            
              | 387 |             window.location = '/cgi-bin/koha/cataloguing/editor.pl#catalog/' + biblionumber + '/holdings/' + holding_id; | 
            
              | 388 |  | 
            
              | 389 |             return false; | 
            
              | 390 |         } ); | 
            
              | 391 |         $(".change-framework").on("click", function(){ | 
            
              | 392 |             var frameworkcode = $(this).data("frameworkcode"); | 
            
              | 393 |             $("#frameworkcode").val( frameworkcode ); | 
            
              | 394 |             Changefwk(); | 
            
              | 395 |         }); | 
            
              | 396 |     }); | 
            
              | 397 |  | 
            
              | 398 | function redirect(dest){ | 
            
              | 399 |     $("#redirect").attr("value",dest); | 
            
              | 400 |     return Check(); | 
            
              | 401 | } | 
            
              | 402 |  | 
            
              | 403 | [% IF ( CAN_user_editcatalogue_edit_items ) %] | 
        
          | 122 |     var onOption = function () { | 404 |     var onOption = function () { | 
        
          | 123 |         return Check(); | 405 |         return Check(); | 
        
          | 124 |     } | 406 |     } | 
  
    | Lines 329-624
          function Changefwk() {
      
      
        Link Here | 
        
          | 329 |     f.submit(); | 611 |     f.submit(); | 
        
          | 330 | } | 612 | } | 
        
          | 331 |  | 613 |  | 
          
            
              | 332 | //]]> | 614 | $(document).ready(function() { | 
            
              | 333 | </script> |  |  | 
            
              | 334 | [% Asset.css("css/addholding.css") | $raw %] | 
            
              | 335 |  | 
            
              | 336 | [% INCLUDE 'select2.inc' %] | 
            
              | 337 | <script> | 
            
              | 338 |   $(document).ready(function() { | 
        
          | 339 |     $('.subfield_line select').select2(); | 615 |     $('.subfield_line select').select2(); | 
          
            
              | 340 |   }); | 616 | }); | 
        
          | 341 | </script> | 617 | </script> | 
        
          | 342 |  | 618 |  | 
            
              | 343 | [% IF ( bidi ) %] |  |  | 
            
              | 344 |    [% Asset.css("css/right-to-left.css") | $raw %] | 
            
              | 345 | [% END %] | 
            
              | 346 | </head> | 
            
              | 347 | <body id="cat_addholding" class="cat"> | 
            
              | 348 |  | 
            
              | 349 |    <div id="loading"> | 
            
              | 350 |        <div>Loading, please wait...</div> | 
            
              | 351 |    </div> | 
            
              | 352 |  | 
            
              | 353 | [% INCLUDE 'header.inc' %] | 
            
              | 354 |  | 
            
              | 355 | <div id="breadcrumbs"> | 
            
              | 356 |           <a href="/cgi-bin/koha/mainpage.pl">Home</a> | 
            
              | 357 |  › <a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a> | 
            
              | 358 |  › Edit <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber | html %]">[% title | html %] [% IF ( author ) %] by [% author | html %][% END %] (Record #[% biblionumber | html %])</a> | 
            
              | 359 |  › <a href="/cgi-bin/koha/cataloguing/addholding.pl?biblionumber=[% biblionumber | html %]">Holdings</a> | 
            
              | 360 | </div> | 
            
              | 361 |  | 
            
              | 362 | <div class="main container-fluid"> | 
            
              | 363 |     <div class="row"> | 
            
              | 364 |         <div class="col-md-10 col-md-offset-1"> | 
            
              | 365 |  | 
            
              | 366 | <h1> | 
            
              | 367 | [% IF ( holding_id ) %]Editing holdings record number [% holding_id | html %] | 
            
              | 368 | [% ELSE %]Add holdings record | 
            
              | 369 | [% END %] | 
            
              | 370 | </h1> | 
            
              | 371 |  | 
            
              | 372 | [% IF ( error_items_exist ) %]<div class="dialog alert"><strong>This holdings record has items attached.</strong> Please delete them first.</div>[% END %] | 
            
              | 373 | [% IF ( error_delete_failed ) %]<div class="dialog alert"><strong>Error deleting the record.</strong></div>[% END %] | 
            
              | 374 |  | 
            
              | 375 | [% IF ( done ) %] | 
            
              | 376 |     <script type="text/javascript"> | 
            
              | 377 |         opener.document.forms['f'].holding_id.value=[% holding_id | html %]; | 
            
              | 378 |         window.close(); | 
            
              | 379 |     </script> | 
            
              | 380 | [% ELSE %] | 
            
              | 381 |     <form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addholding.pl" onsubmit="return Check();"> | 
            
              | 382 |     <input type="hidden" value="[% IF ( holding_id ) %]view[% ELSE %]holdings[% END %]" id="redirect" name="redirect" /> | 
            
              | 383 |     <input type="hidden" value="" id="current_tab" name="current_tab" /> | 
            
              | 384 | [% END %] | 
            
              | 385 |  | 
            
              | 386 | <div id="toolbar" class="btn-toolbar"> | 
            
              | 387 |     [% IF CAN_user_editcatalogue_edit_items %] | 
            
              | 388 |         <div class="btn-group"> | 
            
              | 389 |             <button class="btn btn-default btn-sm" id="saverecord"><i class="fa fa-save"></i> Save</button> | 
            
              | 390 |             <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"> | 
            
              | 391 |             <span class="caret"></span> | 
            
              | 392 |             </button> | 
            
              | 393 |             <ul class="dropdown-menu"> | 
            
              | 394 |                 <li><a id="saveandview" href="#">Save and view record</a></li> | 
            
              | 395 |                 <li><a id="saveanditems" href="#">Save and edit items</a></li> | 
            
              | 396 |                 <li><a id="saveandcontinue" href="#">Save and continue editing</a></li> | 
            
              | 397 |             </ul> | 
            
              | 398 |         </div> | 
            
              | 399 |     [% END %] | 
            
              | 400 |  | 
            
              | 401 |     <div class="btn-group"> | 
            
              | 402 |         <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><i class="fa fa-cog"></i> Settings <span class="caret"></span></button> | 
            
              | 403 |         <ul id="settings-menu" class="dropdown-menu"> | 
            
              | 404 |             [% IF Koha.Preference( 'EnableAdvancedCatalogingEditor' ) == 1 %] | 
            
              | 405 |                 [% # disabled until supported <li><a href="#" id="switcheditor">Switch to advanced editor</a></li> %] | 
            
              | 406 |             [% END %] | 
            
              | 407 |             [% IF marcflavour != 'NORMARC' AND NOT advancedMARCEditor %] | 
            
              | 408 |                 <li> | 
            
              | 409 |                     <a href="#" id="marcDocsSelect"><i class="fa fa-check-square-o"></i> Show MARC tag documentation links</a> | 
            
              | 410 |                 <li> | 
            
              | 411 |                     <a href="#" id="marcTagsSelect"><i class="fa fa-check-square-o"></i> Show tags</a> | 
            
              | 412 |                 </li> | 
            
              | 413 |             [% END %] | 
            
              | 414 |             <li class="divider"></li> | 
            
              | 415 |             <li class="nav-header">Change framework</li> | 
            
              | 416 |             <li> | 
            
              | 417 |                 <a href="#" class="change-framework" data-frameworkcode=""> | 
            
              | 418 |                     [% IF ( frameworkcode ) %] | 
            
              | 419 |                        <i class="fa fa-fw"> </i> | 
            
              | 420 |                     [% ELSE %] | 
            
              | 421 |                         <i class="fa fa-fw fa-check"></i> | 
            
              | 422 |                     [% END %] | 
            
              | 423 |                     Default | 
            
              | 424 |                 </a> | 
            
              | 425 |             </li> | 
            
              | 426 |             [% FOREACH framework IN frameworks%] | 
            
              | 427 |                 <li> | 
            
              | 428 |                     <a href="#" class="change-framework" data-frameworkcode="[% framework.frameworkcode | html %]"> | 
            
              | 429 |                         [% IF framework.frameworkcode == frameworkcode %] | 
            
              | 430 |                             <i class="fa fa-fw fa-check"></i> | 
            
              | 431 |                         [% ELSE %] | 
            
              | 432 |                             <i class="fa fa-fw"> </i> | 
            
              | 433 |                         [% END %] | 
            
              | 434 |                         [% framework.frameworktext | html %] | 
            
              | 435 |                     </a> | 
            
              | 436 |                 </li> | 
            
              | 437 |             [% END %] | 
            
              | 438 |         </ul> | 
            
              | 439 |     </div> | 
            
              | 440 |     <div class="btn-group"> | 
            
              | 441 |         <a class="btn btn-default btn-sm" id="cancel" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | url %]">Cancel</a> | 
            
              | 442 |     </div> | 
            
              | 443 | </div> | 
            
              | 444 |  | 
            
              | 445 | [% IF ( popup ) %] | 
            
              | 446 |         <input type="hidden" name="mode" value="popup" /> | 
            
              | 447 | [% END %] | 
            
              | 448 |         <input type="hidden" name="op" value="add" /> | 
            
              | 449 |         <input type="hidden" id="frameworkcode" name="frameworkcode" value="[% frameworkcode | html %]" /> | 
            
              | 450 |         <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> | 
            
              | 451 |         <input type="hidden" name="holding_id" value="[% holding_id | html %]" /> | 
            
              | 452 |         <input type="hidden" name="changed_framework" value="" /> | 
            
              | 453 |  | 
            
              | 454 | <div id="addholdingtabs" class="toptabs numbered"> | 
            
              | 455 |     <ul> | 
            
              | 456 |         [% FOREACH BIG_LOO IN BIG_LOOP %] | 
            
              | 457 |         <li><a href="#tab[% BIG_LOO.number | html %]XX">[% BIG_LOO.number | html %]</a></li> | 
            
              | 458 |         [% END %] | 
            
              | 459 |     </ul> | 
            
              | 460 |  | 
            
              | 461 | [% FOREACH BIG_LOO IN BIG_LOOP %] | 
            
              | 462 |     <div id="tab[% BIG_LOO.number | html %]XX"> | 
            
              | 463 |  | 
            
              | 464 |     [% FOREACH innerloo IN BIG_LOO.innerloop %] | 
            
              | 465 |     [% IF ( innerloo.tag ) %] | 
            
              | 466 |     <div class="tag" id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]"> | 
            
              | 467 |         <div class="tag_title" id="div_indicator_tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]"> | 
            
              | 468 |             [% IF advancedMARCEditor %] | 
            
              | 469 |                 <a href="#" tabindex="1" class="tagnum" title="[% innerloo.tag_lib | html %] - Click to Expand this Tag" onclick="ExpandField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;">[% innerloo.tag %]</a> | 
            
              | 470 |             [% ELSE %] | 
            
              | 471 |                 <span class="tagnum" title="[% innerloo.tag_lib %]">[% innerloo.tag | html %]</span> | 
            
              | 472 |                 [% IF marcflavour != 'NORMARC' %]<a href="#" class="marcdocs" onclick="PopupMARCFieldDoc('[% innerloo.tag | html %]'); return false;"> ?</a>[% END %] | 
            
              | 473 |             [% END %] | 
            
              | 474 |                 [% IF ( innerloo.fixedfield ) %] | 
            
              | 475 |                     <input type="text" | 
            
              | 476 |                         tabindex="1" | 
            
              | 477 |                         class="indicator flat" | 
            
              | 478 |                         style="display:none;" | 
            
              | 479 |                         name="tag_[% innerloo.tag | html %]_indicator1_[% innerloo.index | html %][% innerloo.random | html %]" | 
            
              | 480 |                         size="1" | 
            
              | 481 |                         maxlength="1" | 
            
              | 482 |                         value="[% innerloo.indicator1 | html %]" /> | 
            
              | 483 |                     <input type="text" | 
            
              | 484 |                         tabindex="1" | 
            
              | 485 |                         class="indicator flat" | 
            
              | 486 |                         style="display:none;" | 
            
              | 487 |                         name="tag_[% innerloo.tag | html %]_indicator2_[% innerloo.index | html %][% innerloo.random | html %]" | 
            
              | 488 |                         size="1" | 
            
              | 489 |                         maxlength="1" | 
            
              | 490 |                         value="[% innerloo.indicator2 | html %]" /> | 
            
              | 491 |                 [% ELSE %] | 
            
              | 492 |                     <input type="text" | 
            
              | 493 |                         tabindex="1" | 
            
              | 494 |                         class="indicator flat" | 
            
              | 495 |                         name="tag_[% innerloo.tag | html %]_indicator1_[% innerloo.index | html %][% innerloo.random | html %]" | 
            
              | 496 |                         size="1" | 
            
              | 497 |                         maxlength="1" | 
            
              | 498 |                         value="[% innerloo.indicator1 | html %]" /> | 
            
              | 499 |                     <input type="text" | 
            
              | 500 |                         tabindex="1" | 
            
              | 501 |                         class="indicator flat" | 
            
              | 502 |                         name="tag_[% innerloo.tag | html %]_indicator2_[% innerloo.index | html %][% innerloo.random | html %]" | 
            
              | 503 |                         size="1" | 
            
              | 504 |                         maxlength="1" | 
            
              | 505 |                         value="[% innerloo.indicator2 | html %]" /> | 
            
              | 506 |                 [% END %] - | 
            
              | 507 |  | 
            
              | 508 |             [% UNLESS advancedMARCEditor %] | 
            
              | 509 |                 <a href="#" tabindex="1" class="expandfield" onclick="ExpandField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;" title="Click to Expand this Tag">[% innerloo.tag_lib | html %]</a> | 
            
              | 510 |             [% END %] | 
            
              | 511 |                 <span class="field_controls"> | 
            
              | 512 |                 [% IF ( innerloo.repeatable ) %] | 
            
              | 513 |                     <a href="#" tabindex="1" class="buttonPlus" onclick="CloneField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]','0','[% advancedMARCEditor | html %]'); return false;" title="Repeat this Tag"> | 
            
              | 514 |                         <img src="[% interface | html %]/[% theme | html %]/img/repeat-tag.png" alt="Repeat this Tag" /> | 
            
              | 515 |                     </a> | 
            
              | 516 |                 [% END %] | 
            
              | 517 |                     <a href="#" tabindex="1" class="buttonMinus" onclick="UnCloneField('tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]'); return false;" title="Delete this Tag"> | 
            
              | 518 |                         <img src="[% interface | html %]/[% theme | html %]/img/delete-tag.png" alt="Delete this Tag" /> | 
            
              | 519 |                     </a> | 
            
              | 520 |                 </span> | 
            
              | 521 |  | 
            
              | 522 |         </div> | 
            
              | 523 |  | 
            
              | 524 |         [% FOREACH subfield_loo IN innerloo.subfield_loop %] | 
            
              | 525 |             <!--  One line on the marc editor --> | 
            
              | 526 |             <div class="subfield_line" style="[% subfield_loo.visibility | html %]" id="subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]"> | 
            
              | 527 |  | 
            
              | 528 |                 [% UNLESS advancedMARCEditor %] | 
            
              | 529 |                     [% IF ( subfield_loo.fixedfield ) %]<label for="tag_[% subfield_loo.tag | html %]_subfield_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" style="display:none;" class="labelsubfield"> | 
            
              | 530 |                     [% ELSE %]<label for="tag_[% subfield_loo.tag | html %]_subfield_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" class="labelsubfield"> | 
            
              | 531 |                     [% END %] | 
            
              | 532 |                 [% END %] | 
            
              | 533 |  | 
            
              | 534 |                 <span class="subfieldcode"> | 
            
              | 535 |                     [% IF ( subfield_loo.fixedfield ) %] | 
            
              | 536 |                         <img class="buttonUp" style="display:none;" src="[% interface | html %]/[% theme | html %]/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]')" alt="Move Up" title="Move Up" /> | 
            
              | 537 |                     [% ELSE %] | 
            
              | 538 |                         <img class="buttonUp" src="[% interface | html %]/[% theme | html %]/img/up.png" onclick="upSubfield('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]')" alt="Move Up" title="Move Up" /> | 
            
              | 539 |                     [% END %] | 
            
              | 540 |                         <input type="text" | 
            
              | 541 |                             title="[% subfield_loo.marc_lib | html %]" | 
            
              | 542 |                             style=" [% IF ( subfield_loo.fixedfield ) %]display:none; [% END %]border:0;" | 
            
              | 543 |                             name="tag_[% subfield_loo.tag | html %]_code_[% subfield_loo.subfield | html %]_[% subfield_loo.index | html %]_[% subfield_loo.index_subfield | html %]" | 
            
              | 544 |                             value="[% subfield_loo.subfield | html %]" | 
            
              | 545 |                             size="1" | 
            
              | 546 |                             maxlength="1" | 
            
              | 547 |                             class="flat" | 
            
              | 548 |                             tabindex="0" /> | 
            
              | 549 |                 </span> | 
            
              | 550 |  | 
            
              | 551 |                 [% UNLESS advancedMARCEditor %] | 
            
              | 552 |                     [% IF ( subfield_loo.mandatory ) %]<span class="subfield subfield_mandatory">[% ELSE %]<span class="subfield">[% END %] | 
            
              | 553 |                         [% subfield_loo.marc_lib %] | 
            
              | 554 |                         [% IF ( subfield_loo.mandatory ) %]<span class="mandatory_marker" title="This field is mandatory">*</span>[% END %] | 
            
              | 555 |                     </span> | 
            
              | 556 |                     </label> | 
            
              | 557 |                 [% END %] | 
            
              | 558 |  | 
            
              | 559 |                 [% SET mv = subfield_loo.marc_value %] | 
            
              | 560 |                 [% IF ( mv.type == 'text' ) %] | 
            
              | 561 |                     [% IF ( mv.readonly == 1 ) %] | 
            
              | 562 |                     <input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor readonly" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" readonly="readonly" /> | 
            
              | 563 |                     [% ELSE %] | 
            
              | 564 |                     <input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" /> | 
            
              | 565 |                     [% END %] | 
            
              | 566 |                     [% IF ( mv.authtype ) %] | 
            
              | 567 |                     <span class="subfield_controls"><a href="#" class="buttonDot tag_editor" onclick="openAuth(this.parentNode.parentNode.getElementsByTagName('input')[1].id,'[%- mv.authtype | html -%]','holding'); return false;" tabindex="1" title="Tag editor">Tag editor</a></span> | 
            
              | 568 |                     [% END %] | 
            
              | 569 |                 [% ELSIF ( mv.type == 'text_complex' ) %] | 
            
              | 570 |                     <input type="text" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" value="[%- mv.value | html -%]" class="input_marceditor framework_plugin" tabindex="1" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" /> | 
            
              | 571 |                     <span class="subfield_controls"> | 
            
              | 572 |                         [% IF mv.noclick %] | 
            
              | 573 |                             <a href="#" class="buttonDot tag_editor disabled" tabindex="-1" title="No popup"></a> | 
            
              | 574 |                         [% ELSE %] | 
            
              | 575 |                             <a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot tag_editor framework_plugin" tabindex="1" title="Tag editor">Tag editor</a> | 
            
              | 576 |                         [% END %] | 
            
              | 577 |                     </span> | 
            
              | 578 |                     [% mv.javascript %] | 
            
              | 579 |                 [% ELSIF ( mv.type == 'hidden' ) %] | 
            
              | 580 |                     <input tabindex="1" type="hidden" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" size="[%- mv.size | html -%]" maxlength="[%- mv.maxlength | html -%]" value="[%- mv.value | html -%]" /> | 
            
              | 581 |                 [% ELSIF ( mv.type == 'textarea' ) %] | 
            
              | 582 |                     <textarea cols="70" rows="4" id="[%- mv.id | html -%]" name="[%- mv.name | html -%]" class="input_marceditor" tabindex="1">[%- mv.value -%]</textarea> | 
            
              | 583 |                 [% ELSIF ( mv.type == 'select' ) %] | 
            
              | 584 |                     <select name="[%- mv.name | html -%]" tabindex="1" size="1" class="input_marceditor" id="[%- mv.id | html -%]"> | 
            
              | 585 |                     [% FOREACH aval IN mv.values %] | 
            
              | 586 |                         [% IF aval == mv.default %] | 
            
              | 587 |                         <option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option> | 
            
              | 588 |                         [% ELSE %] | 
            
              | 589 |                         <option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option> | 
            
              | 590 |                         [% END %] | 
            
              | 591 |                     [% END %] | 
            
              | 592 |                     </select> | 
            
              | 593 |                 [% END %] | 
            
              | 594 |  | 
            
              | 595 |                 <span class="subfield_controls"> | 
            
              | 596 |                 [% IF ( subfield_loo.repeatable ) %] | 
            
              | 597 |                     <a href="#" class="buttonPlus" tabindex="1" onclick="CloneSubfield('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]','[% advancedMARCEditor | html %]'); return false;"> | 
            
              | 598 |                         <img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" /> | 
            
              | 599 |                     </a> | 
            
              | 600 |                     <a href="#" class="buttonMinus" tabindex="1" onclick="UnCloneField('subfield[% subfield_loo.tag | html %][% subfield_loo.subfield | html %][% subfield_loo.random | html %]'); return false;"> | 
            
              | 601 |                         <img src="[% interface | html %]/[% theme | html %]/img/delete-subfield.png" alt="Delete" title="Delete this subfield" /> | 
            
              | 602 |                     </a> | 
            
              | 603 |                 [% END %] | 
            
              | 604 |                 </span> | 
            
              | 605 |  | 
            
              | 606 |             </div> | 
            
              | 607 |             <!-- End of the line --> | 
            
              | 608 |         [% END %] | 
            
              | 609 |  | 
            
              | 610 |     </div> | 
            
              | 611 |     [% END %]<!-- if innerloo.tag --> | 
            
              | 612 |     [% END %]<!-- BIG_LOO.innerloop --> | 
            
              | 613 |     </div> | 
            
              | 614 | [% END %]<!-- BIG_LOOP --> | 
            
              | 615 |  | 
            
              | 616 | </div><!-- tabs --> | 
            
              | 617 |  | 
            
              | 618 | </form> | 
            
              | 619 |  | 
            
              | 620 | </div> | 
            
              | 621 | </div> | 
            
              | 622 | </div> | 
        
          | 623 |  | 619 |  | 
        
          | 624 | [% INCLUDE 'intranet-bottom.inc' %] | 620 | [% INCLUDE 'intranet-bottom.inc' %] |