';
// Place
-$out .= '
'.$langs->trans("SelectResource").'
';
-$out .= '
';
+$out .= '
'.$langs->trans("SelectResource").'
';
+$out .= '
';
$events = array();
$out .= $formresources->select_resource_list('', 'fk_resource', '', 1, 1, 0, $events, '', 2, null);
$out .= '
';
-$out .= '
'.$form->selectyesno('busy', (GETPOSTISSET('busy') ? GETPOST('busy') : 1), 1).'
';
-$out .= '
'.$form->selectyesno('mandatory', (GETPOSTISSET('mandatory') ? GETPOST('mandatory') : 0), 1).'
';
+$out .= '
';
+//$out .= $form->selectyesno('busy', (GETPOSTISSET('busy') ? GETPOST('busy') : 1), 1);
+$out .= '';
+$out .= '
';
+$out .= '
';
+//$out .= $form->selectyesno('mandatory', (GETPOSTISSET('mandatory') ? GETPOST('mandatory') : 0), 1);
+$out .= '';
+$out .= '
';
-$out .= '
';
+$out .= '
';
$out .= '';
$out .= '
';
+$out .= '
';
+
$out .= '';
$out .= '
';
diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php
index 068dba8c50a..f4c6f3d3856 100644
--- a/htdocs/resource/element_resource.php
+++ b/htdocs/resource/element_resource.php
@@ -46,10 +46,6 @@ $sortfield = GETPOST('sortfield','alpha');
$page = GETPOST('page','int');
*/
-if (!$user->rights->resource->read) {
- accessforbidden();
-}
-
$object = new Dolresource($db);
$hookmanager->initHooks(array('element_resource'));
@@ -71,11 +67,22 @@ $cancel = GETPOST('cancel', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$socid = GETPOST('socid', 'int');
+if (empty($mandatory)) {
+ $mandatory = 0;
+}
+if (empty($busy)) {
+ $busy = 0;
+}
+
if ($socid > 0) { // Special for thirdparty
$element_id = $socid;
$element = 'societe';
}
+if (!$user->rights->resource->read) {
+ accessforbidden();
+}
+
// Permission is not permission on resources. We just make link here on objects.
if ($element == 'action') {
$result = restrictedArea($user, 'agenda', $element_id, 'actioncomm&societe', 'myactions|allactions', 'fk_soc', 'id');
@@ -365,7 +372,7 @@ if (!$ret) {
print '
';
- print '
';
+ print '';
// Type
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) {