FormOther
class FormOther (View source)
Class permettant la generation de composants html autre Only common components are here.
Properties
| string | $error |
Methods
Return the HTML code for scanner tool.
Return HTML select list of export models
Return list of export models
Return list of ecotaxes with label
Return list of revenue stamp for country
Return a HTML select list to select a percent
Return select list for categories (to use in form search selectors)
Return select list for categories (to use in form search selectors)
Return list of project and tasks
Output a HTML thumb of color or a text if not defined.
Output a HTML code to select a color
Output a HTML code to select a color. Field will return an hexa color like '334455'.
Create an image for color
Return HTML combo list of week
Return HTML combo list of month
Return HTML combo list of years
Return HTML combo list of years
Get array with HTML tabs with widgets/boxes of a particular area including personalized choices of user.
Return a HTML select list of a dictionary
Return an html string with a select combo box to choose yes or no
Return HTML select list to select a group by field
Return HTML select list to select a group by field
Details
__construct(DoliDB $db)
Constructor
string
getHTMLScannerForm(string $jstoexecuteonadd = 'barcodescannerjs', string $mode = 'all', int $warehouseselect = 0)
Return the HTML code for scanner tool.
This must be called into an existing
select_export_model($selected = '', string $htmlname = 'exportmodelid', $type = '', $useempty = 0, $fk_user = null)
Return HTML select list of export models
@param string $selected Id modele pre-selectionne
select_import_model($selected = '', string $htmlname = 'importmodelid', $type = '', $useempty = 0, $fk_user = null)
Return list of export models
@param string $selected Id modele pre-selectionne
select_ecotaxes($selected = '', string $htmlname = 'ecotaxe_id')
Return list of ecotaxes with label
@param string $selected Preselected ecotaxes
select_revenue_stamp($selected = '', string $htmlname = 'revenuestamp', $country_code = '')
Return list of revenue stamp for country
@param string $selected Value of preselected revenue stamp
select_percent($selected = 0, string $htmlname = 'percent', $disabled = 0, $increment = 5, $start = 0, $end = 100, $showempty = 0)
Return a HTML select list to select a percent
@param integer $selected pourcentage pre-selectionne
string
select_categories(string $type, int $selected = 0, string $htmlname = 'search_categ', int $nocateg = 0, int|string $showempty = 1, string $morecss = '')
Return select list for categories (to use in form search selectors)
select_salesrepresentatives($selected, string $htmlname, $user, $showstatus = 0, $showempty = 1, $morecss = '', $norepresentative = 0)
Return select list for categories (to use in form search selectors)
@param int|string $selected Preselected value
selectProjectTasks(int $selectedtask = 0, $projectid = 0, $htmlname = 'task_parent', $modeproject = 0, $modetask = 0, $mode = 0, $useempty = 0, $disablechildoftaskid = 0, $filteronprojstatus = '', $morecss = '')
Return list of project and tasks
static
showColor($color, string $textifnotdefined = '')
Output a HTML thumb of color or a text if not defined.
@param string $color String with hex (FFFFFF) or comma RGB ('255,255,255')
select_color($set_color = '', string $prefix = 'f_color', $form_name = '', $showcolorbox = 1, $arrayofcolors = [])
Output a HTML code to select a color
@param string $set_color Pre-selected color
static
selectColor($set_color = '', string $prefix = 'f_color', $form_name = '', $showcolorbox = 1, $arrayofcolors = [], $morecss = '', $setpropertyonselect = '', $default = '')
Output a HTML code to select a color. Field will return an hexa color like '334455'.
@param string $set_color Pre-selected color with format '#......'
void
CreateColorIcon(string $color, string $module, string $name, int $x = 12, int $y = 12)
Create an image for color
select_dayofweek($selected = '', string $htmlname = 'weekid', $useempty = 0)
Return HTML combo list of week
@param string $selected Preselected value
select_month($selected = '', string $htmlname = 'monthid', $useempty = 0, $longlabel = 0, $morecss = 'minwidth50 maxwidth75imp valignmiddle', $addjscombo = false)
Return HTML combo list of month
@param int|string $selected Preselected value
select_year($selected = '', string $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle maxwidth75imp', $addjscombo = false)
Return HTML combo list of years
@param string $selected Preselected value (''=current year, -1=none, year otherwise)
selectyear($selected = '', string $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle width75', $addjscombo = false)
Return HTML combo list of years
@param int|string $selected Preselected value (''=current year, -1=none, year otherwise)
static ModeleBoxes[], boxlista: string, boxlistb: string}
getBoxesArea(User $user, $areacode)
Get array with HTML tabs with widgets/boxes of a particular area including personalized choices of user.
Class 'Form' must be known.
select_dictionary($htmlname, string $dictionarytable, $keyfield = 'code', $labelfield = 'label', $selected = '', $useempty = 0, $moreattrib = '')
Return a HTML select list of a dictionary
@param string $htmlname Name of select zone
string
selectAutoManual(string $htmlname, string $value = '', int $option = 0, bool $disabled = false, $useempty = 0)
Return an html string with a select combo box to choose yes or no
string
selectGroupByField(mixed $object, string[] $search_groupby, array<string, array{label: string}> $arrayofgroupby, string $morecss = 'minwidth200 maxwidth250', string $showempty = '1')
Return HTML select list to select a group by field
string
selectXAxisField(mixed $object, string[] $search_xaxis, array<string, array{label: string}> $arrayofxaxis, string $showempty = '1', string $morecss = 'minwidth250 maxwidth500')
Return HTML select list to select a group by field