mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
Should finish the basic holiday management.
This commit is contained in:
parent
a1491eda4a
commit
d33f029162
@ -37,6 +37,19 @@
|
||||
{
|
||||
$holiday['mday'] = 0;
|
||||
}
|
||||
if(!isset($locale) || $locale=='')
|
||||
{
|
||||
$locale = $holiday['locale'];
|
||||
}
|
||||
elseif(!isset($holiday['locale']) || $holiday['locale']=='')
|
||||
{
|
||||
$holiday['locale'] = $locale;
|
||||
}
|
||||
if(!isset($holiday['hol_id']))
|
||||
{
|
||||
$holiday['hol_id'] = $id;
|
||||
}
|
||||
|
||||
// Still need to put some validation in here.....
|
||||
|
||||
$ok = True;
|
||||
@ -63,7 +76,10 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$holiday['locale'] = $locale;
|
||||
if(isset($locale) && $locale)
|
||||
{
|
||||
$holiday['locale'] = $locale;
|
||||
}
|
||||
$holiday['name'] = '';
|
||||
$holiday['day'] = 0;
|
||||
$holiday['month'] = 0;
|
||||
@ -99,9 +115,7 @@
|
||||
}
|
||||
|
||||
$actionurl = $phpgw->link('/calendar/editholiday.php');
|
||||
$hidden_vars = '<input type="hidden" name="holiday[locale]" value="'.$locale.'">'."\n"
|
||||
. '<input type="hidden" name="holiday[hol_id]" value="'.$id.'">'."\n"
|
||||
. '<input type="hidden" name="locale" value="'.$locale.'">'."\n"
|
||||
$hidden_vars = '<input type="hidden" name="locale" value="'.$locale.'">'."\n"
|
||||
. '<input type="hidden" name="id" value="'.$id.'">'."\n";
|
||||
|
||||
$var = Array(
|
||||
@ -113,6 +127,12 @@
|
||||
|
||||
$t->set_var($var);
|
||||
|
||||
// Locale
|
||||
if(!isset($locale))
|
||||
{
|
||||
display_item($t,lang('Country'),'<input name="holiday[locale]" size="2" maxlength="2" value="">');
|
||||
}
|
||||
|
||||
// Title/Name
|
||||
display_item($t,lang('title'),'<input name="holiday[name]" size="25" maxlength="50" value="'.$holiday['name'].'">');
|
||||
|
||||
@ -175,8 +195,19 @@
|
||||
|
||||
$t->set_var('lang_add',lang('Save'));
|
||||
$t->set_var('lang_reset',lang('Reset'));
|
||||
|
||||
|
||||
if(isset($locale) && $locale)
|
||||
{
|
||||
$action_url_button = $phpgw->link('/calendar/editlocale.php','locale='.$locale);
|
||||
}
|
||||
else
|
||||
{
|
||||
$action_url_button = $phpgw->link('/calendar/holiday_admin.php');
|
||||
}
|
||||
|
||||
$var = Array(
|
||||
'action_url_button' => $phpgw->link('/calendar/editlocale.php','locale='.$locale),
|
||||
'action_url_button' => $action_url_button,
|
||||
'action_text_button' => lang('Cancel'),
|
||||
'action_confirm_button' => '',
|
||||
'action_extra_field' => ''
|
||||
|
Loading…
Reference in New Issue
Block a user