View | Details | Raw Unified | Return to bug 12759
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt (-24 / +41 lines)
Lines 57-63 Link Here
57
    </div>
57
    </div>
58
  [% END %]
58
  [% END %]
59
  [% IF op == 'form' %]
59
  [% IF op == 'form' %]
60
    <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/batch_delete_records.pl">
60
    <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/batch_delete_records.pl" id="record_ids_selection">
61
      <fieldset class="rows">
61
      <fieldset class="rows">
62
        <legend>Record type</legend>
62
        <legend>Record type</legend>
63
        <ol>
63
        <ol>
Lines 70-81 Link Here
70
70
71
      <div id="batch_del_form" class="toptabs">
71
      <div id="batch_del_form" class="toptabs">
72
        <ul>
72
        <ul>
73
          <li><a href="#uploadfile">Upload a file</a></li>
73
          <li><a href="#uploadfile_tab">Upload a file</a></li>
74
          [% IF lists.count %]<li id="show_list_option"><a href="#shelves">Select a list of records</a></li>[% END %]
74
          [% IF lists.count %]<li id="show_list_option"><a href="#shelves_tab">Select a list of records</a></li>[% END %]
75
          <li><a href="#enterlist">Enter a list of record numbers</a></li>
75
          <li><a href="#enterlist_tab">Enter a list of record numbers</a></li>
76
        </ul>
76
        </ul>
77
77
78
        <div id="uploadfile">
78
        <div id="uploadfile_tab">
79
          <fieldset class="rows">
79
          <fieldset class="rows">
80
            <legend>Use a file</legend>
80
            <legend>Use a file</legend>
81
            <ol>
81
            <ol>
Lines 85-110 Link Here
85
          &nbsp;
85
          &nbsp;
86
        </div>
86
        </div>
87
87
88
        <div id="shelves">
88
        [% IF lists.count %]
89
          <fieldset class="rows">
89
            <div id="shelves_tab">
90
            <legend>Or select a list of records</legend>
90
              <fieldset class="rows">
91
            <ol>
91
                <legend>Or select a list of records</legend>
92
              <li>
92
                <ol>
93
                <label for="shelf_number">Use records from the following list: </label>
93
                  <li>
94
                <select name="shelf_number" id="shelf_number">
94
                    <label for="shelf_number">Use records from the following list: </label>
95
                  <option value="">Select a list</option>
95
                    <select name="shelf_number" id="shelf_number">
96
                    [% FOREACH list IN lists %]
96
                      <option value="">Select a list</option>
97
                      <option value="[% list.shelfnumber %]">[% list.shelfname %]</option>
97
                        [% FOREACH list IN lists %]
98
                    [% END %]
98
                          <option value="[% list.shelfnumber %]">[% list.shelfname %]</option>
99
                  </option>
99
                        [% END %]
100
                </select>
100
                      </option>
101
              </li>
101
                    </select>
102
            </ol>
102
                  </li>
103
          </fieldset>
103
                </ol>
104
          &nbsp;
104
              </fieldset>
105
        </div>
105
              &nbsp;
106
            </div>
107
        [% END %]
106
108
107
        <div id="enterlist">
109
        <div id="enterlist_tab">
108
          <fieldset class="rows">
110
          <fieldset class="rows">
109
            <legend>Or enter a list of record numbers</legend>
111
            <legend>Or enter a list of record numbers</legend>
110
            <ol>
112
            <ol>
Lines 306-311 Link Here
306
              return false;
308
              return false;
307
            }
309
            }
308
          });
310
          });
311
312
          $("#record_ids_selection").on("submit", function(e){
313
            var tab = $(this).find('.ui-tabs-active:first a').attr('href');
314
            if ( tab == '#uploadfile_tab' ) {
315
                $("#shelf_number").empty('');
316
                $("#recordnumber_list").val('');
317
            } else if ( tab == '#shelves_tab' ) {
318
                $("#uploadfile").val('')
319
                $("#recordnumber_list").val('');
320
            } else { // enterlist
321
                $("#uploadfile").val('')
322
                $("#shelf_number").empty('');
323
            }
324
          });
325
309
        });
326
        });
310
    </script>
327
    </script>
311
[% END %]
328
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_record_modification.tt (-25 / +40 lines)
Lines 61-67 Link Here
61
    [% END %]
61
    [% END %]
