dolibarr
16.0.5
Main Page
Related Pages
Modules
Classes
Files
Examples
File List
File Members
dolibarr_16.0
htdocs
core
tpl
resource_add.tpl.php
1
<!-- BEGIN TEMPLATE resource_add.tpl.php -->
2
<?php
3
4
// Protection to avoid direct call of template
5
if
(empty($conf) || !is_object($conf)) {
6
print
"Error, template page can't be called as URL"
;
7
exit;
8
}
9
10
11
require_once DOL_DOCUMENT_ROOT.
'/resource/class/html.formresource.class.php'
;
12
13
$form
=
new
Form
($db);
14
$formresources =
new
FormResource
($db);
15
16
$out =
''
;
17
18
$out .=
'<div class="centpercent allwidth nohover">'
;
19
20
$out .=
'<form class="nohover '
.($var ==
true
?
'pair'
:
'impair'
).
'" action="'
.$_SERVER[
"PHP_SELF"
].
'" method="POST">'
;
21
$out .=
'<input type="hidden" name="token" value="'
.newToken().
'">'
;
22
$out .=
'<input type="hidden" name="action" value="add_element_resource">'
;
23
$out .=
'<input type="hidden" name="element" value="'
.$element.
'">'
;
24
$out .=
'<input type="hidden" name="element_id" value="'
.$element_id.
'">'
;
25
$out .=
'<input type="hidden" name="ref" value="'
.$element_ref.
'">'
;
26
$out .=
'<input type="hidden" name="resource_type" value="'
.(empty($resource_type) ?
'dolresource'
: $resource_type).
'">'
;
27
28
$out .=
'<div class="noborder borderbottom">'
;
29
30
// Place
31
$out .=
'<div class="divsearchfield paddingtop paddingbottom valignmiddle inline-block">'
.$langs->trans(
"SelectResource"
).
'</div>'
;
32
$out .=
'<div class="divsearchfield paddingtop paddingbottom valignmiddle inline-block">'
;
33
$events = array();
34
$out .= $formresources->select_resource_list(
''
,
'fk_resource'
,
''
, 1, 1, 0, $events,
''
, 2,
null
);
35
$out .=
'</div>'
;
36
37
$out .=
'<div class="divsearchfield paddingtop paddingbottom valignmiddle inline-block marginleftonly"><label for="resbusy">'
.$langs->trans(
'Busy'
).
'</label> '
;
38
//$out .= $form->selectyesno('busy', (GETPOSTISSET('busy') ? GETPOST('busy') : 1), 1);
39
$out .=
'<input type="checkbox" id="resbusy" name="busy" value="1"'
.(GETPOSTISSET(
'fk_resource'
) ? (
GETPOST
(
'busy'
) ?
' checked'
:
''
) :
' checked'
).
'>'
;
40
$out .=
'</div>'
;
41
$out .=
'<div class="divsearchfield paddingtop paddingbottom valignmiddle inline-block marginleftonly"><label for="resmandatory">'
.$langs->trans(
'Mandatory'
).
'</label> '
;
42
//$out .= $form->selectyesno('mandatory', (GETPOSTISSET('mandatory') ? GETPOST('mandatory') : 0), 1);
43
$out .=
'<input type="checkbox" id="resmandatory" name="mandatory" value="1"'
.(GETPOSTISSET(
'fk_resource'
) ? (
GETPOST
(
'mandatory'
) ?
' checked'
:
''
) :
' checked'
).
'>'
;
44
$out .=
'</div>'
;
45
46
$out .=
'<div class="divsearchfield paddingtop paddingbottom valignmiddle inline-block right">'
;
47
$out .=
'<input type="submit" id="add-resource-place" class="button button-add" value="'
.$langs->trans(
"Add"
).
'"/>'
;
48
$out .=
'</div>'
;
49
50
$out .=
'</div>'
;
51
52
$out .=
'</form>'
;
53
54
$out .=
'</div>'
;
55
$out .=
'<br>'
;
56
57
print $out;
58
?>
59
<!-- END TEMPLATE resource_add.tpl.php -->
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition:
functions.lib.php:484
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition:
card.php:142
Form
Class to manage generation of HTML components Only common components must be here.
Definition:
html.form.class.php:52
FormResource
Class to manage forms for the module resource.
Definition:
html.formresource.class.php:36
Generated on Sun Feb 4 2024 01:01:17 for
dolibarr
by Doxygen 1.8.17