瀏覽代碼

Fix : add missing formobjectoptions hook on 3 cards

Maxime Kohlhaas 3 年之前
父節點
當前提交
7a457478d5
共有 3 個文件被更改,包括 21 次插入1 次删除
  1. 8 1
      htdocs/compta/prelevement/card.php
  2. 5 0
      htdocs/loan/card.php
  3. 8 0
      htdocs/opensurvey/card.php

+ 8 - 1
htdocs/compta/prelevement/card.php

@@ -238,7 +238,14 @@ if ($id > 0 || $ref) {
 		$modulepart = 'paymentbybanktransfer';
 	}
 	print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&amp;modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).'">'.$relativepath.'</a>';
-	print '</td></tr></table>';
+	print '</td></tr>';
+
+	// Other attributes
+	$parameters = array();
+	$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+	print $hookmanager->resPrint;
+
+	print '</table>';
 
 	print '</div>';
 

+ 5 - 0
htdocs/loan/card.php

@@ -618,6 +618,11 @@ if ($id > 0) {
 		}
 		print '</tr>';
 
+		// Other attributes
+		$parameters = array();
+		$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+		print $hookmanager->resPrint;
+
 		print '</table>';
 
 		print '</div>';

+ 8 - 0
htdocs/opensurvey/card.php

@@ -54,6 +54,9 @@ if ($result <= 0) {
 	exit;
 }
 
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$hookmanager->initHooks(array('surveycard', 'globalcard'));
+
 $expiredate = dol_mktime(0, 0, 0, GETPOST('expiremonth'), GETPOST('expireday'), GETPOST('expireyear'));
 
 
@@ -338,6 +341,11 @@ if ($action != 'edit') {
 
 print '</td></tr>';
 
+// Other attributes
+$parameters = array();
+$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+print $hookmanager->resPrint;
+
 print '</table>';
 print '</div>';