code comment html form class
This commit is contained in:
parent
622f31fd1e
commit
47ac420133
@ -3283,17 +3283,17 @@ class Form
|
|||||||
if ($empty && empty($arraytypes['code'])) continue;
|
if ($empty && empty($arraytypes['code'])) continue;
|
||||||
|
|
||||||
if ($format == 0) print '<option value="'.$id.'"';
|
if ($format == 0) print '<option value="'.$id.'"';
|
||||||
if ($format == 1) print '<option value="'.$arraytypes['code'].'"';
|
elseif ($format == 1) print '<option value="'.$arraytypes['code'].'"';
|
||||||
if ($format == 2) print '<option value="'.$arraytypes['code'].'"';
|
elseif ($format == 2) print '<option value="'.$arraytypes['code'].'"';
|
||||||
if ($format == 3) print '<option value="'.$id.'"';
|
elseif ($format == 3) print '<option value="'.$id.'"';
|
||||||
// Si selected est text, on compare avec code, sinon avec id
|
// Si selected est text, on compare avec code, sinon avec id
|
||||||
if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) print ' selected';
|
if (preg_match('/[a-z]/i', $selected) && $selected == $arraytypes['code']) print ' selected';
|
||||||
elseif ($selected == $id) print ' selected';
|
elseif ($selected == $id) print ' selected';
|
||||||
print '>';
|
print '>';
|
||||||
if ($format == 0) $value=($maxlength?dol_trunc($arraytypes['label'],$maxlength):$arraytypes['label']);
|
if ($format == 0) $value=($maxlength?dol_trunc($arraytypes['label'],$maxlength):$arraytypes['label']);
|
||||||
if ($format == 1) $value=$arraytypes['code'];
|
elseif ($format == 1) $value=$arraytypes['code'];
|
||||||
if ($format == 2) $value=($maxlength?dol_trunc($arraytypes['label'],$maxlength):$arraytypes['label']);
|
elseif ($format == 2) $value=($maxlength?dol_trunc($arraytypes['label'],$maxlength):$arraytypes['label']);
|
||||||
if ($format == 3) $value=$arraytypes['code'];
|
elseif ($format == 3) $value=$arraytypes['code'];
|
||||||
print $value?$value:' ';
|
print $value?$value:' ';
|
||||||
print '</option>';
|
print '</option>';
|
||||||
}
|
}
|
||||||
@ -4589,6 +4589,7 @@ class Form
|
|||||||
*
|
*
|
||||||
* @param string $selected preselected currency code
|
* @param string $selected preselected currency code
|
||||||
* @param string $htmlname name of HTML select list
|
* @param string $htmlname name of HTML select list
|
||||||
|
* @deprecated
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function select_currency($selected='',$htmlname='currency_id')
|
function select_currency($selected='',$htmlname='currency_id')
|
||||||
@ -4976,7 +4977,7 @@ class Form
|
|||||||
* @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59
|
* @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59
|
||||||
* @param string $addplusone Add a link "+1 hour". Value must be name of another select_date field.
|
* @param string $addplusone Add a link "+1 hour". Value must be name of another select_date field.
|
||||||
* @param datetime $adddateof Add a link "Date of invoice" using the following date.
|
* @param datetime $adddateof Add a link "Date of invoice" using the following date.
|
||||||
* @return string|null Nothing or string if nooutput is 1
|
* @return string|void Nothing or string if nooutput is 1
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* @see form_date, select_month, select_year, select_dayofweek
|
* @see form_date, select_month, select_year, select_dayofweek
|
||||||
*/
|
*/
|
||||||
@ -5374,7 +5375,7 @@ class Form
|
|||||||
* if 'textselect' input hour is in text and input min is a combo
|
* if 'textselect' input hour is in text and input min is a combo
|
||||||
* @param integer $minunderhours If 1, show minutes selection under the hours
|
* @param integer $minunderhours If 1, show minutes selection under the hours
|
||||||
* @param int $nooutput Do not output html string but return it
|
* @param int $nooutput Do not output html string but return it
|
||||||
* @return string|null
|
* @return string|void
|
||||||
*/
|
*/
|
||||||
function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0)
|
function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user