Fixing style errors.

This commit is contained in:
stickler-ci 2021-04-03 08:29:04 +00:00
parent 6cac5f2212
commit eb4d8848e2
4 changed files with 11 additions and 17 deletions

View File

@ -80,10 +80,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
if ($action == 'setting') { if ($action == 'setting') {
$value = GETPOST('managed_for', 'alpha'); $value = GETPOST('managed_for', 'alpha');
$res = dolibarr_set_const($db, "PARTNERSHIP_IS_MANAGED_FOR", $value, 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "PARTNERSHIP_IS_MANAGED_FOR", $value, 'chaine', 0, '', $conf->entity);
} }
if ($action) { if ($action) {

View File

@ -40,12 +40,12 @@ function partnershipAdminPrepareHead()
$head[$h][2] = 'settings'; $head[$h][2] = 'settings';
$h++; $h++;
$head[$h][0] = dol_buildpath("/partnership/admin/myobject_extrafields.php", 1); $head[$h][0] = dol_buildpath("/partnership/admin/myobject_extrafields.php", 1);
$head[$h][1] = $langs->trans("ExtraFields"); $head[$h][1] = $langs->trans("ExtraFields");
$head[$h][2] = 'myobject_extrafields'; $head[$h][2] = 'myobject_extrafields';
$h++; $h++;
$head[$h][0] = dol_buildpath("/partnership/admin/about.php", 1); $head[$h][0] = dol_buildpath("/partnership/admin/about.php", 1);
$head[$h][1] = $langs->trans("About"); $head[$h][1] = $langs->trans("About");
@ -133,4 +133,4 @@ function partnershipPrepareHead($object)
complete_head_from_modules($conf, $langs, $object, $head, $h, 'partnership@partnership', 'remove'); complete_head_from_modules($conf, $langs, $object, $head, $h, 'partnership@partnership', 'remove');
return $head; return $head;
} }

View File

@ -108,10 +108,9 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen
// Initialize array of search criterias // Initialize array of search criterias
$search_all = GETPOST("search_all", 'alpha'); $search_all = GETPOST("search_all", 'alpha');
$search = array(); $search = array();
if($conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'member') if ($conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'member')
unset($object->fields['fk_soc']); unset($object->fields['fk_soc']);
else else unset($object->fields['fk_member']);
unset($object->fields['fk_member']);
foreach ($object->fields as $key => $val) { foreach ($object->fields as $key => $val) {
if (GETPOST('search_'.$key, 'alpha')) { if (GETPOST('search_'.$key, 'alpha')) {
$search[$key] = GETPOST('search_'.$key, 'alpha'); $search[$key] = GETPOST('search_'.$key, 'alpha');
@ -205,9 +204,7 @@ if (empty($reshook)) {
} else { } else {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }
} } elseif ($action == 'confirm_refuse' && $permissiontoadd && !GETPOST('cancel', 'alpha')) {
elseif ($action == 'confirm_refuse' && $permissiontoadd && !GETPOST('cancel', 'alpha')) {
// Close proposal // Close proposal
if (!(GETPOST('reason_decline_or_cancel', 'alpha'))) { if (!(GETPOST('reason_decline_or_cancel', 'alpha'))) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Refuse")), null, 'errors'); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Refuse")), null, 'errors');
@ -604,7 +601,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Clone // Clone
// print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=scrumsprint', '', $permissiontoadd); // print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=scrumsprint', '', $permissiontoadd);
// if ($permissiontoadd) { // if ($permissiontoadd) {
// if ($object->status == $object::STATUS_ENABLED) { // if ($object->status == $object::STATUS_ENABLED) {
// print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=disable&token='.newToken().'">'.$langs->trans("Disable").'</a>'."\n"; // print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=disable&token='.newToken().'">'.$langs->trans("Disable").'</a>'."\n";
@ -617,12 +614,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($permissiontoadd) { if ($permissiontoadd) {
if ($object->status == $object::STATUS_ACCEPTED) { if ($object->status == $object::STATUS_ACCEPTED) {
print dolGetButtonAction($langs->trans('Cancel'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_close&confirm=yes&token='.newToken(), '', $permissiontoadd); print dolGetButtonAction($langs->trans('Cancel'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_close&confirm=yes&token='.newToken(), '', $permissiontoadd);
} else if($object->status == $object::STATUS_CANCELED){ } elseif ($object->status == $object::STATUS_CANCELED) {
// print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().'">'.$langs->trans("Re-Open").'</a>'."\n"; // print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().'">'.$langs->trans("Re-Open").'</a>'."\n";
print dolGetButtonAction($langs->trans('Re-Open'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_reopen&confirm=yes&token='.newToken(), '', $permissiontoadd); print dolGetButtonAction($langs->trans('Re-Open'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_reopen&confirm=yes&token='.newToken(), '', $permissiontoadd);
} }
} }
// Refuse // Refuse
if ($permissiontoadd) { if ($permissiontoadd) {
if ($object->status != $object::STATUS_CANCELED) { if ($object->status != $object::STATUS_CANCELED) {

View File

@ -123,10 +123,9 @@ $extrafields->fetch_name_optionals_label($object->table_element);
$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
if($conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'member') if ($conf->global->PARTNERSHIP_IS_MANAGED_FOR == 'member')
unset($object->fields['fk_soc']); unset($object->fields['fk_soc']);
else else unset($object->fields['fk_member']);
unset($object->fields['fk_member']);
// Default sort order (if not yet defined by previous GETPOST) // Default sort order (if not yet defined by previous GETPOST)
if (!$sortfield) { if (!$sortfield) {