From 310e91ad017dd23323e1207dee228c6965a6599e Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 28 Nov 2017 13:10:21 +0100 Subject: [PATCH] Fix: move default fields before extrafields for best visibility --- htdocs/adherents/card.php | 112 +++++++++++++++++++------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 05c1358ddeeeb..73f207abe91f3 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1211,15 +1211,6 @@ function initfieldrequired() print ""; } - // Other attributes - $parameters=array(); - $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (empty($reshook) && ! empty($extrafields->attribute_label)) - { - print $object->showOptionals($extrafields,'edit',$parameters); - } - // Third party Dolibarr if (! empty($conf->societe->enabled)) { @@ -1246,6 +1237,15 @@ function initfieldrequired() else print $langs->trans("NoDolibarrAccess"); print ''; + // Other attributes + $parameters=array(); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + print $object->showOptionals($extrafields,'edit',$parameters); + } + print ''; dol_fiche_end(); @@ -1487,55 +1487,29 @@ function initfieldrequired() print ''; } - print ''; - - print ''; - print '
'; - - print '
'; - print ''; - - // Birthday - print ''; - - // Public - print ''; - - // Categories - if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) + // Date end subscription + print ''; - print ''; + print dol_print_date($object->datefin,'day'); + if ($object->hasDelay()) { + print " ".img_warning($langs->trans("Late")); + } } - - // Other attributes - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; - - // Date end subscription - print ''; + else + { + if (! $adht->subscription) + { + print $langs->trans("SubscriptionNotRecorded"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated + } + else + { + print $langs->trans("SubscriptionNotReceived"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated + } + } + print ''; // Third party Dolibarr if (! empty($conf->societe->enabled)) @@ -1607,6 +1581,32 @@ function initfieldrequired() } print ''; + print '
'.$langs->trans("Birthday").''.dol_print_date($object->birth,'day').'
'.$langs->trans("Public").''.yn($object->public).'
'.$langs->trans("SubscriptionEndDate").''; + if ($object->datefin) { - print '
' . $langs->trans("Categories") . ''; - print $form->showCategories($object->id, 'member', 1); - print '
'.$langs->trans("SubscriptionEndDate").''; - if ($object->datefin) - { - print dol_print_date($object->datefin,'day'); - if ($object->hasDelay()) { - print " ".img_warning($langs->trans("Late")); - } - } - else - { - if (! $adht->subscription) - { - print $langs->trans("SubscriptionNotRecorded"); - if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated - } - else - { - print $langs->trans("SubscriptionNotReceived"); - if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated - } - } - print '
'; + + print '
'; + print '
'; + + print '
'; + print ''; + + // Birthday + print ''; + + // Public + print ''; + + // Categories + if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) + { + print ''; + print ''; + } + + // Other attributes + include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; + print "
'.$langs->trans("Birthday").''.dol_print_date($object->birth,'day').'
'.$langs->trans("Public").''.yn($object->public).'
' . $langs->trans("Categories") . ''; + print $form->showCategories($object->id, 'member', 1); + print '
\n"; print "
\n";