diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 29ac151152a..204bcfacfb9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -80,7 +80,7 @@ class Form * @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...) * @param string $moreparam More param to add on a href URL. * @param int $fieldrequired 1 if we want to show field as mandatory using the "fieldrequired" CSS. - * @param int $notabletag 1=Do not output table tags but output a ':', 2=Do not output table tags and no ':', 3=Do not output table tags but output a ' ' + * @param int $notabletag 1=Do not output table tags but output a ':', 2=Do not output table tags and no ':', 3=Do not output table tags but output a ' ' * @return string HTML edit field */ function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='', $fieldrequired=0, $notabletag=0) @@ -512,7 +512,7 @@ class Form * * @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default. * @param int $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. - * @param int $alwaysvisible 1=select button always visible + * @param int $alwaysvisible 1=select button always visible * @return string Select list */ function selectMassAction($selected, $arrayofaction, $alwaysvisible=0) @@ -556,16 +556,16 @@ class Form jQuery(".massaction").hide(); } } - + jQuery(document).ready(function () { initCheckForSelect(); jQuery(".checkforselect").click(function() { initCheckForSelect(); }); jQuery(".massactionselect").change(function() { - var massaction = $( this ).val(); + var massaction = $( this ).val(); var urlform = $( this ).closest("form").attr("action").replace("#show_files",""); - if (massaction == "builddoc") + if (massaction == "builddoc") { urlform = urlform + "#show_files"; } @@ -586,7 +586,7 @@ class Form '; } - + return $ret; } @@ -1013,7 +1013,7 @@ class Form { global $conf,$user,$langs; - $out=''; + $out=''; $num=0; $outarray=array(); @@ -1055,8 +1055,6 @@ class Form $resql=$this->db->query($sql); if ($resql) { - $events = null; - if ($conf->use_javascript_ajax && ! $forcecombo) { include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; @@ -1420,7 +1418,7 @@ class Form // Build list includeUsers to have only hierarchy and current user $includeUsers = implode(",",$user->getAllChildIds(1)); } - + $out=''; // On recherche les utilisateurs @@ -1637,7 +1635,7 @@ class Form $i++; } if ($nbassignetouser) $out.=''; - + //$out.=''; return $out; } @@ -1663,7 +1661,7 @@ class Form * @param int $hidepriceinlabel 1=Hide prices in label * @param string $warehouseStatus warehouse status filter, following comma separated filter options can be used * 'warehouseopen' = select products from open warehouses, - * 'warehouseclosed' = select products from closed warehouses, + * 'warehouseclosed' = select products from closed warehouses, * 'warehouseinternal' = select products from warehouses for internal correct/transfer only * @return void */ @@ -1730,7 +1728,7 @@ class Form * @param int $hidepriceinlabel 1=Hide prices in label * @param string $warehouseStatus warehouse status filter, following comma separated filter options can be used * 'warehouseopen' = select products from open warehouses, - * 'warehouseclosed' = select products from closed warehouses, + * 'warehouseclosed' = select products from closed warehouses, * 'warehouseinternal' = select products from warehouses for internal correct/transfer only * @return array Array of keys for json */ @@ -1745,19 +1743,19 @@ class Form if (! empty($warehouseStatus)) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; - if (preg_match('/warehouseclosed/', $warehouseStatus)) + if (preg_match('/warehouseclosed/', $warehouseStatus)) { $warehouseStatusArray[] = Entrepot::STATUS_CLOSED; } - if (preg_match('/warehouseopen/', $warehouseStatus)) + if (preg_match('/warehouseopen/', $warehouseStatus)) { $warehouseStatusArray[] = Entrepot::STATUS_OPEN_ALL; } - if (preg_match('/warehouseinternal/', $warehouseStatus)) + if (preg_match('/warehouseinternal/', $warehouseStatus)) { $warehouseStatusArray[] = Entrepot::STATUS_OPEN_INTERNAL; } - } + } $selectFields = " p.rowid, p.label, p.ref, p.description, p.barcode, p.fk_product_type, p.price, p.price_ttc, p.price_base_type, p.tva_tx, p.duration, p.fk_price_expression"; (count($warehouseStatusArray)) ? $selectFieldsGrouped = ", sum(ps.reel) as stock" : $selectFieldsGrouped = ", p.stock"; @@ -1796,7 +1794,7 @@ class Form $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps on ps.fk_product = p.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."entrepot as e on ps.fk_entrepot = e.rowid"; } - + //Price by customer if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES) && !empty($socid)) { $sql.=" LEFT JOIN ".MAIN_DB_PREFIX."product_customer_price as pcp ON pcp.fk_soc=".$socid." AND pcp.fk_product=p.rowid"; @@ -1863,7 +1861,7 @@ class Form $num = $this->db->num_rows($result); $events=null; - + if ($conf->use_javascript_ajax && ! $forcecombo) { include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; @@ -1871,9 +1869,9 @@ class Form $out.= $comboenhancement; $nodatarole=($comboenhancement?' data-role="none"':''); } - + $out.=''; if ($addempty) print ''; foreach($this->cache_conditions_paiements as $id => $arrayconditions) @@ -3409,7 +3407,7 @@ class Form // Clean parameters $newselectedchoice=empty($selectedchoice)?"no":$selectedchoice; if ($conf->browser->layout == 'phone') $width='95%'; - + if (is_array($formquestion) && ! empty($formquestion)) { // First add hidden fields and value @@ -3675,7 +3673,7 @@ class Form require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; $out=''; - + $formproject=new FormProjets($this->db); $langs->load("project"); @@ -3703,8 +3701,8 @@ class Form $out.=" "; } } - - if (empty($nooutput)) + + if (empty($nooutput)) { print $out; return ''; @@ -4049,7 +4047,7 @@ class Form } print ''; } - if ($more) + if ($more) { print '
'; print $more; @@ -4259,7 +4257,7 @@ class Form // Make select dynamic include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; $out.= ajax_combobox($htmlname); - + return $out; } @@ -4454,13 +4452,13 @@ class Form $key.= $rate['nprtva'] ? '*': ''; if ($mode > 0 && $rate['code']) $key.=' ('.$rate['code'].')'; if ($mode < 0) $key = $rate['rowid']; - + $return.= '
'; return $ret;