Merge branch 'bug_7368' into 3.14-master
[koha_fer] / koha-tmpl / intranet-tmpl / prog / en / modules / members / memberentrygen.tt
index 5ceb365..3843c56 100644 (file)
@@ -33,6 +33,7 @@
             }
         [% END %]
         $("#dateofbirth").datepicker({ maxDate: "-1D" });
+        $("#entryform").preventDoubleFormSubmit();
     });
 
     function clear_entry(node) {
                        </div>
        [% END %]
 
-       [% IF ( debug ) %]
-               <div id="debug">
-                               <div>Debug is on (level [% debug %])</div>
-               </div>
-       [% END %]
        [% IF ( nok ) %]
                <div class="dialog alert">
                        <p>The following fields are wrong. Please fix them.</p>
         [% END %]
         [% UNLESS nobranchcode %]
     <li>
-      [% IF ( mandatorybranchcode ) %]
+      [%- IF ( mandatorybranchcode ) -%]
         <label for="branchcode" class="required">
-      [% ELSE %]
+      [%- ELSE -%]
         <label for="branchcode">
-      [% END %]
-      Library: </label>
-      [% CGIbranch %]
-         [% IF ( mandatorybranchcode ) %]<span class="required">Required</span>[% END %]
+      [%- END -%]
+      Library:</label>
+      <select name="branchcode" size="1" id="branchcode">
+        <option value=""></option>
+        [%- FOREACH branchloo IN branchloop %]
+          [% IF ( branchloo.selected ) -%]
+            <option value="[% branchloo.branchcode %]" selected="selected">[% branchloo.branchname %]</option>
+          [%- ELSE -%]
+            <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</option>
+          [%- END -%]
+        [%- END %]
+      </select>
+      [% IF ( mandatorybranchcode ) -%]
+      <span class="required">Required</span>
+      [%- END %]
     </li>
         [% END %]
     <li>
       [% IF ( CGIsort1 ) %] 
         [% CGIsort1 %]
       [% ELSE %]
-        <input  type="text" id="sort1" name="sort1" size="20"  value="[% sort1 %]" />
+          [% IF ( opduplicate ) %]
+            <input  type="text" id="sort1" name="sort1" size="20"  value="[% sort1 %]" onclick="this.value=''" />
+          [% ELSE %]
+            <input  type="text" id="sort1" name="sort1" size="20"  value="[% sort1 %]" />
+          [% END %]
          [% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
       [% END %]   
     </li>
                             var attrid = item.message_attribute_id;
                             var transports = ['email', 'rss', 'sms'];
                             $.each(transports, function(j, transport) {
-                                if (item['transport-' + transport] != ' ') {
-                                    $('#' + transport + attrid).attr('checked', item['transport-' + transport]);
+                                if (item['transports_' + transport] == 1) {
+                                    $('#' + transport + attrid).attr('checked', 'checked');
                                 } else {
                                     $('#' + transport + attrid).removeAttr('checked');
                                 }