From 25840c2b3dca1a846f7c72c0b64d9064046defb0 Mon Sep 17 00:00:00 2001 From: atm-lena Date: Tue, 25 Aug 2020 12:40:29 +0200 Subject: [PATCH] Create Event - Add fields --- htdocs/comm/action/card.php | 27 ++++++++++++++++++++++++++- htdocs/core/class/html.form.class.php | 21 +++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index eb723013f81..7090438c7ce 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -64,6 +64,10 @@ $apmin = GETPOST('apmin'); $p2hour = GETPOST('p2hour'); $p2min = GETPOST('p2min'); +$offsetvalue = GETPOST('offsetvalue'); +$offsetunit = GETPOST('offsetunittype_duration'); +$typeremind = GETPOST('typeremind'); + $datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, GETPOST("apmonth"), GETPOST("apday"), GETPOST("apyear")); $datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', GETPOST("p2month"), GETPOST("p2day"), GETPOST("p2year")); @@ -1106,7 +1110,28 @@ if ($action == 'create') print ''; - dol_fiche_end(); + print '


'; + + print ''; + + //Reminder + print ''; + + //Reminder Type + print ''; + + //Notification + print ''; + + print '
'.$langs->trans("Reminder").''; + print ''; + print '
'.$langs->trans("ReminderType").''; + print $form->select_type_duration('offsetunit'); + print '
'.$langs->trans("TypeRemind").''; + print $form->selectarray('typeremind', array('mail'=>$langs->trans('EMail'), 'push'=>$langs->trans('OSNotif'))); + print '
'; + + dol_fiche_end(); print '
'; print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 5567813db79..d102b0133f4 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5673,6 +5673,27 @@ class Form return $retstring; } + public function select_type_duration($prefix){ + + global $langs; + + $retstring = ''; + + $TDurationTypes = array('year'=>$langs->trans('Years'), 'month'=>$langs->trans('Month'), 'week'=>$langs->trans('Weeks'), 'day'=>$langs->trans('Days'), 'minute'=>$langs->trans('Minutes')); + + $retstring .= '"; + + print $retstring; + return; + } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Function to show a form to select a duration on a page