18if (!defined(
'NOREQUIRESOC')) {
19 define(
'NOREQUIRESOC',
'1');
21if (!defined(
'NOCSRFCHECK')) {
22 define(
'NOCSRFCHECK', 1);
24if (!defined(
'NOTOKENRENEWAL')) {
25 define(
'NOTOKENRENEWAL', 1);
27if (!defined(
'NOREQUIREHTML')) {
28 define(
'NOREQUIREHTML', 1);
30if (!defined(
'NOREQUIREAJAX')) {
31 define(
'NOREQUIREAJAX',
'1');
33if (!defined(
'NOSESSION')) {
34 define(
'NOSESSION',
'1');
36if (!defined(
'NOREQUIREMENU')) {
37 define(
'NOREQUIREMENU',
'1');
39session_cache_limiter(
'public');
41require
'../../../../main.inc.php';
53if ($dolibarr_main_prod) {
62llxHeader(
'',
'Documentation and examples for theme');
65 <h1
class=
"bd-title" id=
"content">Button
for action</h1>
66 <p
class=
"bd-lead">
Documentation and examples
for buttons.</p>
68 <h2
id=
"example01">Example of simple usage</h2>
70 <p>Buttons
for user allowed to click.</p>
72 <div
class=
"bd-example">
75 $label =
'My action label used for accessibility visually for impaired people';
76 $html =
'<span class="fa fa-clone" ></span> My default action';
77 $actionType =
'default';
79 $id =
'mybuttonid'.$n;
84 print dolGetButtonAction($label, $html, $actionType, $url, $id, $userRight);
87 $html =
'<span class="fa fa-clone" ></span> My delete action';
88 $actionType =
'delete';
90 $id =
'mybuttonid'.$n;
91 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
92 print dolGetButtonAction($label, $html, $actionType, $url, $id, $userRight);
95 $html =
'<span class="fa fa-clone" ></span> My danger action';
96 $actionType =
'danger';
98 $id =
'mybuttonid'.$n;
99 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
100 print dolGetButtonAction($label, $html, $actionType, $url, $id, $userRight);
105 <p>Buttons
for user <strong>NOT</strong> allowed to click.</p>
107 <div
class=
"bd-example">
109 $label =
'My action label used for accessibility visually for impaired people';
110 $html =
'<span class="fa fa-clone" ></span> My default action';
111 $actionType =
'default';
113 $id =
'mybuttonid'.$n;
117 print dolGetButtonAction($label, $html, $actionType, $url, $id, $userRight);
120 $html =
'<span class="fa fa-clone" ></span> My delete action';
121 $actionType =
'delete';
123 $id =
'mybuttonid'.$n;
124 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
125 print dolGetButtonAction($label, $html, $actionType, $url, $id, $userRight);
128 $html =
'<span class="fa fa-clone" ></span> My danger action';
129 $actionType =
'danger';
131 $id =
'mybuttonid'.$n;
132 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
133 print dolGetButtonAction($label, $html, $actionType, $url, $id, $userRight);
139 <h2
id=
"example01">Example of confirm dialog</h2>
141 <p>Buttons
for user allowed to click.</p>
143 <div
class=
"bd-example">
145 $label =
'My action label used for accessibility visually for impaired people';
146 $html =
'<span class="fa fa-clone" ></span> My default action';
147 $actionType =
'default';
149 $id =
'mybuttonid'.$n;
156 print dolGetButtonAction($label, $html, $actionType, $url, $id, $userRight, $params);
159 $html =
'<span class="fa fa-clone" ></span> My delete action';
160 $actionType =
'delete';
162 $id =
'mybuttonid'.$n;
163 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
167 'url' =>
'your confirm action url',
168 'title' =>
'Your title to display',
169 'action-btn-label' =>
'Your confirm label',
170 'cancel-btn-label' =>
'Your cancel label',
171 'content' =>
'Content to display with <strong>HTML</strong> compatible <ul><li>test 01</li><li>test 02</li><li>test 03</li></ul>',
175 print dolGetButtonAction($label, $html, $actionType, $url, $id, $userRight, $params);
180 <p>Buttons
for user <strong>NOT</strong> allowed to click.</p>
182 <div
class=
"bd-example">
184 $label =
'My action label used for accessibility visually for impaired people';
185 $html =
'<span class="fa fa-clone" ></span> My default action';
186 $actionType =
'default';
188 $id =
'mybuttonid'.$n;
195 print dolGetButtonAction($label, $html, $actionType, $url, $id, $userRight, $params);
198 $html =
'<span class="fa fa-clone" ></span> My delete action';
199 $actionType =
'delete';
201 $id =
'mybuttonid'.$n;
202 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
206 'url' =>
'your confirm action url',
207 'title' =>
'Your title to display',
208 'action-btn-label' =>
'Your confirm label',
209 'cancel-btn-label' =>
'Your cancel label',
210 'content' =>
'Content to display with <strong>HTML</strong> compatible <ul><li>test 01</li><li>test 02</li><li>test 03</li></ul>',
214 print dolGetButtonAction($label, $html, $actionType, $url, $id, $userRight, $params);
$id
Support class for third parties, contacts, members, users or resources.
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.
$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.