Fixing style errors.

This commit is contained in:
stickler-ci 2021-04-16 12:13:05 +00:00
parent 22ec79d03c
commit 1324f3d375
2 changed files with 4 additions and 6 deletions

View File

@ -166,8 +166,8 @@ if (empty($reshook)) {
$fpartnership = new Partnership($db);
$partnershipid = $fpartnership->fetch(0, "", $fk_soc);
if($partnershipid > 0){
setEventMessages($langs->trans('PartnershipAlreadyExist').' : '.$fpartnership->getNomUrl(0,'',1), '', 'errors');
if ($partnershipid > 0) {
setEventMessages($langs->trans('PartnershipAlreadyExist').' : '.$fpartnership->getNomUrl(0, '', 1), '', 'errors');
$action = ($action == 'add') ? 'create' : 'edit';
}
}
@ -226,7 +226,6 @@ if (empty($reshook)) {
$error++;
} else {
$object->reason_decline_or_cancel = GETPOST('reason_decline_or_cancel', 'restricthtml');
}
if (!$error) {
@ -262,7 +261,7 @@ if (empty($reshook)) {
$trackid = 'partnership'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
if(!empty($id) && !empty(GETPOST('confirm'))){
if (!empty($id) && !empty(GETPOST('confirm'))) {
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
exit;
}

View File

@ -535,14 +535,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($permissiontoadd) {
print dolGetButtonAction($langs->trans('ShowPartnership'), '', 'default', dol_buildpath('/partnership/partnership_card.php', 1).'?id='.$object->id, '', $permissiontoadd);
}
// Cancel
if ($permissiontoadd) {
if ($object->status == $object::STATUS_ACCEPTED) {
print dolGetButtonAction($langs->trans('Cancel'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontoadd);
}
}
}
print '</div>'."\n";
}