dolibarr  7.0.0-beta
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
FormOther Class Reference

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)
 Return HTML select list of export models. More...
 
 select_import_model ($selected='', $htmlname='importmodelid', $type='', $useempty=0)
 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='')
 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)
 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)
 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='')
 Return HTML combo list of years. More...
 
 selectyear ($selected='', $htmlname='yearid', $useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option='')
 Return HTML combo list of years. More...
 
 form_address ($page, $selected, $socid, $htmlname='address_id', $origin='', $originid='')
 Show form to select address. More...
 
 select_dictionary ($htmlname, $dictionarytable, $keyfield='code', $labelfield='label', $selected='', $useempty=0, $moreattrib='')
 Return a HTML select list of bank accounts. 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='')
 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...
 

Detailed Description

Classe permettant la generation de composants html autre Only common components are here.

Definition at line 38 of file html.formother.class.php.

Constructor & Destructor Documentation

FormOther::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 49 of file html.formother.class.php.

Member Function Documentation

FormOther::_pLineSelect ( $inc,
  $parent,
  $lines,
  $level = 0,
  $selectedtask = 0,
  $selectedproject = 0,
  $disablechildoftaskid = 0 
)
private

Write lines of a project (all lines of a project if parent = 0)

Parameters
int$incCursor counter
int$parentId of parent task we want to see
array$linesArray of task lines
int$levelLevel
int$selectedtaskId selected task
int$selectedprojectId selected project
int$disablechildoftaskid1=Disable task that are child of the provided task id
Returns
void

Definition at line 511 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.

Parameters
string$colorCouleur de l'image
string$moduleNom du module
string$nameNom de l'image
int$xLargeur de l'image en pixels
int$yHauteur de l'image en pixels
Returns
void

Definition at line 742 of file html.formother.class.php.

FormOther::form_address (   $page,
  $selected,
  $socid,
  $htmlname = 'address_id',
  $origin = '',
  $originid = '' 
)

Show form to select address.

Parameters
int$pagePage
string$selectedId condition pre-selectionne
int$socidId of third party
string$htmlnameNom du formulaire select
string$originOrigine de l'appel pour pouvoir creer un retour
int$originidId de l'origine
Returns
void

Definition at line 934 of file html.formother.class.php.

References $form, and print.

static FormOther::getBoxesArea (   $user,
  $areacode 
)
static

Get array with HTML tabs with boxes of a particular area including personalized choices of user.

Class 'Form' must be known.

Parameters
User$userObject User
String$areacodeCode of area for pages ('0'=value for Home page)
Returns
array array('selectboxlist'=>, 'boxactivated'=>, 'boxlista'=>, 'boxlistb'=>)

Definition at line 976 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)

Parameters
int$typeType of category ('customer', 'supplier', 'contact', 'product', 'member'). Old mode (0, 1, 2, ...) is deprecated.
integer$selectedPreselected value
string$htmlnameName of combo list
int$nocategShow also an entry "Not categorized"
int$showemptyAdd also an empty line
string$morecssMore CSS
Returns
string Html combo list code
See also
select_all_categories

Definition at line 316 of file html.formother.class.php.

References ajax_combobox(), 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.

Parameters
string$set_colorPre-selected color
string$prefixName of HTML field
string$form_nameDeprecated. Not used.
int$showcolorbox1=Show color code and color box, 0=Show only color code
array$arrayofcolorsArray of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813')
Returns
void
Deprecated:
Use instead selectColor
See also
selectColor()

Definition at line 627 of file html.formother.class.php.

References print, and selectColor().

FormOther::select_dayofweek (   $selected = '',
  $htmlname = 'weekid',
  $useempty = 0 
)

Return HTML combo list of week.

Parameters
string$selectedPreselected value
string$htmlnameNom de la zone select
int$useemptyAffiche valeur vide dans liste
Returns
string

Definition at line 779 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 bank accounts.

Parameters
string$htmlnameName of select zone
string$dictionarytableDictionary table
string$keyfieldField for key
string$labelfieldLabel field
string$selectedSelected value
int$useempty1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
string$moreattribMore attributes on HTML select tag
Returns
void

Definition at line 1196 of file html.formother.class.php.

References dol_print_error(), dol_syslog(), and print.

FormOther::select_ecotaxes (   $selected = '',
  $htmlname = 'ecotaxe_id' 
)

Return list of ecotaxes with label.

Parameters
string$selectedPreselected ecotaxes
string$htmlnameName of combo list
Returns
integer

Definition at line 162 of file html.formother.class.php.

References $resql, dol_print_error(), dol_syslog(), price(), and print.

FormOther::select_export_model (   $selected = '',
  $htmlname = 'exportmodelid',
  $type = '',
  $useempty = 0 
)

Return HTML select list of export models.

Parameters
string$selectedId modele pre-selectionne
string$htmlnameNom de la zone select
string$typeType des modeles recherches
int$useemptyAffiche valeur vide dans liste
Returns
void

Definition at line 66 of file html.formother.class.php.

References dol_print_error(), and print.

FormOther::select_import_model (   $selected = '',
  $htmlname = 'importmodelid',
  $type = '',
  $useempty = 0 
)

Return list of export models.

Parameters
string$selectedId modele pre-selectionne
string$htmlnameNom de la zone select
string$typeType des modeles recherches
int$useemptyAffiche valeur vide dans liste
Returns
void

