clean comments
This commit is contained in:
parent
fffbc9eac8
commit
f987c30a10
@ -2038,10 +2038,8 @@ if ($action == 'create') {
|
||||
if (empty($user->socid)) {
|
||||
if ($object->statut == 1) {
|
||||
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->contrat->creer)) {
|
||||
//print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>';
|
||||
print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle', '', true, $params);
|
||||
} else {
|
||||
//print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans('SendMail').'</a></div>';
|
||||
print dolGetButtonAction($langs->trans('SendMail'), '', 'default', '#', '', false, $params);
|
||||
}
|
||||
}
|
||||
@ -2049,20 +2047,16 @@ if ($action == 'create') {
|
||||
|
||||
if ($object->statut == 0 && $nbofservices) {
|
||||
if ($user->rights->contrat->creer) {
|
||||
//print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid&token='.newToken().'">'.$langs->trans("Validate").'</a></div>';
|
||||
print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid&token='.newToken(), '', true, $params);
|
||||
} else {
|
||||
//print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("Validate").'</a></div>';
|
||||
$params['attr']['title'] = $langs->trans("NotEnoughPermissions");
|
||||
print dolGetButtonAction($langs->trans('Validate'), '', 'default', '#', '', false, $params);
|
||||
}
|
||||
}
|
||||
if ($object->statut == 1) {
|
||||
if ($user->rights->contrat->creer) {
|
||||
//print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().'">'.$langs->trans("Modify").'</a></div>';
|
||||
print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken(), '', true, $params);
|
||||
} else {
|
||||
//print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("Modify").'</a></div>';
|
||||
$params['attr']['title'] = $langs->trans("NotEnoughPermissions");
|
||||
print dolGetButtonAction($langs->trans('Modify'), '', 'default', '#', '', false, $params);
|
||||
}
|
||||
@ -2071,10 +2065,8 @@ if ($action == 'create') {
|
||||
if (!empty($conf->commande->enabled) && $object->statut > 0 && $object->nbofservicesclosed < $nbofservices) {
|
||||
$langs->load("orders");
|
||||
if ($user->rights->commande->creer) {
|
||||
//print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/commande/card.php?action=create&token='.newToken().'&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->thirdparty->id.'">'.$langs->trans("CreateOrder").'</a></div>';
|
||||
print dolGetButtonAction($langs->trans('CreateOrder'), '', 'default', DOL_URL_ROOT.'/commande/card.php?action=create&token='.newToken().'&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->thirdparty->id, '', true, $params);
|
||||
} else {
|
||||
//print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("CreateOrder").'</a></div>';
|
||||
$params['attr']['title'] = $langs->trans("NotEnoughPermissions");
|
||||
print dolGetButtonAction($langs->trans('CreateOrder'), '', 'default', '#', '', false, $params);
|
||||
}
|
||||
@ -2083,10 +2075,8 @@ if ($action == 'create') {
|
||||
if (!empty($conf->facture->enabled) && $object->statut > 0) {
|
||||
$langs->load("bills");
|
||||
if ($user->rights->facture->creer) {
|
||||
//print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->thirdparty->id.'">'.$langs->trans("CreateBill").'</a></div>';
|
||||
print dolGetButtonAction($langs->trans('CreateBill'), '', 'default', DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->thirdparty->id, '', true, $params);
|
||||
} else {
|
||||
//print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("CreateBill").'</a></div>';
|
||||
$params['attr']['title'] = $langs->trans("NotEnoughPermissions");
|
||||
print dolGetButtonAction($langs->trans('CreateBill'), '', 'default', '#', '', false, $params);
|
||||
}
|
||||
@ -2094,19 +2084,15 @@ if ($action == 'create') {
|
||||
|
||||
if ($object->nbofservicesclosed > 0 || $object->nbofserviceswait > 0) {
|
||||
if ($user->rights->contrat->activer) {
|
||||
//print '<div class="inline-block divButAction"><a class="butAction" id="btnactivateall" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=activate&token='.newToken().'">'.$langs->trans("ActivateAllContracts").'</a></div>';
|
||||
print dolGetButtonAction($langs->trans('ActivateAllContracts'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=activate&token='.newToken(), '', true, $params);
|
||||
} else {
|
||||
//print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" id="btnactivateall" href="#">'.$langs->trans("ActivateAllContracts").'</a></div>';
|
||||
print dolGetButtonAction($langs->trans('ActivateAllContracts'), '', 'default', '#', '', false, $params);
|
||||
}
|
||||
}
|
||||
if ($object->nbofservicesclosed < $nbofservices) {
|
||||
if ($user->rights->contrat->desactiver) {
|
||||
//print '<div class="inline-block divButAction"><a class="butAction" id="btncloseall" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close&token='.newToken().'">'.$langs->trans("CloseAllContracts").'</a></div>';
|
||||
print dolGetButtonAction($langs->trans('CloseAllContracts'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close&token='.newToken(), '', true, $params);
|
||||
} else {
|
||||
//print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" id="btncloseall" href="#">'.$langs->trans("CloseAllContracts").'</a></div>';
|
||||
print dolGetButtonAction($langs->trans('CloseAllContracts'), '', 'default', '#', '', false, $params);
|
||||
}
|
||||
|
||||
@ -2129,7 +2115,6 @@ if ($action == 'create') {
|
||||
|
||||
// Clone
|
||||
if ($user->rights->contrat->creer) {
|
||||
//print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken().'&object='.$object->element.'">'.$langs->trans("ToClone").'</a></div>';
|
||||
print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken(), '', true, $params);
|
||||
}
|
||||
|
||||
@ -2137,10 +2122,8 @@ if ($action == 'create') {
|
||||
// - Droit de creer + mode brouillon (erreur creation)
|
||||
// - Droit de supprimer
|
||||
if (($user->rights->contrat->creer && $object->statut == $object::STATUS_DRAFT) || $user->rights->contrat->supprimer) {
|
||||
//print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans("Delete").'</a></div>';
|
||||
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', true, $params);
|
||||
} else {
|
||||
//print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans("Delete").'</a></div>';
|
||||
$params['attr']['title'] = $langs->trans("NotAllowed");
|
||||
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', false, $params);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user