diff --git a/htdocs/admin/tools/ui/class/documentation.class.php b/htdocs/admin/tools/ui/class/documentation.class.php index 584f6c36a7f..71ae17b9061 100644 --- a/htdocs/admin/tools/ui/class/documentation.class.php +++ b/htdocs/admin/tools/ui/class/documentation.class.php @@ -145,6 +145,15 @@ class Documentation 'DocSetEventMessageContextualVariations' => '#seteventmessagesection-contextvariations', ) ), + 'Inputs' => array( + 'url' => dol_buildpath($baseUrl.'/components/inputs.php', 1), + 'icon' => 'fas fa-comments pictofixedwidth', + 'submenu' => array(), + 'summary' => array( + 'DocBasicUsage' => '#seteventmessagesection-basicusage', + 'DocSetEventMessageContextualVariations' => '#seteventmessagesection-contextvariations', + ) + ), ), 'summary' => array( 'keySum' => '#keySum' diff --git a/htdocs/admin/tools/ui/components/inputs.php b/htdocs/admin/tools/ui/components/inputs.php new file mode 100644 index 00000000000..806dfddaeae --- /dev/null +++ b/htdocs/admin/tools/ui/components/inputs.php @@ -0,0 +1,127 @@ + + * + * This program and files/directory inner it is free software: you can + * redistribute it and/or modify it under the terms of the + * GNU Affero General Public License (AGPL) as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AGPL for more details. + * + * You should have received a copy of the GNU AGPL + * along with this program. If not, see . + */ + +$res=0; +if (! $res && file_exists("../../main.inc.php")) : $res=@include '../../main.inc.php'; +endif; +if (! $res && file_exists("../../../main.inc.php")) : $res=@include '../../../main.inc.php'; +endif; +if (! $res && file_exists("../../../../main.inc.php")) : $res=@include '../../../../main.inc.php'; +endif; + + +// Protection if external user +if ($user->socid > 0) : accessforbidden(); +endif; + +// Includes +dol_include_once('admin/tools/ui/class/documentation.class.php'); + +// Load documentation translations +$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); + +// Output html head + body - Param is Title +$documentation->docHeader('Inputs'); + +// Set view for menu and breadcrumb +// Menu must be set in constructor of documentation class +$documentation->view = array('Components','Inputs'); + +// Output sidebar +$documentation->showSidebar(); ?> + +
+ + showBreadCrumb(); ?> + +
+ +

trans('DocInputsTitle'); ?>

+

trans('DocInputsMainDescription'); ?>

+ + + showSummary(); ?> + + +
+

trans('DocBasicUsage'); ?>

+

trans('DocinputsDescription'); ?>

+
+ Available Input + +

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

trans('DocBasicUsage'); ?>

+

trans('DocinputsDescription'); ?>

+
+ Available Input + + Disabled Input + +
+ Input label', + '', + ); + echo $documentation->showCode($lines); ?> + +
+ +
+ +docFooter(); + +?>