dolibarr 20.0.0
FormActions Class Reference

Class to manage building of HTML components. More...

Public Member Functions

 __construct ($db)
 Constructor.
 
 form_select_status_action ($formname, $selected, $canedit=1, $htmlname='complete', $showempty=0, $onlyselect=0, $morecss='maxwidth100')
 Show list of action status.
 
 showactions ($object, $typeelement, $socid=0, $forceshowtitle=0, $morecss='listactions', $max=0, $moreparambacktopage='', $morehtmlcenter='', $assignedtouser=0)
 Show list of actions for element.
 
 select_type_actions ($selected='', $htmlname='actioncode', $excludetype='', $onlyautoornot=0, $hideinfohelp=0, $multiselect=0, $nooutput=0, $morecss='minwidth300')
 Output html select list of type of event.
 

Detailed Description

Class to manage building of HTML components.

Definition at line 30 of file html.formactions.class.php.

Constructor & Destructor Documentation

◆ __construct()

FormActions::__construct ( $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 48 of file html.formactions.class.php.

Member Function Documentation

◆ form_select_status_action()

FormActions::form_select_status_action ( $formname,
$selected,
$canedit = 1,
$htmlname = 'complete',
$showempty = 0,
$onlyselect = 0,
$morecss = 'maxwidth100' )

Show list of action status.

Parameters
string$formnameName of form where select is included
string$selectedPreselected value (-1..100)
int$canedit1=can edit, 0=read only
string$htmlnameName of html prefix for html fields (selectX and valX)
integer$showemptyShow an empty line if select is used
integer$onlyselect0=Standard, 1=Hide percent of completion and force usage of a select list, 2=Same than 1 and add "Incomplete (Todo+Running)
string$morecssMore css on select field
Returns
void

Definition at line 67 of file html.formactions.class.php.

References ajax_combobox(), and dol_escape_js().

◆ select_type_actions()

FormActions::select_type_actions ( $selected = '',
$htmlname = 'actioncode',
$excludetype = '',
$onlyautoornot = 0,
$hideinfohelp = 0,
$multiselect = 0,
$nooutput = 0,
$morecss = 'minwidth300' )

Output html select list of type of event.

Parameters
array | string$selectedType pre-selected (can be 'manual', 'auto' or 'AC_xxx'). Can be an array too.
string$htmlnameName of select field
string$excludetypeA type to exclude ('systemauto', 'system', '')
integer$onlyautoornot1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type, -1=Keep details and add a combined line "All manual", -2=Combined line is disabled (not implemented yet)
int$hideinfohelp1=Do not show info help, 0=Show, -1=Show+Add info to tell how to set default value
int$multiselect1=Allow multiselect of action type
int$nooutput1=No output
string$morecssMore css to add to SELECT component.
Returns
string

Definition at line 361 of file html.formactions.class.php.

References getDolGlobalString(), and info_admin().

◆ showactions()

FormActions::showactions ( $object,
$typeelement,
$socid = 0,
$forceshowtitle = 0,
$morecss = 'listactions',
$max = 0,
$moreparambacktopage = '',
$morehtmlcenter = '',
$assignedtouser = 0 )

Show list of actions for element.

Parameters
Object$objectObject
string$typeelement'invoice', 'propal', 'order', 'invoice_supplier', 'order_supplier', 'fichinter'
int$socidSocid of user
int$forceshowtitleShow title even if there is no actions to show
string$morecssMore css on table
int$maxMax number of record
string$moreparambacktopageMore param for the backtopage
string$morehtmlcenterMore html text on center of title line
int$assignedtouserAssign event by default to this user id (will be ignored if not enough permissions)
Returns
int Return integer <0 if KO, >=0 if OK

Definition at line 173 of file html.formactions.class.php.

References $object, dol_getdate(), dol_now(), dol_print_date(), dol_print_error(), dolGetButtonTitle(), getTitleFieldOfList(), load_fiche_titre(), newToken(), and setEventMessages().


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