diff --git a/htdocs/admin/tools/ui/class/documentation.class.php b/htdocs/admin/tools/ui/class/documentation.class.php index 71ae17b9061..4f598b32c17 100644 --- a/htdocs/admin/tools/ui/class/documentation.class.php +++ b/htdocs/admin/tools/ui/class/documentation.class.php @@ -150,8 +150,8 @@ class Documentation 'icon' => 'fas fa-comments pictofixedwidth', 'submenu' => array(), 'summary' => array( - 'DocBasicUsage' => '#seteventmessagesection-basicusage', - 'DocSetEventMessageContextualVariations' => '#seteventmessagesection-contextvariations', + 'DocBasicUsage' => '#setinputssection-basicusage', + 'DocHelperFunctionsInputUsage' => '#setinputssection-helperfunctions', ) ), ), diff --git a/htdocs/admin/tools/ui/components/inputs.php b/htdocs/admin/tools/ui/components/inputs.php index 6f962fd461c..36ffde765e8 100644 --- a/htdocs/admin/tools/ui/components/inputs.php +++ b/htdocs/admin/tools/ui/components/inputs.php @@ -39,21 +39,6 @@ $langs->load('uxdocumentation'); $action = GETPOST('action', 'alpha'); -//if ($action == 'displayeventmessage') { -// setEventMessages($langs->trans('DocSetEventMessageUnique'), null); -//} elseif ($action == 'displayeventmessages') { -// $messageArray = [$langs->trans('DocSetEventMessage', '1'), -// $langs->trans('DocSetEventMessage', '2'), -// $langs->trans('DocSetEventMessage', '3')]; -// setEventMessages(null, $messageArray); -//} elseif ($action == 'displayeventmessageok') { -// setEventMessages($langs->trans('DocSetEventMessageOK'), null); -//} elseif ($action == 'displayeventmessagewarning') { -// setEventMessages($langs->trans('DocSetEventMessageWarning'), null, 'warnings'); -//} elseif ($action == 'displayeventmessageerror') { -// setEventMessages($langs->trans('DocSetEventMessageError'), null, 'errors'); -//} - // $documentation = new Documentation($db); @@ -82,7 +67,8 @@ $documentation->showSidebar(); ?>

trans('DocBasicUsage'); ?>

-

trans('DocinputsDescription'); ?>

+ +

trans('DocClassicInputsDescription'); ?>

Available Input @@ -99,13 +85,38 @@ $documentation->showSidebar(); ?> '', ); echo $documentation->showCode($lines); ?> + + +

trans('DocCheckboxInputsDescription'); ?>

+
+ + + +
+ ', + '', + '', + ); + echo $documentation->showCode($lines); ?> + + +

trans('DocRadioInputsDescription'); ?>

+
+ Radio Input +
+ Radio Input' + ); + echo $documentation->showCode($lines); ?>
- - -
-

trans('DocSelectInputUsage'); ?>

-

trans('DocinputsDescription'); ?>

+ +
+

trans('DocHelperFunctionsInputUsage'); ?>

+

trans('DocSelectInputsDescription'); ?>

Select with empty value showSidebar(); ?> ); echo $documentation->showCode($lines); ?> -
- -
-

trans('DocCheckboxInputUsage'); ?>

-

trans('DocCheckboxInputDescription'); ?>

-
- - - -

- - - -
- ', - '', - '', - ' ', - '', - '', - '', - ); - echo $documentation->showCode($lines); ?> -
- - -
-

trans('DocCheckboxInputUsage'); ?>

-

trans('DocCheckboxInputDescription'); ?>

-
- -
- showCode($lines); ?> -
- - -
-

trans('DocMultiSelectInputUsage'); ?>

-

trans('DocMultiSelectInputDescription'); ?>

+ +

trans('DocMultiSelectInputsDescription'); ?>

