diff --git a/calendar/editholiday.php b/calendar/editholiday.php
index d98c57626a..fd671e7e06 100755
--- a/calendar/editholiday.php
+++ b/calendar/editholiday.php
@@ -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 = ''."\n"
- . ''."\n"
- . ''."\n"
+ $hidden_vars = ''."\n"
. ''."\n";
$var = Array(
@@ -113,6 +127,12 @@
$t->set_var($var);
+// Locale
+ if(!isset($locale))
+ {
+ display_item($t,lang('Country'),'');
+ }
+
// Title/Name
display_item($t,lang('title'),'');
@@ -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' => ''