Look and feel v12
This commit is contained in:
parent
8117f37e46
commit
4bbe307b41
@ -754,9 +754,9 @@ if ($resql)
|
|||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||||
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button buttongen" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||||
print '<div name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"></div>';
|
print '<div name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"></div>';
|
||||||
print '<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button buttongen" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
$fieldsforcontent = array('topic', 'joinfiles', 'content');
|
$fieldsforcontent = array('topic', 'joinfiles', 'content');
|
||||||
@ -902,10 +902,10 @@ if ($resql)
|
|||||||
|
|
||||||
// Modify link / Delete link
|
// Modify link / Delete link
|
||||||
print '<td class="center nowraponall" width="64">';
|
print '<td class="center nowraponall" width="64">';
|
||||||
if ($canbemodified) print '<a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a>';
|
if ($canbemodified) print '<a class="reposition editfielda" href="'.$url.'action=edit">'.img_edit().'</a>';
|
||||||
if ($iserasable)
|
if ($iserasable)
|
||||||
{
|
{
|
||||||
print ' <a href="'.$url.'action=delete">'.img_delete().'</a>';
|
print '<a class="marginleftonly" href="'.$url.'action=delete">'.img_delete().'</a>';
|
||||||
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
|
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -100,11 +100,6 @@ if (empty($action) && empty($id) && empty($ref)) $action = 'view';
|
|||||||
// Load object
|
// Load object
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||||
|
|
||||||
// Security check - Protection if external user
|
|
||||||
//if ($user->socid > 0) accessforbidden();
|
|
||||||
//if ($user->socid > 0) $socid = $user->socid;
|
|
||||||
//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
|
|
||||||
//$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
|
||||||
|
|
||||||
$permissiontoread = $user->rights->mymodule->myobject->read;
|
$permissiontoread = $user->rights->mymodule->myobject->read;
|
||||||
$permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
$permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
|
||||||
@ -113,6 +108,14 @@ $permissionnote = $user->rights->mymodule->myobject->write; // Used by the inclu
|
|||||||
$permissiondellink = $user->rights->mymodule->myobject->write; // Used by the include of actions_dellink.inc.php
|
$permissiondellink = $user->rights->mymodule->myobject->write; // Used by the include of actions_dellink.inc.php
|
||||||
$upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object->entity : 1];
|
$upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object->entity : 1];
|
||||||
|
|
||||||
|
// Security check - Protection if external user
|
||||||
|
//if ($user->socid > 0) accessforbidden();
|
||||||
|
//if ($user->socid > 0) $socid = $user->socid;
|
||||||
|
//$isdraft = (($object->statut == $object::STATUS_DRAFT) ? 1 : 0);
|
||||||
|
//$result = restrictedArea($user, 'mymodule', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
|
||||||
|
|
||||||
|
//if (!$permissiontoread) accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
|
|||||||
@ -107,16 +107,6 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen
|
|||||||
if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition.
|
if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition.
|
||||||
if (!$sortorder) $sortorder = "ASC";
|
if (!$sortorder) $sortorder = "ASC";
|
||||||
|
|
||||||
// Security check
|
|
||||||
if (empty($conf->mymodule->enabled)) accessforbidden('Module not enabled');
|
|
||||||
$socid = 0;
|
|
||||||
if ($user->socid > 0) // Protection if external user
|
|
||||||
{
|
|
||||||
//$socid = $user->socid;
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
//$result = restrictedArea($user, 'mymodule', $id, '');
|
|
||||||
|
|
||||||
// Initialize array of search criterias
|
// Initialize array of search criterias
|
||||||
$search_all = trim(GETPOST("search_all", 'alpha'));
|
$search_all = trim(GETPOST("search_all", 'alpha'));
|
||||||
$search = array();
|
$search = array();
|
||||||
@ -161,6 +151,18 @@ $permissiontoread = $user->rights->mymodule->myobject->read;
|
|||||||
$permissiontoadd = $user->rights->mymodule->myobject->write;
|
$permissiontoadd = $user->rights->mymodule->myobject->write;
|
||||||
$permissiontodelete = $user->rights->mymodule->myobject->delete;
|
$permissiontodelete = $user->rights->mymodule->myobject->delete;
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
if (empty($conf->mymodule->enabled)) accessforbidden('Module not enabled');
|
||||||
|
$socid = 0;
|
||||||
|
if ($user->socid > 0) // Protection if external user
|
||||||
|
{
|
||||||
|
//$socid = $user->socid;
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
//$result = restrictedArea($user, 'mymodule', $id, '');
|
||||||
|
//if (!$permissiontoread) accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user