diff --git a/calendar/edit_entry_handler.php b/calendar/edit_entry_handler.php
index 01cf844085..6b69580bcd 100755
--- a/calendar/edit_entry_handler.php
+++ b/calendar/edit_entry_handler.php
@@ -28,7 +28,7 @@
} else {
$cal_info = $phpgw->common->appsession();
}
- if(count($overlapping_events)) {
+ if($overlapping_events) {
$phpgw->common->phpgw_header();
$phpgw->common->navbar();
$phpgw->template->set_file(array("overlap" => "overlap.tpl",
@@ -69,7 +69,7 @@
$phpgw->template->parse("resubmit_button","form_button");
$phpgw->template->set_var("action_url_button",$phpgw->link("edit_entry.php","readsess=".$cal_info->id));
- $phpgw->template->set_var("action_text_button",lang("Re-Edit New Event"));
+ $phpgw->template->set_var("action_text_button",lang("Re-Edit Event"));
$phpgw->template->set_var("action_confirm_button","");
$phpgw->template->parse("reedit_button","form_button");
diff --git a/calendar/templates/default/edit.tpl b/calendar/templates/default/edit.tpl
index 6b617c0ad1..cca98978f1 100755
--- a/calendar/templates/default/edit.tpl
+++ b/calendar/templates/default/edit.tpl
@@ -5,17 +5,27 @@
function validate_and_submit() {
if (document.addform.name.value == "") {
alert("{name_error}");
+ document.addform.name.select();
+ document.addform.name.focus();
return false;
}
h = parseInt(document.addform.hour.value);
m = parseInt(document.addform.minute.value);
- if (h > 23 || m > 59) {
- alert ("{time_error}");
- return false;
+ if (h > 23) {
+ alert ("{time_error}");
+ document.addform.hour.select();
+ document.addform.hour.focus();
+ return false;
+ }
+ if (m > 59) {
+ alert ("{time_error}");
+ document.addform.minute.select();
+ document.addform.minute.focus();
+ return false;
}
// would be nice to also check date to not allow Feb 31, etc...
document.addform.submit();
- return true;
+// return true;
}
@@ -33,7 +43,7 @@ function validate_and_submit() {
-
+
{delete_button}