dolibarr  13.0.2
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 {
7  print "Error, template page can't be called as URL";
8  exit;
9 }
10 
11 
12 require_once DOL_DOCUMENT_ROOT.'/resource/class/html.formresource.class.php';
13 
14 $form = new Form($db);
15 $formresources = new FormResource($db);
16 
17 $out = '<div class="tagtable centpercent noborder borderbottom allwidth nohover">';
18 
19 $out .= '<form class="tagtr nohover '.($var == true ? 'pair' : 'impair').'" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
20 $out .= '<input type="hidden" name="token" value="'.newToken().'">';
21 $out .= '<input type="hidden" name="action" value="add_element_resource">';
22 $out .= '<input type="hidden" name="element" value="'.$element.'">';
23 $out .= '<input type="hidden" name="element_id" value="'.$element_id.'">';
24 $out .= '<input type="hidden" name="ref" value="'.$element_ref.'">';
25 $out .= '<input type="hidden" name="resource_type" value="'.(empty($resource_type) ? 'dolresource' : $resource_type).'">';
26 
27 
28 // Place
29 $out .= '<div class="tagtd">'.$langs->trans("SelectResource").'</div>';
30 $out .= '<div class="tagtd">';
31 $events = array();
32 $out .= $formresources->select_resource_list('', 'fk_resource', '', 1, 1, 0, $events, '', 2, null);
33 $out .= '</div>';
34 
35 $out .= '<div class="tagtd"><label>'.$langs->trans('Busy').'</label> '.$form->selectyesno('busy', (GETPOSTISSET('busy') ? GETPOST('busy') : 1), 1).'</div>';
36 $out .= '<div class="tagtd"><label>'.$langs->trans('Mandatory').'</label> '.$form->selectyesno('mandatory', (GETPOSTISSET('mandatory') ? GETPOST('mandatory') : 0), 1).'</div>';
37 
38 $out .= '<div class="tagtd right">';
39 $out .= '<input type="submit" id="add-resource-place" class="button" value="'.$langs->trans("Add").'"/>';
40 $out .= '</div>';
41 
42 $out .= '</form>';
43 
44 $out .= '</div>';
45 $out .= '<br>';
46 
47 print $out;
48 ?>
49 <!-- END TEMPLATE resource_add.tpl.php -->
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Classe permettant la gestion des formulaire du module resource.
Class to manage generation of HTML components Only common components must be here.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname.
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.
Definition: index.php:89