62
62
63
  [% IF view == 'form' %]
63
  [% IF view == 'form' %]
64
    <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/batch_record_modification.pl">
64
    <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/batch_record_modification.pl" id="record_ids_selection">
65
      <fieldset class="rows">
65
      <fieldset class="rows">
66
        <legend>Record type</legend>
66
        <legend>Record type</legend>
67
        <ol>
67
        <ol>
Lines 74-85 Link Here
74
74
75
      <div id="batch_mod_form" class="toptabs">
75
      <div id="batch_mod_form" class="toptabs">
76
        <ul>
76
        <ul>
77
          <li><a href="#uploadfile">Upload a file</a></li>
77
          <li><a href="#uploadfile_tab">Upload a file</a></li>
78
          [% IF lists.count %]<li id="show_list_option"><a href="#shelves">Select a list of records</a></li>[% END %]
78
          [% IF lists.count %]<li id="show_list_option"><a href="#shelves_tab">Select a list of records</a></li>[% END %]
79
          <li><a href="#enterlist">Enter a list of record numbers</a></li>
79
          <li><a href="#enterlist_tab">Enter a list of record numbers</a></li>
80
        </ul>
80
        </ul>
81
81
82
        <div id="uploadfile">
82
        <div id="uploadfile_tab">
83
          <fieldset class="rows">
83
          <fieldset class="rows">
84
            <legend>Use a file</legend>
84
            <legend>Use a file</legend>
85
            <ol>
85
            <ol>
Lines 89-114 Link Here
89
          &nbsp;
89
          &nbsp;
90
        </div>
90
        </div>
91
91
92
        <div id="shelves">
92
        [% IF lists.count %]
93
          <fieldset class="rows">
93
            <div id="shelves_tab">
94
            <legend>Or select a list of records</legend>
94
              <fieldset class="rows">
95
            <ol>
95
                <legend>Or select a list of records</legend>
96
              <li>
96
                <ol>
97
                <label for="shelf_number">Use records from the following list: </label>
97
                  <li>
98
                <select name="shelf_number" id="shelf_number">
98
                    <label for="shelf_number">Use records from the following list: </label>
99
                  <option value="">Select a list</option>
99
                    <select name="shelf_number" id="shelf_number">
100
                    [% FOREACH list IN lists %]
100
                      <option value="">Select a list</option>
101
                      <option value="[% list.shelfnumber %]">[% list.shelfname %]</option>
101
                        [% FOREACH list IN lists %]
102
                    [% END %]
102
                          <option value="[% list.shelfnumber %]">[% list.shelfname %]</option>
103
                  </option>
103
                        [% END %]
104
                </select>
104
                      </option>
105
              </li>
105
                    </select>
106
            </ol>
106
                  </li>
107
          </fieldset>
107
                </ol>
108
          &nbsp;
108
              </fieldset>
109
        </div>
109
              &nbsp;
110
            </div>
111
        [% END %]
110
112
111
        <div id="enterlist">
113
        <div id="enterlist_tab">
112
          <fieldset class="rows">
114
          <fieldset class="rows">
113
            <legend>Or enter a list of record numbers</legend>
115
            <legend>Or enter a list of record numbers</legend>
114
            <ol>
116
            <ol>
Lines 338-343 Link Here
338
            return submitBackgroundJob(document.getElementById("process"));
340
            return submitBackgroundJob(document.getElementById("process"));
339
          });
341
          });
340
342
343
          $("#record_ids_selection").on("submit", function(e){
344
            var tab = $(this).find('.ui-tabs-active:first a').attr('href');
345
            if ( tab == '#uploadfile_tab' ) {
346
                $("#shelf_number").empty('');
347
                $("#recordnumber_list").val('');
348
            } else if ( tab == '#shelves_tab' ) {
349
                $("#uploadfile").val('')
350
                $("#recordnumber_list").val('');
351
            } else { // enterlist
352
                $("#uploadfile").val('')
353
                $("#shelf_number").empty('');
354
            }
355
          });
356
341
          $("#marc_modification_template_id").change(function(){
357
          $("#marc_modification_template_id").change(function(){
342
            var url = "/cgi-bin/koha/svc/records/preview?"
358
            var url = "/cgi-bin/koha/svc/records/preview?"
343
            var mmtid = $(this).val();
359
            var mmtid = $(this).val();
344
- 

Return to bug 12759