|
dolibarr
13.0.2
|
Class to manage building of HTML components. More...
Public Member Functions | |
| __construct ($db) | |
| Constructor. More... | |
| select_projects ($socid=-1, $selected= '', $htmlname= 'projectid', $maxlength=16, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode=0, $filterkey= '', $nooutput=0, $forceaddid=0, $morecss= '', $htmlid= '') | |
| Output a combo list with projects qualified for a third party / user. More... | |
| select_projects_list ($socid=-1, $selected= '', $htmlname= 'projectid', $maxlength=24, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode=0, $filterkey= '', $nooutput=0, $forceaddid=0, $htmlid= '', $morecss= 'maxwidth500') | |
| Returns an array with projects qualified for a third party. More... | |
| selectTasks ($socid=-1, $selected= '', $htmlname= 'taskid', $maxlength=24, $option_only=0, $show_empty= '1', $discard_closed=0, $forcefocus=0, $disabled=0, $morecss= 'maxwidth500', $projectsListId= '', $showproject= 'all', $usertofilter=null) | |
| Output a combo list with tasks qualified for a third party. More... | |
| select_element ($table_element, $socid=0, $morecss= '', $limitonstatus=-2, $projectkey="fk_projet") | |
| Build a HTML select list of element of same thirdparty to suggest to link them to project. More... | |
| selectOpportunityStatus ($htmlname, $preselected= '-1', $showempty=1, $useshortlabel=0, $showallnone=0, $showpercent=0, $morecss= '', $noadmininfo=0, $addcombojs=0) | |
| Build a HTML select list of element of same thirdparty to suggest to link them to project. More... | |
Class to manage building of HTML components.
Definition at line 30 of file html.formprojet.class.php.
| FormProjets::__construct | ( | $db | ) |
| FormProjets::select_element | ( | $table_element, | |
$socid = 0, |
|||
$morecss = '', |
|||
$limitonstatus = -2, |
|||
$projectkey = "fk_projet" |
|||
| ) |
Build a HTML select list of element of same thirdparty to suggest to link them to project.
| string | $table_element | Table of the element to update |
| string | $socid | If of thirdparty to use as filter or 'id1,id2,...' |
| string | $morecss | More CSS |
| int | $limitonstatus | Add filters to limit length of list to opened status (for example to avoid ERR_RESPONSE_HEADERS_TOO_BIG on project/element.php page). TODO To implement |
| string | $projectkey | Equivalent key to fk_projet for actual table_element |
Definition at line 492 of file html.formprojet.class.php.
References $resql, db, dol_print_error(), and dol_syslog().
| FormProjets::select_projects | ( | $socid = -1, |
|
$selected = '', |
|||
$htmlname = 'projectid', |
|||
$maxlength = 16, |
|||
$option_only = 0, |
|||
$show_empty = 1, |
|||
$discard_closed = 0, |
|||
$forcefocus = 0, |
|||
$disabled = 0, |
|||
$mode = 0, |
|||
$filterkey = '', |
|||
$nooutput = 0, |
|||
$forceaddid = 0, |
|||
$morecss = '', |
|||
$htmlid = '' |
|||
| ) |
Output a combo list with projects qualified for a third party / user.
| int | $socid | Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id) |
| string | $selected | Id project preselected ('' or id of project) |
| string | $htmlname | Name of HTML field |
| int | $maxlength | Maximum length of label |
| int | $option_only | Return only html options lines without the select tag |
| int | $show_empty | Add an empty line |
| int | $discard_closed | Discard closed projects (0=Keep, 1=hide completely, 2=Disable). Use a negative value to not show the "discarded" tooltip. |
| int | $forcefocus | Force focus on field (works with javascript only) |
| int | $disabled | Disabled |
| int | $mode | 0 for HTML mode and 1 for JSON mode |
| string | $filterkey | Key to filter |
| int | $nooutput | No print output. Return it only. |
| int | $forceaddid | Force to add project id in list, event if not qualified |
| string | $morecss | More css |
| int | $htmlid | Html id to use instead of htmlname |
Definition at line 74 of file html.formprojet.class.php.
References ajax_autocompleter(), db, print, and select_projects_list().
| FormProjets::select_projects_list | ( | $socid = -1, |
|
$selected = '', |
|||
$htmlname = 'projectid', |
|||
$maxlength = 24, |
|||
$option_only = 0, |
|||
$show_empty = 1, |
|||
$discard_closed = 0, |
|||
$forcefocus = 0, |
|||
$disabled = 0, |
|||
$mode = 0, |
|||
$filterkey = '', |
|||
$nooutput = 0, |
|||
$forceaddid = 0, |
|||
$htmlid = '', |
|||
$morecss = 'maxwidth500' |
|||
| ) |
Returns an array with projects qualified for a third party.
| int | $socid | Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id) |
| int | $selected | Id project preselected |
| string | $htmlname | Nom de la zone html |
| int | $maxlength | Maximum length of label |
| int | $option_only | Return only html options lines without the select tag |
| int | $show_empty | Add an empty line |
| int | $discard_closed | Discard closed projects (0=Keep,1=hide completely,2=Disable) |
| int | $forcefocus | Force focus on field (works with javascript only) |
| int | $disabled | Disabled |
| int | $mode | 0 for HTML mode and 1 for array return (to be used by json_encode for example) |
| string | $filterkey | Key to filter |
| int | $nooutput | No print output. Return it only. |
| int | $forceaddid | Force to add project id in list, event if not qualified |
| int | $htmlid | Html id to use instead of htmlname |
| string | $morecss | More CSS |
Definition at line 140 of file html.formprojet.class.php.
References $resql, ajax_combobox(), db, dol_print_error(), dol_trunc(), natural_search(), and print.
Referenced by select_projects().
| FormProjets::selectOpportunityStatus | ( | $htmlname, | |
$preselected = '-1', |
|||
$showempty = 1, |
|||
$useshortlabel = 0, |
|||
$showallnone = 0, |
|||
$showpercent = 0, |
|||
$morecss = '', |
|||
$noadmininfo = 0, |
|||
$addcombojs = 0 |
|||
| ) |
Build a HTML select list of element of same thirdparty to suggest to link them to project.
| string | $htmlname | HTML name |
| string | $preselected | Preselected (int or 'all' or 'none') |
| int | $showempty | Add an empty line |
| int | $useshortlabel | Use short label |
| int | $showallnone | Add choice "All" and "None" |
| int | $showpercent | Show default probability for status |
| string | $morecss | Add more css |
| int | $noadmininfo | 0=Add admin info, 1=Disable admin info |
| int | $addcombojs | 1=Add a js combo |
Definition at line 622 of file html.formprojet.class.php.
References $resql, ajax_combobox(), db, dol_syslog(), if, and info_admin().
| FormProjets::selectTasks | ( | $socid = -1, |
|
$selected = '', |
|||
$htmlname = 'taskid', |
|||
$maxlength = 24, |
|||
$option_only = 0, |
|||
$show_empty = '1', |
|||
$discard_closed = 0, |
|||
$forcefocus = 0, |
|||
$disabled = 0, |
|||
$morecss = 'maxwidth500', |
|||
$projectsListId = '', |
|||
$showproject = 'all', |
|||
$usertofilter = null |
|||
| ) |
Output a combo list with tasks qualified for a third party.
| int | $socid | Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id) |
| int | $selected | Id task preselected |
| string | $htmlname | Name of HTML select |
| int | $maxlength | Maximum length of label |
| int | $option_only | Return only html options lines without the select tag |
| string | $show_empty | Add an empty line ('1' or string to show for empty line) |
| int | $discard_closed | Discard closed projects (0=Keep, 1=hide completely, 2=Disable) |
| int | $forcefocus | Force focus on field (works with javascript only) |
| int | $disabled | Disabled |
| string | $morecss | More css added to the select component |
| string | $projectsListId | ''=Automatic filter on project allowed. List of id=Filter on project ids. |
| string | $showproject | 'all' = Show project info, ''=Hide project info |
| User | $usertofilter | User object to use for filtering |
Definition at line 310 of file html.formprojet.class.php.
References $resql, ajax_combobox(), db, dol_print_error(), dol_trunc(), print, Project\STATUS_CLOSED, and Project\STATUS_DRAFT.