--- /tmp/dsg/dolibarr/htdocs/adherents/github_agenda.php +++ /tmp/dsg/dolibarr/htdocs/adherents/client_agenda.php @@ -49,10 +49,13 @@ if (!$sortfield) $sortfield = 'a.datep,a.id'; if (!$sortorder) $sortorder = 'DESC'; -if (GETPOST('actioncode', 'array')) { +if (GETPOST('actioncode', 'array')) +{ $actioncode = GETPOST('actioncode', 'array', 3); if (!count($actioncode)) $actioncode = '0'; -} else { +} +else +{ $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } $search_agenda_label = GETPOST('search_agenda_label'); @@ -62,11 +65,12 @@ $object = new Adherent($db); $result = $object->fetch($id); -if ($result > 0) { +if ($result > 0) +{ $object->fetch_thirdparty(); - $adht = new AdherentType($db); - $result = $adht->fetch($object->typeid); + $adht = new AdherentType($db); + $result = $adht->fetch($object->typeid); } @@ -78,18 +82,21 @@ $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) { - // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) { - header("Location: ".$backtopage); - exit; - } +if (empty($reshook)) +{ + // Cancel + if (GETPOST('cancel', 'alpha') && !empty($backtopage)) + { + header("Location: ".$backtopage); + exit; + } - // Purge search criteria - if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers - $actioncode = ''; - $search_agenda_label = ''; - } + // Purge search criteria + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers + { + $actioncode = ''; + $search_agenda_label = ''; + } } @@ -105,7 +112,8 @@ /* * Customer and/or supplier category sheet */ -if ($object->id > 0) { +if ($object->id > 0) +{ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; @@ -118,7 +126,7 @@ if (!empty($conf->notification->enabled)) $langs->load("mails"); $head = member_prepare_head($object); - print dol_get_fiche_head($head, 'agenda', $langs->trans("Member"), -1, 'user'); + dol_fiche_head($head, 'agenda', $langs->trans("Member"), -1, 'user'); $linkback = ''.$langs->trans("BackToList").''; @@ -133,34 +141,36 @@ print ''; - print dol_get_fiche_end(); + dol_fiche_end(); - //print '
'.$langs->trans("Label").' | |
'.$langs->trans("Status").' | '; - print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), 1); + print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), 1); print ' |
'.$langs->trans("MembersNature").' | '; + print ' |
'.$langs->trans("MemberNature").' | '; print $form->selectarray("morphy", $morphys, GETPOSTISSET("morphy") ? GETPOST("morphy", 'aZ09') : 'morphy'); print " |
'.$langs->trans("Description").' | '; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('comment', $object->note, '', 200, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%'); + $doleditor = new DolEditor('comment', $object->note, '', 280, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%'); $doleditor->Create(); print ' |
'.$langs->trans("WelcomeEMail").' | '; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 250, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%'); + $doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 280, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%'); $doleditor->Create(); print ' |
'.$langs->trans("MembersNature").' | '.$object->getmorphylib($object->morphy).' | '; + print '|
'.$langs->trans("MemberNature").' | '.$object->getmorphylib($object->morphy).' | '; print '|
'.$langs->trans("SubscriptionRequired").' | '; @@ -414,9 +440,12 @@ print ' | |
'.$langs->trans("Duration").' | '.$object->duration_value.' '; - if ($object->duration_value > 1) { + if ($object->duration_value > 1) + { $dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years")); - } elseif ($object->duration_value > 0) { + } + elseif ($object->duration_value > 0) + { $dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year")); } print (!empty($object->duration_unit) && isset($dur[$object->duration_unit]) ? $langs->trans($dur[$object->duration_unit]) : '')." "; @@ -434,7 +463,7 @@ print ' |
'.$langs->trans("Ref").' | '.$object->id.' | ||
'.$langs->trans("Label").' | |||
'.$langs->trans("Label").' | |||
'.$langs->trans("Status").' | '; - print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $object->status); - print ' | ||
'.$langs->trans("MembersNature").' | '; - print $form->selectarray("morphy", $morphys, GETPOSTISSET("morphy") ? GETPOST("morphy", 'aZ09') : $object->morphy); - print " | ||
'.$langs->trans("SubscriptionRequired").' | '; + print $form->selectarray('statut', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $object->statut); + print ' | ||
'.$langs->trans("MemberNature").' | '; + print $form->selectarray("morphy", $morphys, GETPOSTISSET("morphy") ? GETPOST("morphy") : $object->morphy); + print " | ||
'.$langs->trans("SubscriptionRequired").' | '; print $form->selectyesno("subscription", $object->subscription, 1); print ' | ||
'.$langs->trans("Duration").' | '; print ' '; - print $formproduct->selectMeasuringUnits("duration_unit", "time", ($object->duration_unit === '' ? 'y' : $object->duration_unit), 0, 1); + print $formproduct->selectMeasuringUnits("duration_unit", "time", $object->duration_unit, 0, 1); print ' | ||
'.$langs->trans("Description").' | '; @@ -762,12 +821,12 @@ print ' |
'.$langs->trans('Label').' | |||||||||
'.$langs->trans('Label').' | |||||||||
'.$langs->trans('Description').' | ';
$doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%');
$doleditor->Create();
@@ -221,17 +246,21 @@
print ' '; print ' ';
- print '';
+ print '';
print ' ';
- print '';
+ print '';
print ' ';
print '';
-} elseif ($action != 'add') {
- if (!empty($object->multilangs)) {
- foreach ($object->multilangs as $key => $value) {
+}
+elseif ($action != 'add')
+{
+ if (!empty($object->multilangs))
+ {
+ foreach ($object->multilangs as $key => $value)
+ {
$s = picto_from_langcode($key);
- print ($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".'id.'&action=delete&token='.newToken().'&langtodelete='.$key.'">'.img_delete('', 'class="valigntextbottom"').'';
+ print ($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".'id.'&action=delete&langtodelete='.$key.'">'.img_delete('', 'class="valigntextbottom"').'';
print '';
print '';
@@ -251,7 +280,8 @@
* Form to add a new translation
*/
-if ($action == 'add' && $user->rights->adherent->configurer) {
+if ($action == 'add' && $user->rights->adherent->configurer)
+{
//WYSIWYG Editor
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@@ -261,13 +291,13 @@
print '';
print '';
- print dol_get_fiche_head();
+ dol_fiche_head();
print '
';
- print '';
+ print '';
print ' ';
- print '';
+ print '';
print ' ';
print '';
|