Enotice fix
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 9 Jan 2022 22:39:58 +0000 (11:39 +1300)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 9 Jan 2022 22:40:57 +0000 (11:40 +1300)
templates/CRM/Financial/Page/BatchTransaction.tpl

index 9c7f8254fc5fda3f0f36c8b44b0b078b4dca8892..1b1519723ececb876f63652d25a993e7455de136 100644 (file)
@@ -26,7 +26,7 @@
   </tbody>
 </table>
 
-<div class="crm-submit-buttons">{if in_array($batchStatus, array('Open', 'Reopened'))}{$form.close_batch.html}{/if} {$form.export_batch.html}</div>
+<div class="crm-submit-buttons">{if array_key_exists('close_batch', $form)}{$form.close_batch.html}{/if} {if array_key_exists('close_batch', $form)}{$form.export_batch.html}{/if}</div>
 
 {if in_array($batchStatus, array('Open', 'Reopened'))} {* Add / remove transactions only allowed for Open/Reopened batches *}
   <br /><div class="form-layout-compressed">{$form.trans_remove.html}&nbsp;{$form.rSubmit.html}</div><br/>
@@ -75,17 +75,17 @@ CRM.$(function($) {
 });
 function assignRemove(recordID, op) {
   var recordBAO = 'CRM_Batch_BAO_Batch';
-  if (op == 'assign' || op == 'remove') {
-    recordBAO = 'CRM_Batch_BAO_EntityBatch';   
+  if (op === 'assign' || op === 'remove') {
+    recordBAO = 'CRM_Batch_BAO_EntityBatch';
   }
   var entityID = {/literal}"{$entityID}"{literal};
-  if (op == 'close' || op == 'export') {
+  if (op === 'close' || op === 'export') {
     var mismatch = checkMismatch();
   }
   else {
     CRM.$('#mark_x_' + recordID).closest('tr').block({message: {/literal}'{ts escape="js"}Updating{/ts}'{literal}});
   }
-  if (op == 'close' || (op == 'export' && mismatch.length)) {
+  if (op === 'close' || (op === 'export' && mismatch.length)) {
     CRM.$("#enableDisableStatusMsg").dialog({
       title: {/literal}'{ts escape="js"}Close Batch{/ts}'{literal},
       modal: true,