Definition at line 115 of file html.formother.class.php.

References dol_print_error(), and print.

FormOther::select_month (   $selected = '',
  $htmlname = 'monthid',
  $useempty = 0,
  $longlabel = 0 
)

Return HTML combo list of month.

Parameters
string$selectedPreselected value
string$htmlnameName of HTML select object
int$useemptyShow empty in list
int$longlabelShow long label
Returns
string

Definition at line 822 of file html.formother.class.php.

References 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.

Parameters
integer$selectedpourcentage pre-selectionne
string$htmlnamenom de la liste deroulante
int$disabledDisabled or not
int$incrementincrement value
int$startstart value
int$endend value
int$showemptyAdd also an empty line
Returns
string HTML select string

Definition at line 280 of file html.formother.class.php.

FormOther::select_revenue_stamp (   $selected = '',
  $htmlname = 'revenuestamp',
  $country_code = '' 
)

Return list of revenue stamp for country.

Parameters
string$selectedValue of preselected revenue stamp
string$htmlnameName of combo list
string$country_codeCountry Code
Returns
string HTML select list

Definition at line 219 of file html.formother.class.php.

References $resql, dol_print_error(), and dol_syslog().

FormOther::select_salesrepresentatives (   $selected,
  $htmlname,
  $user,
  $showstatus = 0,
  $showempty = 1,
  $morecss = '' 
)

Return select list for categories (to use in form search selectors)

Parameters
string$selectedPreselected value
string$htmlnameName of combo list (example: 'search_sale')
User$userObject user
int$showstatus0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status
int$showempty1=show also an empty value
string$morecssMore CSS
Returns
string Html combo list code

Definition at line 375 of file html.formother.class.php.

References ajax_combobox(), dol_print_error(), dolGetFirstLastname(), and if.

FormOther::select_year (   $selected = '',
  $htmlname = 'yearid',
  $useempty = 0,
  $min_year = 10,
  $max_year = 5,
  $offset = 0,
  $invert = 0,
  $option = '' 
)

Return HTML combo list of years.

Parameters
string$selectedPreselected value (''=current year, -1=none, year otherwise)
string$htmlnameName of HTML select object
int$useemptyAffiche valeur vide dans liste
int$min_yearOffset of minimum year into list (by default current year -10)
int$max_yearOffset of maximum year into list (by default current year + 5)
int$offsetOffset
int$invertInvert
string$optionOption
Returns
string

Definition at line 866 of file html.formother.class.php.

References print, and selectyear().

static FormOther::selectColor (   $set_color = '',
  $prefix = 'f_color',
  $form_name = '',
  $showcolorbox = 1,
  $arrayofcolors = '',
  $morecss = '' 
)
static

Output a HTML code to select a color.

Field will return an hexa color like '334455'.

Parameters
string$set_colorPre-selected color
string$prefixName of HTML field
string$form_nameDeprecated. Not used.
int$showcolorbox1=Show color code and color box, 0=Show only color code
array$arrayofcolorsArray of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813')
string$morecssAdd css style into input field
Returns
string
See also
showColor

Definition at line 644 of file html.formother.class.php.

References dol_escape_js(), dol_syslog(), name, and type.

Referenced by select_color().

FormOther::selectProjectTasks (   $selectedtask = '',
  $projectid = 0,
  $htmlname = 'task_parent',
  $modeproject = 0,
  $modetask = 0,
  $mode = 0,
  $useempty = 0,
  $disablechildoftaskid = 0 
)

Return list of project and tasks.

Parameters
int$selectedtaskPre-selected task
int$projectidProject id
string$htmlnameName of html select
int$modeproject1 to restrict on projects owned by user
int$modetask1 to restrict on tasks associated to user
int$mode0=Return list of tasks and their projects, 1=Return projects and tasks if exists
int$useempty0=Allow empty values
int$disablechildoftaskid1=Disable task that are child of the provided task id
Returns
void

Definition at line 473 of file html.formother.class.php.

References _pLineSelect(), ajax_combobox(), and print.

FormOther::selectyear (   $selected = '',
  $htmlname = 'yearid',
  $useempty = 0,
  $min_year = 10,
  $max_year = 5,
  $offset = 0,
  $invert = 0,
  $option = '' 
)

Return HTML combo list of years.

Parameters
string$selectedPreselected value (''=current year, -1=none, year otherwise)
string$htmlnameName of HTML select object
int$useemptyAffiche valeur vide dans liste
int$min_yearOffset of minimum year into list (by default current year -10)
int$max_yearOffset of maximum year into list (by default current year + 5)
int$offsetOffset
int$invertInvert
string$optionOption
Returns
string

Definition at line 884 of file html.formother.class.php.

Referenced by select_year().

static FormOther::showColor (   $color,
  $textifnotdefined = '' 
)
static

Output a HTML thumb of color or a text if not defined.

Parameters
string$colorString with hex (FFFFFF) or comma RGB ('255,255,255')
string$textifnotdefinedText to show if color not defined
Returns
string HTML code for color thumb
See also
selectColor

Definition at line 603 of file html.formother.class.php.

References colorArrayToHex(), colorIsLight(), colorStringToArray(), and print.


The documentation for this class was generated from the following file: