dolibarr 19.0.3
|
Classe permettant la generation de composants html autre Only common components are here. More...
Public Member Functions | |
__construct ($db) | |
Constructor. | |
getHTMLScannerForm ($jstoexecuteonadd='barcodescannerjs', $mode='all', $warehouseselect=0) | |
Return the HTML code for scanner tool. | |
select_export_model ($selected='', $htmlname='exportmodelid', $type='', $useempty=0, $fk_user=null) | |
Return HTML select list of export models. | |
select_import_model ($selected='', $htmlname='importmodelid', $type='', $useempty=0, $fk_user=null) | |
Return list of export models. | |
select_ecotaxes ($selected='', $htmlname='ecotaxe_id') | |
Return list of ecotaxes with label. | |
select_revenue_stamp ($selected='', $htmlname='revenuestamp', $country_code='') | |
Return list of revenue stamp for country. | |
select_percent ($selected=0, $htmlname='percent', $disabled=0, $increment=5, $start=0, $end=100, $showempty=0) | |
Return a HTML select list to select a percent. | |
select_categories ($type, $selected=0, $htmlname='search_categ', $nocateg=0, $showempty=1, $morecss='') | |
Return select list for categories (to use in form search selectors) | |
select_salesrepresentatives ($selected, $htmlname, $user, $showstatus=0, $showempty=1, $morecss='', $norepresentative=0) | |
Return select list for categories (to use in form search selectors) | |
selectProjectTasks ($selectedtask='', $projectid=0, $htmlname='task_parent', $modeproject=0, $modetask=0, $mode=0, $useempty=0, $disablechildoftaskid=0, $filteronprojstatus='', $morecss='') | |
Return list of project and tasks. | |
select_color ($set_color='', $prefix='f_color', $form_name='', $showcolorbox=1, $arrayofcolors='') | |
Output a HTML code to select a color. | |
CreateColorIcon ($color, $module, $name, $x='12', $y='12') | |
Creae an image for color. | |
select_dayofweek ($selected='', $htmlname='weekid', $useempty=0) | |
Return HTML combo list of week. | |
select_month ($selected='', $htmlname='monthid', $useempty=0, $longlabel=0, $morecss='minwidth50 maxwidth75imp valignmiddle', $addjscombo=false) | |
Return HTML combo list of month. | |
select_year ($selected='', $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. | |
selectyear ($selected='', $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. | |
select_dictionary ($htmlname, $dictionarytable, $keyfield='code', $labelfield='label', $selected='', $useempty=0, $moreattrib='') | |
Return a HTML select list of a dictionary. | |
selectAutoManual ($htmlname, $value='', $option=0, $disabled=false, $useempty=0) | |
Return an html string with a select combo box to choose yes or no. | |
selectGroupByField ($object, $search_groupby, &$arrayofgroupby, $morecss='minwidth200 maxwidth250', $showempty='1') | |
Return HTML select list to select a group by field. | |
selectXAxisField ($object, $search_xaxis, &$arrayofxaxis, $showempty='1', $morecss='minwidth250 maxwidth500') | |
Return HTML select list to select a group by field. | |
Static Public Member Functions | |
static | showColor ($color, $textifnotdefined='') |
Output a HTML thumb of color or a text if not defined. | |
static | selectColor ($set_color='', $prefix='f_color', $form_name='', $showcolorbox=1, $arrayofcolors='', $morecss='', $setpropertyonselect='', $default='') |
Output a HTML code to select a color. | |
static | getBoxesArea ($user, $areacode) |
Get array with HTML tabs with boxes of a particular area including personalized choices of user. | |
Private Member Functions | |
_pLineSelect (&$inc, $parent, $lines, $level=0, $selectedtask=0, $selectedproject=0, $disablechildoftaskid=0) | |
Write lines of a project (all lines of a project if parent = 0) | |
Classe permettant la generation de composants html autre Only common components are here.
Definition at line 39 of file html.formother.class.php.
FormOther::__construct | ( | $db | ) |
Constructor.
Definition at line 54 of file html.formother.class.php.
|
private |
Write lines of a project (all lines of a project if parent = 0)
int | $inc | Cursor counter |
int | $parent | Id of parent task we want to see |
array | $lines | Array of task lines |
int | $level | Level |
int | $selectedtask | Id selected task |
int | $selectedproject | Id selected project |
int | $disablechildoftaskid | 1=Disable task that are child of the provided task id |
Definition at line 693 of file html.formother.class.php.
FormOther::CreateColorIcon | ( | $color, | |
$module, | |||
$name, | |||
$x = '12', | |||
$y = '12' ) |
Creae an image for color.
string | $color | Color of image |
string | $module | Name of module |
string | $name | Name of image |
int | $x | Largeur de l'image en pixels |
int | $y | Hauteur de l'image en pixels |
Definition at line 992 of file html.formother.class.php.
|
static |
Get array with HTML tabs with boxes of a particular area including personalized choices of user.
Class 'Form' must be known.
User | $user | Object User |
String | $areacode | Code of area for pages - 0 = Home page ... See getListOfPagesForBoxes() |
Definition at line 1210 of file html.formother.class.php.
FormOther::getHTMLScannerForm | ( | $jstoexecuteonadd = 'barcodescannerjs', | |
$mode = 'all', | |||
$warehouseselect = 0 ) |
Return the HTML code for scanner tool.
This must be called into an existing <form>
string | $jstoexecuteonadd | Name of javascript function to call once the barcode scanning session is complete and user has click on "Add". |
string | $mode | 'all' (both product and lot barcode) or 'product' (product barcode only) or 'lot' (lot number only) |
int | $warehouseselect | 0 (disable warehouse select) or 1 (enable warehouse select) |
Definition at line 68 of file html.formother.class.php.
References dol_escape_htmltag(), dol_escape_js(), and img_picto().
FormOther::select_categories | ( | $type, | |
$selected = 0, | |||
$htmlname = 'search_categ', | |||
$nocateg = 0, | |||
$showempty = 1, | |||
$morecss = '' ) |
Return select list for categories (to use in form search selectors)
int | $type | Type of category ('customer', 'supplier', 'contact', 'product', 'member'). Old mode (0, 1, 2, ...) is deprecated. |
integer | $selected | Preselected value |
string | $htmlname | Name of combo list |
int | $nocateg | Show also an entry "Not categorized" |
int | string | $showempty | Add also an empty line |
string | $morecss | More CSS |
Definition at line 407 of file html.formother.class.php.
FormOther::select_color | ( | $set_color = '', | |
$prefix = 'f_color', | |||
$form_name = '', | |||
$showcolorbox = 1, | |||
$arrayofcolors = '' ) |
Output a HTML code to select a color.
string | $set_color | Pre-selected color |
string | $prefix | Name of HTML field |
string | $form_name | Deprecated. Not used. |
int | $showcolorbox | 1=Show color code and color box, 0=Show only color code |
array | $arrayofcolors | Array of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813') |
Definition at line 828 of file html.formother.class.php.
FormOther::select_dayofweek | ( | $selected = '', | |
$htmlname = 'weekid', | |||
$useempty = 0 ) |
Return HTML combo list of week.
string | $selected | Preselected value |
string | $htmlname | Nom de la zone select |
int | $useempty | Affiche valeur vide dans liste |
Definition at line 1030 of file html.formother.class.php.
FormOther::select_dictionary | ( | $htmlname, | |
$dictionarytable, | |||
$keyfield = 'code', | |||
$labelfield = 'label', | |||
$selected = '', | |||
$useempty = 0, | |||
$moreattrib = '' ) |
Return a HTML select list of a dictionary.
string | $htmlname | Name of select zone |
string | $dictionarytable | Dictionary table |
string | $keyfield | Field for key |
string | $labelfield | Label field |
string | $selected | Selected value |
int | $useempty | 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. |
string | $moreattrib | More attributes on HTML select tag |
Definition at line 1443 of file html.formother.class.php.
FormOther::select_ecotaxes | ( | $selected = '', | |
$htmlname = 'ecotaxe_id' ) |
Return list of ecotaxes with label.
string | $selected | Preselected ecotaxes |
string | $htmlname | Name of combo list |
Definition at line 266 of file html.formother.class.php.
FormOther::select_export_model | ( | $selected = '', | |
$htmlname = 'exportmodelid', | |||
$type = '', | |||
$useempty = 0, | |||
$fk_user = null ) |
Return HTML select list of export models.
string | $selected | Id modele pre-selectionne |
string | $htmlname | Nom de la zone select |
string | $type | Type des modeles recherches |
int | $useempty | Show an empty value in list |
int | $fk_user | User we want templates |
Definition at line 145 of file html.formother.class.php.
FormOther::select_import_model | ( | $selected = '', | |
$htmlname = 'importmodelid', | |||
$type = '', | |||
$useempty = 0, | |||
$fk_user = null ) |
Return list of export models.
string | $selected | Id modele pre-selectionne |
string | $htmlname | Nom de la zone select |
string | $type | Type des modeles recherches |
int | $useempty | Affiche valeur vide dans liste |
int | $fk_user | User that has created the template |
Definition at line 207 of file html.formother.class.php.
FormOther::select_month | ( | $selected = '', | |
$htmlname = 'monthid', | |||
$useempty = 0, | |||
$longlabel = 0, | |||
$morecss = 'minwidth50 maxwidth75imp valignmiddle', | |||
$addjscombo = false ) |
Return HTML combo list of month.
string | $selected | Preselected value |
string | $htmlname | Name of HTML select object |
int | $useempty | Show empty in list |
int | $longlabel | Show long label |
string | $morecss | More Css |
bool | $addjscombo | Add js combo |
Definition at line 1077 of file html.formother.class.php.
FormOther::select_percent | ( | $selected = 0, | |
$htmlname = 'percent', | |||
$disabled = 0, | |||
$increment = 5, | |||
$start = 0, | |||
$end = 100, | |||
$showempty = 0 ) |
Return a HTML select list to select a percent.
integer | $selected | pourcentage pre-selectionne |
string | $htmlname | nom de la liste deroulante |
int | $disabled | Disabled or not |
int | $increment | increment value |
int | $start | start value |
int | $end | end value |
int | $showempty | Add also an empty line |
Definition at line 371 of file html.formother.class.php.
FormOther::select_revenue_stamp | ( | $selected = '', | |
$htmlname = 'revenuestamp', | |||
$country_code = '' ) |
Return list of revenue stamp for country.
string | $selected | Value of preselected revenue stamp |
string | $htmlname | Name of combo list |
string | $country_code | Country Code |
Definition at line 317 of file html.formother.class.php.
FormOther::select_salesrepresentatives | ( | $selected, | |
$htmlname, | |||
$user, | |||
$showstatus = 0, | |||
$showempty = 1, | |||
$morecss = '', | |||
$norepresentative = 0 ) |
Return select list for categories (to use in form search selectors)
string | $selected | Preselected value |
string | $htmlname | Name of combo list (example: 'search_sale') |
User | $user | Object user |
int | $showstatus | 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status |
int | string | $showempty | 1=show also an empty value or text to show for empty |
string | $morecss | More CSS |
int | $norepresentative | Show also an entry "Not categorized" |
Definition at line 479 of file html.formother.class.php.
FormOther::select_year | ( | $selected = '', | |
$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.
string | $selected | Preselected value (''=current year, -1=none, year otherwise) |
string | $htmlname | Name of HTML select object |
int | $useempty | Affiche valeur vide dans liste |
int | $min_year | Offset of minimum year into list (by default current year -10) |
int | $max_year | Offset of maximum year into list (by default current year + 5) |
int | $offset | Offset |
int | $invert | Invert |
string | $option | Option |
string | $morecss | More CSS |
bool | $addjscombo | Add js combo |
Definition at line 1132 of file html.formother.class.php.
FormOther::selectAutoManual | ( | $htmlname, | |
$value = '', | |||
$option = 0, | |||
$disabled = false, | |||
$useempty = 0 ) |
Return an html string with a select combo box to choose yes or no.
string | $htmlname | Name of html select field |
string | $value | Pre-selected value |
int | $option | 0 return automatic/manual, 1 return 1/0 |
bool | $disabled | true or false |
int | $useempty | 1=Add empty line |
Definition at line 1496 of file html.formother.class.php.
|
static |
Output a HTML code to select a color.
Field will return an hexa color like '334455'.
string | $set_color | Pre-selected color with format '#......' |
string | $prefix | Name of HTML field |
string | $form_name | Deprecated. Not used. |
int | $showcolorbox | 1=Show color code and color box, 0=Show only color code |
array | $arrayofcolors | Array of possible colors to choose in the selector. All colors are possible if empty. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813') |
string | $morecss | Add css style into input field |
string | $setpropertyonselect | Set this property after selecting a color |
string | $default | Default color |
Definition at line 848 of file html.formother.class.php.
FormOther::selectGroupByField | ( | $object, | |
$search_groupby, | |||
& | $arrayofgroupby, | ||
$morecss = 'minwidth200 maxwidth250', | |||
$showempty = '1' ) |
Return HTML select list to select a group by field.
mixed | $object | Object analyzed |
array | $search_groupby | Array of preselected fields |
array | $arrayofgroupby | Array of groupby to fill |
string | $morecss | More CSS |
string | $showempty | '1' or 'text' |
Definition at line 1536 of file html.formother.class.php.
FormOther::selectProjectTasks | ( | $selectedtask = '', | |
$projectid = 0, | |||
$htmlname = 'task_parent', | |||
$modeproject = 0, | |||
$modetask = 0, | |||
$mode = 0, | |||
$useempty = 0, | |||
$disablechildoftaskid = 0, | |||
$filteronprojstatus = '', | |||
$morecss = '' ) |
Return list of project and tasks.
int | $selectedtask | Pre-selected task |
int | $projectid | Project id |
string | $htmlname | Name of html select |
int | $modeproject | 1 to restrict on projects owned by user |
int | $modetask | 1 to restrict on tasks associated to user |
int | $mode | 0=Return list of tasks and their projects, 1=Return projects and tasks if exists |
int | $useempty | 0=Allow empty values |
int | $disablechildoftaskid | 1=Disable task that are child of the provided task id |
string | $filteronprojstatus | Filter on project status ('-1'=no filter, '0,1'=Draft+Validated status) |
string | $morecss | More css |
Definition at line 656 of file html.formother.class.php.
FormOther::selectXAxisField | ( | $object, | |
$search_xaxis, | |||
& | $arrayofxaxis, | ||
$showempty = '1', | |||
$morecss = 'minwidth250 maxwidth500' ) |
Return HTML select list to select a group by field.
mixed | $object | Object analyzed |
array | $search_xaxis | Array of preselected fields |
array | $arrayofxaxis | Array of groupby to fill |
string | $showempty | '1' or 'text' |
string | $morecss | More css |
Definition at line 1559 of file html.formother.class.php.
FormOther::selectyear | ( | $selected = '', | |
$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.
string | $selected | Preselected value (''=current year, -1=none, year otherwise) |
string | $htmlname | Name of HTML select object |
int | $useempty | Affiche valeur vide dans liste |
int | $min_year | Offset of minimum year into list (by default current year -10) |
int | $max_year | Offset of maximum year into list (by default current year + 5) |
int | $offset | Offset |
int | $invert | Invert |
string | $option | Option |
string | $morecss | More css |
bool | $addjscombo | Add js combo |
Definition at line 1153 of file html.formother.class.php.
|
static |
Output a HTML thumb of color or a text if not defined.
string | $color | String with hex (FFFFFF) or comma RGB ('255,255,255') |
string | $textifnotdefined | Text to show if color not defined |
Definition at line 798 of file html.formother.class.php.