Bug 3362: Fixes invalid xhtml in stage-marc-import.tmpl
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / tools / stage-marc-import.tmpl
index de92a33..8660db0 100644 (file)
@@ -3,11 +3,20 @@
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <!-- TMPL_INCLUDE NAME="file-upload.inc" -->
 <!-- TMPL_INCLUDE NAME="background-job.inc" -->
+<style type="text/css">
+       #uploadpanel,#fileuploadstatus,#fileuploadfailed,#jobpanel,#jobstatus,#jobfailed { display : none; }
+       #fileuploadstatus,#jobstatus { margin:.4em; }
+       #fileuploadprogress,#jobprogress{ width:150px;height:10px;border:1px solid #666;background:url('/intranet-tmpl/prog/img/progress.png') -300px 0px no-repeat; }</style>
 <script type="text/javascript">
 //<![CDATA[
-
+$(document).ready(function(){
+       $("#processfile").hide();
+       $("#uploadfile").submit(function(){
+               alert("Hey!");
+       });
+});
 function CheckForm(f) {
-    if (f.uploadedfileid.value == '') {
+    if ($("#fileToUpload").value == '') {
         alert('Please upload a file first.');
     } else {
         return submitBackgroundJob(f);
@@ -22,7 +31,7 @@ function CheckForm(f) {
 <!-- TMPL_INCLUDE NAME="header.inc" -->
 <!-- TMPL_INCLUDE NAME="cat-search.inc" -->
 
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; Stage MARC Records For Import</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo; <!-- TMPL_IF name="uploadmarc" --><a href="/cgi-bin/koha/tools/stage-marc-import.pl">Stage MARC Records For Import</a> &rsaquo; Upload Results<!-- TMPL_ELSE -->Stage MARC Records For Import<!-- /TMPL_IF --></div>
 
 <div id="doc3" class="yui-t2">
    
@@ -31,7 +40,6 @@ function CheckForm(f) {
        <div class="yui-b">
 
 <h1>Stage MARC Records For Import</h1>
-
 <!-- TMPL_IF name="uploadmarc" -->
 <p>MARC Staging results :</p>
 <ul>
@@ -39,17 +47,17 @@ function CheckForm(f) {
        <li><!-- TMPL_VAR name="import_errors" --> records not staged because of MARC error</li>
        <li><!-- TMPL_VAR name="staged" --> records staged</li>
     <!-- TMPL_IF name="checked_matches" -->
-       <li><!-- TMPL_VAR name="matched" --> records with at least one match in catalogue per matching rule 
+       <li><!-- TMPL_VAR name="matched" --> records with at least one match in catalog per matching rule 
         &quot;<!-- TMPL_VAR name="matcher_code" -->&quot;</li>
     <!-- TMPL_ELSE -->
         <!-- TMPL_IF name="matcher_failed" -->
           <li>Record matching failed -- unable to retrieve selected matching rule.</li>
         <!-- TMPL_ELSE -->
-          <li>Did not check for matches with existing records in catalogue</li>
+          <li>Did not check for matches with existing records in catalog</li>
         <!-- /TMPL_IF -->
     <!-- /TMPL_IF -->
        <li><!-- TMPL_VAR name="num_items" --> item records found and staged</li>
-       <<!-- TMPL_IF name="label_batch" -->
+       <!-- TMPL_IF name="label_batch" -->
          <li>New label batch created: # <!-- TMPL_VAR name="label_batch" --> </li>
     <!-- /TMPL_IF -->
        <li><a href="/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=<!-- TMPL_VAR name="import_batch_id" -->">Manage staged records</a></li>
@@ -57,42 +65,49 @@ function CheckForm(f) {
 </ul>
 <!-- TMPL_ELSE -->
 <ul>
-       <li>Select a MARC file to stage in the import reservoir.  It will be parsed, and each valid record staged for later import into the catalogue.</li>
+       <li>Select a MARC file to stage in the import reservoir.  It will be parsed, and each valid record staged for later import into the catalog.</li>
        <li>You can enter a name for this import. It may be useful, when creating a biblio, to remember where the suggested MARC data comes from!</li>
 </ul>
-<fieldset class="rows">
-<legend>Stage records into the reservoir</legend><ol>
+<form method="post" action="<!-- TMPL_VAR name="SCRIPT_NAME" -->" id="uploadfile" enctype="multipart/form-data">
+<fieldset class="rows" id="uploadform">
+<legend>Stage records into the reservoir</legend>
+<ol>
        <li>
         <div id="fileuploadform">
-        <form method="post" action="<!-- TMPL_VAR name="SCRIPT_NAME" -->" enctype="multipart/form-data">
                <label for="fileToUpload">Select the file to stage: </label>
-               <input type="file" id="fileToUpload" name="fileToUpload" /><br />
-        <button class="input" onclick="return ajaxFileUpload();">Upload file</button>
-               </form>
-        <div id="fileuploadstatus" style="display:none">Upload progress: <span id="fileuploadprogress">0</span>%</div>
-        <div id="fileuploadfailed" style="display:none"></div>
-        </div>
-       </li>
-</ol></fieldset>
-    <form method="post" action="<!-- TMPL_VAR name="SCRIPT_NAME" -->" enctype="multipart/form-data">
+               <input type="file" id="fileToUpload" name="fileToUpload" />
+        </div> </li>
+</ol>
+        <fieldset class="action"><button class="submit" onclick="return ajaxFileUpload();">Upload file</button></fieldset>
+</fieldset>
+               
+        <div id="uploadpanel"><div id="fileuploadstatus">Upload progress: <div id="fileuploadprogress"></div> <span id="fileuploadpercent">0</span>%</div>
+        <div id="fileuploadfailed"></div></div>
+</form>
+
+    <form method="post" id="processfile" action="<!-- TMPL_VAR name="SCRIPT_NAME" -->" enctype="multipart/form-data">
 <fieldset class="rows">
         <input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
         <input type="hidden" name="runinbackground" id="runinbackground" value="" />
         <input type="hidden" name="completedJobID" id="completedJobID" value="" />
        <ol><li>
-               <label for="comments">Notes about this file: </label>
+               <label for="comments">Comments about this file: </label>
                <input type="text" id="comments" name="comments" />
                
        </li>
        <li>
                <label for="syntax">Character encoding: </label>
-               <select name="syntax" id="syntax"><option value="MARC21">MARC21</option><option value="UNIMARC">UNIMARC</option></select>
+        <!-- TMPL_IF name="UNIMARC" -->
+            <select name="syntax" id="syntax"><option value="MARC21">MARC21</option><option value="UNIMARC" selected="selected">UNIMARC</option></select>
+        <!-- TMPL_ELSE -->
+            <select name="syntax" id="syntax"><option value="MARC21" selected="selected">MARC21</option><option value="UNIMARC">UNIMARC</option></select>
+        <!-- /TMPL_IF -->
                
        </li>
 </ol></fieldset>
   <fieldset class="rows">
-    <legend>Look for existing records in catalogue?</legend>
-    <ol><li><label for="matcher">Record matching rule</label>
+    <legend>Look for existing records in catalog?</legend>
+    <ol><li><label for="matcher">Record matching rule:</label>
     <select name="matcher" id="matcher">
        <option value="">Do not look for matching records</option> 
        <!-- TMPL_LOOP name="available_matchers" -->
@@ -100,7 +115,14 @@ function CheckForm(f) {
           </option>
        <!-- /TMPL_LOOP -->
     </select>
-    </li></ol>
+    </li>
+      <li><label for="overlay_action">Action if matching bibliographic record found: </label>
+           <!-- TMPL_INCLUDE NAME="tools-overlay-action.inc" -->
+      </li>
+      <li><label for="nomatch_action">Action if no match is found: </label>
+           <!-- TMPL_INCLUDE NAME="tools-nomatch-action.inc" -->
+      </li>
+    </ol>
   </fieldset>
   <fieldset class="rows">
     <legend>Check for embedded item record data?</legend>
@@ -108,26 +130,29 @@ function CheckForm(f) {
       <li class="radio">
         <input type="radio" id="parse_itemsyes" name="parse_items" value="1" checked="checked" />
         <label for="parse_itemsyes">Yes</label>
-         <ul class="inline"><li class="inline">
-           <input type="checkbox" id="create_labelbatch" name="create_labelbatch" />
-           <label for="create_labelbatch">Create a label batch for this import?</label>
-         </li></ul>
       </li>
       <li class="radio">
         <input type="radio" id="parse_itemsno" name="parse_items" value="0" />
         <label for="parse_itemsno">No</label>
       </li>
     </ol>
+    <ol>
+      <li><label for="item_action">How to process items: </label>
+           <!-- TMPL_INCLUDE NAME="tools-item-action.inc" -->
+      </li>
+    </ol>
   </fieldset>
   <fieldset class="action"><input type="button" id="mainformsubmit" onclick="return CheckForm(this.form);" value="Stage for import" /></fieldset>
-  <div id="jobstatus" style="display:none">Job progress: <span id="jobprogress">0</span>%</div>
-  <div id="jobfailed" style="display:none"></div>
+       <div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
+     <div id="jobfailed"></div></div>
+  
 </form>
 <!-- /TMPL_IF -->
 
 </div>
 </div>
-<div class="yui-b noprint">
+<div class="yui-b">
 <!-- TMPL_INCLUDE NAME="tools-menu.inc" -->
 </div>
 </div>