Browse Source

Miscellaneous fixes

Laurent Destailleur 9 years ago
parent
commit
f87ccc97e2

+ 5 - 1
dev/skeletons/modMyModule.class.php

@@ -166,7 +166,11 @@ class modMyModule extends DolibarrModules
 		// Add here list of php file(s) stored in core/boxes that contains class to show a box.
         $this->boxes = array();			// List of boxes
 		// Example:
-		//$this->boxes=array(array(0=>array('file'=>'myboxa.php','note'=>'','enabledbydefaulton'=>'Home'),1=>array('file'=>'myboxb.php','note'=>''),2=>array('file'=>'myboxc.php','note'=>'')););
+		//$this->boxes=array(
+		//    0=>array('file'=>'myboxa.php@mymodule','note'=>'','enabledbydefaulton'=>'Home'),
+		//    1=>array('file'=>'myboxb.php@mymodule','note'=>''),
+		//    2=>array('file'=>'myboxc.php@mymodule','note'=>'')
+		//);
 
 		// Cronjobs
 		$this->cronjobs = array();			// List of cron jobs entries to add

+ 1 - 2
htdocs/comm/propal/class/propal.class.php

@@ -2901,8 +2901,7 @@ class Propal extends CommonObject
 
 
 /**
- *	\class      PropaleLigne
- *	\brief      Class to manage commercial proposal lines
+ *	Class to manage commercial proposal lines
  */
 class PropaleLigne  extends CommonObjectLine
 {

+ 7 - 1
htdocs/product/card.php

@@ -184,7 +184,13 @@ if (empty($reshook))
             $action = "create";
             $error++;
         }
-
+        if (! empty(GETPOST('duration_value')) && empty(GETPOST('duration_unit')))
+        {
+            setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentities('Unit')), 'errors');
+            $action = "create";
+            $error++;
+        }
+        
         if (! $error)
         {
 	        $units = GETPOST('units', 'int');