mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 15:18:58 +01:00
fixes for submitting entry without name/description
This commit is contained in:
parent
e3fd461b37
commit
c1dc471bf0
@ -28,7 +28,7 @@
|
|||||||
} else {
|
} else {
|
||||||
$cal_info = $phpgw->common->appsession();
|
$cal_info = $phpgw->common->appsession();
|
||||||
}
|
}
|
||||||
if(count($overlapping_events)) {
|
if($overlapping_events) {
|
||||||
$phpgw->common->phpgw_header();
|
$phpgw->common->phpgw_header();
|
||||||
$phpgw->common->navbar();
|
$phpgw->common->navbar();
|
||||||
$phpgw->template->set_file(array("overlap" => "overlap.tpl",
|
$phpgw->template->set_file(array("overlap" => "overlap.tpl",
|
||||||
@ -69,7 +69,7 @@
|
|||||||
$phpgw->template->parse("resubmit_button","form_button");
|
$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_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->set_var("action_confirm_button","");
|
||||||
$phpgw->template->parse("reedit_button","form_button");
|
$phpgw->template->parse("reedit_button","form_button");
|
||||||
|
|
||||||
|
@ -5,17 +5,27 @@
|
|||||||
function validate_and_submit() {
|
function validate_and_submit() {
|
||||||
if (document.addform.name.value == "") {
|
if (document.addform.name.value == "") {
|
||||||
alert("{name_error}");
|
alert("{name_error}");
|
||||||
|
document.addform.name.select();
|
||||||
|
document.addform.name.focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
h = parseInt(document.addform.hour.value);
|
h = parseInt(document.addform.hour.value);
|
||||||
m = parseInt(document.addform.minute.value);
|
m = parseInt(document.addform.minute.value);
|
||||||
if (h > 23 || m > 59) {
|
if (h > 23) {
|
||||||
alert ("{time_error}");
|
alert ("{time_error}");
|
||||||
return false;
|
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...
|
// would be nice to also check date to not allow Feb 31, etc...
|
||||||
document.addform.submit();
|
document.addform.submit();
|
||||||
return true;
|
// return true;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
@ -33,7 +43,7 @@ function validate_and_submit() {
|
|||||||
<!-- BEGIN edit_entry_end -->
|
<!-- BEGIN edit_entry_end -->
|
||||||
</table>
|
</table>
|
||||||
<!-- <input type="hidden" name="participant_list" value=""> -->
|
<!-- <input type="hidden" name="participant_list" value=""> -->
|
||||||
<input type="submit" value="{submit_button}" onClick="validate_and_submit()">
|
<input type="button" value="{submit_button}" onClick="validate_and_submit()">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{delete_button}
|
{delete_button}
|
||||||
|
Loading…
Reference in New Issue
Block a user