dolibarr  7.0.0-beta
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 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="'.$_SESSION['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="resource_type" value="'.(empty($resource_type) ? 'dolresource' : $resource_type).'">';
25 
26 
27 // Place
28 $out .= '<div class="tagtd">'.$langs->trans("SelectResource").'</div>';
29 $out .= '<div class="tagtd">';
30 $events=array();
31 $out .= $formresources->select_resource_list('','fk_resource','',1,1,0,$events,'',2);
32 $out .= '</div>';
33 
34 $out .= '<div class="tagtd"><label>'.$langs->trans('Busy').'</label> '.$form->selectyesno('busy',(isset($_POST['busy'])?$_POST['busy']:1),1).'</div>';
35 $out .= '<div class="tagtd"><label>'.$langs->trans('Mandatory').'</label> '.$form->selectyesno('mandatory',(isset($_POST['mandatory'])?$_POST['mandatory']:0),1).'</div>';
36 
37 $out .= '<div class="tagtd" align="right">';
38 $out .='<input type="submit" id="add-resource-place" class="button" value="'.$langs->trans("Add").'"/>';
39 $out .= '</div>';
40 
41 $out .='</form>';
42 
43 $out .= '</div>';
44 $out .= '<br>';
45 
46 print $out;
47 ?>
48 <!-- END TEMPLATE resource_add.tpl.php -->
if(empty($reshook)) $form
View.
Definition: perms.php:103
Classe permettant la gestion des formulaire du module resource.
Class to manage generation of HTML components Only common components must be here.
print
Draft customers invoices.
Definition: index.php:91