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';
56if ($dolibarr_main_prod) {
65llxHeader(
'',
'Documentation and examples for theme');
68 <h1
class=
"bd-title" id=
"content">Button
for action</h1>
69 <p
class=
"bd-lead">
Documentation and examples
for buttons.</p>
71 <h2
id=
"example01">Example of simple usage</h2>
73 <p>Buttons
for user allowed to click.</p>
75 <div
class=
"bd-example">
78 $label =
'My action label used for accessibility visually for impaired people';
79 $html =
'<span class="fa fa-clone" ></span> My default action';
80 $actionType =
'default';
82 $id =
'mybuttonid'.$n;
90 $html =
'<span class="fa fa-clone" ></span> My delete action';
91 $actionType =
'delete';
93 $id =
'mybuttonid'.$n;
94 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
98 $html =
'<span class="fa fa-clone" ></span> My danger action';
99 $actionType =
'danger';
101 $id =
'mybuttonid'.$n;
102 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
108 <p>Buttons
for user <strong>NOT</strong> allowed to click.</p>
110 <div
class=
"bd-example">
112 $label =
'My action label used for accessibility visually for impaired people';
113 $html =
'<span class="fa fa-clone" ></span> My default action';
114 $actionType =
'default';
116 $id =
'mybuttonid'.$n;
123 $html =
'<span class="fa fa-clone" ></span> My delete action';
124 $actionType =
'delete';
126 $id =
'mybuttonid'.$n;
127 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
131 $html =
'<span class="fa fa-clone" ></span> My danger action';
132 $actionType =
'danger';
134 $id =
'mybuttonid'.$n;
135 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
142 <h2
id=
"example01">Example of confirm dialog</h2>
144 <p>Buttons
for user allowed to click.</p>
146 <div
class=
"bd-example">
148 $label =
'My action label used for accessibility visually for impaired people';
149 $html =
'<span class="fa fa-clone" ></span> My default action';
150 $actionType =
'default';
152 $id =
'mybuttonid'.$n;
162 $html =
'<span class="fa fa-clone" ></span> My delete action';
163 $actionType =
'delete';
165 $id =
'mybuttonid'.$n;
166 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
170 'url' =>
'your confirm action url',
171 'title' =>
'Your title to display',
172 'action-btn-label' =>
'Your confirm label',
173 'cancel-btn-label' =>
'Your cancel label',
174 'content' =>
'Content to display with <strong>HTML</strong> compatible <ul><li>test 01</li><li>test 02</li><li>test 03</li></ul>',
183 <p>Buttons
for user <strong>NOT</strong> allowed to click.</p>
185 <div
class=
"bd-example">
187 $label =
'My action label used for accessibility visually for impaired people';
188 $html =
'<span class="fa fa-clone" ></span> My default action';
189 $actionType =
'default';
191 $id =
'mybuttonid'.$n;
201 $html =
'<span class="fa fa-clone" ></span> My delete action';
202 $actionType =
'delete';
204 $id =
'mybuttonid'.$n;
205 $url = $_SERVER[
'PHP_SELF'] .
'?token='.newToken().
'#'.
$id;
209 'url' =>
'your confirm action url',
210 'title' =>
'Your title to display',
211 'action-btn-label' =>
'Your confirm label',
212 'cancel-btn-label' =>
'Your cancel label',
213 'content' =>
'Content to display with <strong>HTML</strong> compatible <ul><li>test 01</li><li>test 02</li><li>test 03</li></ul>',
$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.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
$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.