|
dolibarr
13.0.2
|
Classe permettant la generation de composants html autre Only common components are here. More...
Public Member Functions | |
| __construct ($db) | |
| Constructor. More... | |
| select_export_model ($selected= '', $htmlname= 'exportmodelid', $type= '', $useempty=0, $fk_user=null) | |
| Return HTML select list of export models. More... | |
| select_import_model ($selected= '', $htmlname= 'importmodelid', $type= '', $useempty=0, $fk_user=null) | |
| Return list of export models. More... | |
| select_ecotaxes ($selected= '', $htmlname= 'ecotaxe_id') | |
| Return list of ecotaxes with label. More... | |
| select_revenue_stamp ($selected= '', $htmlname= 'revenuestamp', $country_code= '') | |
| Return list of revenue stamp for country. More... | |
| 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. More... | |
| select_categories ($type, $selected=0, $htmlname= 'search_categ', $nocateg=0, $showempty=1, $morecss= '') | |
| Return select list for categories (to use in form search selectors) More... | |
| select_salesrepresentatives ($selected, $htmlname, $user, $showstatus=0, $showempty=1, $morecss= '', $norepresentative=0) | |
| Return select list for categories (to use in form search selectors) More... | |
| 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. More... | |
| select_color ($set_color= '', $prefix= 'f_color', $form_name= '', $showcolorbox=1, $arrayofcolors= '') | |
| Output a HTML code to select a color. More... | |
| CreateColorIcon ($color, $module, $name, $x= '12', $y= '12') | |
| Creation d'un icone de couleur. More... | |
| select_dayofweek ($selected= '', $htmlname= 'weekid', $useempty=0) | |
| Return HTML combo list of week. More... | |
| select_month ($selected= '', $htmlname= 'monthid', $useempty=0, $longlabel=0, $morecss= 'minwidth50 maxwidth75imp valignmiddle', $addjscombo=false) | |
| Return HTML combo list of month. More... | |
| select_year ($selected= '', $htmlname= 'yearid', $useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option= '', $morecss= 'valignmiddle maxwidth75imp') | |
| Return HTML combo list of years. More... | |
| 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. More... | |
| select_dictionary ($htmlname, $dictionarytable, $keyfield= 'code', $labelfield= 'label', $selected= '', $useempty=0, $moreattrib= '') | |
| Return a HTML select list of a dictionary. More... | |
| selectAutoManual ($htmlname, $value= '', $option=0, $disabled=false, $useempty=0) | |
| Return an html string with a select combo box to choose yes or no. More... | |
| selectGroupByField ($object, $search_groupby, &$arrayofgroupby, $morecss= 'minwidth200 maxwidth250') | |
| Return HTML select list to select a group by field. More... | |
| selectXAxisField ($object, $search_xaxis, &$arrayofxaxis) | |
| Return HTML select list to select a group by field. More... | |
Static Public Member Functions | |
| static | showColor ($color, $textifnotdefined= '') |
| Output a HTML thumb of color or a text if not defined. More... | |
| static | selectColor ($set_color= '', $prefix= 'f_color', $form_name= '', $showcolorbox=1, $arrayofcolors= '', $morecss= '', $setpropertyonselect= '') |
| Output a HTML code to select a color. More... | |
| static | getBoxesArea ($user, $areacode) |
| Get array with HTML tabs with boxes of a particular area including personalized choices of user. More... | |
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) More... | |
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 | ) |
|
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 604 of file html.formother.class.php.
References print.
Referenced by selectProjectTasks().
| FormOther::CreateColorIcon | ( | $color, | |
| $module, | |||
| $name, | |||
$x = '12', |
|||
$y = '12' |
|||
| ) |
Creation d'un icone de couleur.
| string | $color | Couleur de l'image |
| string | $module | Nom du module |
| string | $name | Nom de l'image |
| int | $x | Largeur de l'image en pixels |
| int | $y | Hauteur de l'image en pixels |
Definition at line 845 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 1060 of file html.formother.class.php.
References ajax_combobox(), GETPOST(), InfoBox\listBoxes(), and Form\selectarray().
| 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 | $showempty | Add also an empty line |
| string | $morecss | More CSS |
Definition at line 344 of file html.formother.class.php.
References ajax_combobox(), db, dol_syslog(), and if.
| 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 721 of file html.formother.class.php.
References print, and selectColor().
| 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 884 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 1282 of file html.formother.class.php.
References db, dol_print_error(), dol_syslog(), and print.
| 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 194 of file html.formother.class.php.
References $resql, db, dol_print_error(), dol_syslog(), price(), and print.
| 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 that has created the template (this is set to null to get all export model when EXPORTS_SHARE_MODELS is on) |
Definition at line 71 of file html.formother.class.php.
References ajax_combobox(), db, dol_escape_htmltag(), dol_print_error(), and print.
| 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 (this is set to null to get all export model when EXPORTS_SHARE_MODELS is on) |
Definition at line 134 of file html.formother.class.php.
References ajax_combobox(), db, dol_escape_htmltag(), dol_print_error(), and print.
| 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 931 of file html.formother.class.php.
References ajax_combobox(), if, and monthArray().
| 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 308 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 249 of file html.formother.class.php.
References $resql, db, dol_print_error(), and dol_syslog().
| 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 | $showempty | 1=show also an empty value |
| string | $morecss | More CSS |
| int | $norepresentative | Show also an entry "Not categorized" |
Definition at line 406 of file html.formother.class.php.
References ajax_combobox(), db, dol_escape_htmltag(), dol_print_error(), dolGetFirstLastname(), getEntity(), and if.
| FormOther::select_year | ( | $selected = '', |
|
$htmlname = 'yearid', |
|||
$useempty = 0, |
|||
$min_year = 10, |
|||
$max_year = 5, |
|||
$offset = 0, |
|||
$invert = 0, |
|||
$option = '', |
|||
$morecss = 'valignmiddle maxwidth75imp' |
|||
| ) |
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 |
Definition at line 985 of file html.formother.class.php.
References print, and selectyear().
| 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 1339 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 |
| 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') |
| string | $morecss | Add css style into input field |
| string | $setpropertyonselect | Set this property after selecting a color |
Definition at line 740 of file html.formother.class.php.
References dol_escape_htmltag(), dol_escape_js(), dol_syslog(), name, and type.
Referenced by select_color().
| FormOther::selectGroupByField | ( | $object, | |
| $search_groupby, | |||
| & | $arrayofgroupby, | ||
$morecss = 'minwidth200 maxwidth250' |
|||
| ) |
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 |
Definition at line 1377 of file html.formother.class.php.
References dol_eval(), and dol_sort_array().
| 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 568 of file html.formother.class.php.
References _pLineSelect(), ajax_combobox(), db, if, and print.
| FormOther::selectXAxisField | ( | $object, | |
| $search_xaxis, | |||
| & | $arrayofxaxis | ||
| ) |
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 |
Definition at line 1434 of file html.formother.class.php.
References dol_eval(), and dol_sort_array().
| 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 1006 of file html.formother.class.php.
References ajax_combobox(), and if.
Referenced by select_year().
|
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 696 of file html.formother.class.php.
References colorArrayToHex(), colorIsLight(), colorStringToArray(), and print.