18if (!defined(
'NOREQUIRESOC')) {
19 define(
'NOREQUIRESOC',
'1');
21if (!defined(
'NOCSRFCHECK')) {
22 define(
'NOCSRFCHECK', 1);
24if (!defined(
'NOTOKENRENEWAL')) {
25 define(
'NOTOKENRENEWAL', 1);
27if (!defined(
'NOLOGIN')) {
30if (!defined(
'NOREQUIREHTML')) {
31 define(
'NOREQUIREHTML', 1);
33if (!defined(
'NOREQUIREAJAX')) {
34 define(
'NOREQUIREAJAX',
'1');
36if (!defined(
'NOSESSION')) {
37 define(
'NOSESSION',
'1');
39if (!defined(
'NOREQUIREMENU')) {
40 define(
'NOREQUIREMENU',
'1');
42session_cache_limiter(
'public');
44require
'../../../../main.inc.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions.lib.php';
57if ($dolibarr_main_prod) {
66llxHeader(
'',
'Documentation and examples for theme');
69 <h1
class=
"bd-title" id=
"content">Button
for action</h1>
70 <p
class=
"bd-lead">
Documentation and examples
for buttons.</p>
72 <h2
id=
"example01">Example of simple
usage</h2>
74 <p>Buttons
for user allowed to click.</p>
76 <div
class=
"bd-example">
79 $label =
'My action label used for accessibility visually for impaired people';
80 $html =
'<span class="fa fa-clone" ></span> My default action';
81 $actionType =
'default';
83 $id =
'mybuttonid'.$n;
91 $html =
'<span class="fa fa-clone" ></span> My delete action';
92 $actionType =
'delete';
94 $id =
'mybuttonid'.$n;
95 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
99 $html =
'<span class="fa fa-clone" ></span> My danger action';
100 $actionType =
'danger';
102 $id =
'mybuttonid'.$n;
103 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
109 <p>Buttons
for user <strong>NOT</strong> allowed to click.</p>
111 <div
class=
"bd-example">
113 $label =
'My action label used for accessibility visually for impaired people';
114 $html =
'<span class="fa fa-clone" ></span> My default action';
115 $actionType =
'default';
117 $id =
'mybuttonid'.$n;
124 $html =
'<span class="fa fa-clone" ></span> My delete action';
125 $actionType =
'delete';
127 $id =
'mybuttonid'.$n;
128 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
132 $html =
'<span class="fa fa-clone" ></span> My danger action';
133 $actionType =
'danger';
135 $id =
'mybuttonid'.$n;
136 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
143 <h2
id=
"example01">Example of confirm dialog</h2>
145 <p>Buttons
for user allowed to click.</p>
147 <div
class=
"bd-example">
149 $label =
'My action label used for accessibility visually for impaired people';
150 $html =
'<span class="fa fa-clone" ></span> My default action';
151 $actionType =
'default';
153 $id =
'mybuttonid'.$n;
163 $html =
'<span class="fa fa-clone" ></span> My delete action';
164 $actionType =
'delete';
166 $id =
'mybuttonid'.$n;
167 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
171 'url' =>
'your confirm action url',
172 'title' =>
'Your title to display',
173 'action-btn-label' =>
'Your confirm label',
174 'cancel-btn-label' =>
'Your cancel label',
175 'content' =>
'Content to display with <strong>HTML</strong> compatible <ul><li>test 01</li><li>test 02</li><li>test 03</li></ul>',
184 <p>Buttons
for user <strong>NOT</strong> allowed to click.</p>
186 <div
class=
"bd-example">
188 $label =
'My action label used for accessibility visually for impaired people';
189 $html =
'<span class="fa fa-clone" ></span> My default action';
190 $actionType =
'default';
192 $id =
'mybuttonid'.$n;
202 $html =
'<span class="fa fa-clone" ></span> My delete action';
203 $actionType =
'delete';
205 $id =
'mybuttonid'.$n;
206 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
210 'url' =>
'your confirm action url',
211 'title' =>
'Your title to display',
212 'action-btn-label' =>
'Your confirm label',
213 'cancel-btn-label' =>
'Your cancel label',
214 'content' =>
'Content to display with <strong>HTML</strong> compatible <ul><li>test 01</li><li>test 02</li><li>test 03</li></ul>',
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Class to manage UI documentation.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
usage($program, $header)
Print the usage when executing scripts from install/.
$conf db user
Active Directory does not allow anonymous connections.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.