Multiselect showSidebar(); ?> 'print $form->multiselectarray(\'categories\', $values, GETPOST(\'categories\', \'array\'), 0, 0, \'minwidth200\', 0, 0);' ); echo $documentation->showCode($lines); ?> -
- -
-

trans('DocEditorInputUsage'); ?>

-

trans('DocEditorInputDescription'); ?>

+ +

trans('DocDateSelectInputsDescription'); ?>

+
+ Date Select + 'value 1', '2' => 'value 2', '3' => 'value 3']; + $form = new Form($db); + print $form->selectDate(); + ?> +

+ Date Select with hours + 'value 1', '2' => 'value 2', '3' => 'value 3']; + $form = new Form($db); + print $form->selectDate('', 're2', 1, 1, 1); + ?> +
+ $d 1=Show days, month, years,', + ' * @param int<0,2> $addnowlink Add a link "Now", 1 with server time, 2 with local computer time,', + ' * @param int<0,1> $disabled Disable input fields,', + ' * @param int|string $fullday When a checkbox with id #fullday is checked, hours are set with 00:00 (if value if \'fulldaystart\') or 23:59 (if value is \'fulldayend\'),', + ' * @param string $addplusone Add a link "+1 hour". Value must be name of another selectDate field.,', + ' * @param int|string|array $adddateof Add a link "Date of ..." using the following date. Must be array(array(\'adddateof\' => ..., \'labeladddateof\' => ...)),', + ' * @param string $openinghours Specify hour start and hour end for the select ex 8,20,', + ' * @param int $stepminutes Specify step for minutes between 1 and 30,', + ' * @param string $labeladddateof Label to use for the $adddateof parameter. Deprecated. Used only when $adddateof is not an array.,', + ' * @param string $placeholder Placeholder,', + ' * @param \'auto\'|\'gmt\'|\'tzserver\'|\'tzuserrel\' $gm \'auto\' (for backward compatibility, avoid this), \'gmt\' or \'tzserver\' or \'tzuserrel\',', + ' * @param string $calendarpicto URL of the icon/image used to display the calendar,', + ' * @return string Html for selectDate,', + ' * @see form_date(), select_month(), select_year(), select_dayofweek(),', + ' */', + '', + 'Date Select', + 'print $form->selectDate();', + '', + 'Date Select with hours', + 'print $form->selectDate(\'\', \'re2\', 1, 1, 1);' + ); + echo $documentation->showCode($lines); ?> + + + +

trans('DocEditorInputsDescription'); ?>

showSidebar(); ?>
-'; - docFooter(); diff --git a/htdocs/langs/en_US/uxdocumentation.lang b/htdocs/langs/en_US/uxdocumentation.lang index 56d3c587185..0830a54d06e 100644 --- a/htdocs/langs/en_US/uxdocumentation.lang +++ b/htdocs/langs/en_US/uxdocumentation.lang @@ -79,3 +79,13 @@ DocSetEventMessage = Message #%s DocButtonIconsLowEmphasis = Low emphasis icon buttons DocButtonIconsDescriptionLowEmphasis = An icon button with low emphasis is typically a button that includes only an icon (no accompanying text) and has minimal styling to make it unobtrusive. Icon buttons with low emphasis are ideal for secondary or tertiary actions, like clear field, fill field, bookmarking, or sharing, especially in interfaces that have more prominent primary actions (like "Submit" or "Continue"). DocButtonIconsForTitle = Buttons for list title + +#Input +DocClassicInputsDescription = Classic input to enter string values, integer values... +DocCheckboxInputsDescription = Checkbox input to enter boolean values +DocRadioInputsDescription = Radio input to enter boolean values +DocHelperFunctionsInputUsage = Helper functions usage +DocSelectInputsDescription = Select input to enter one value +DocMultiSelectInputsDescription = Multiselect input to enter several values +DocEditorInputsDescription = Editor input to enter text with HTML +DocDateSelectInputsDescription = Date input to enter a date with or without hours