diff --git a/out/out.AddEvent.php b/out/out.AddEvent.php index 344bb7dde..8776bae24 100644 --- a/out/out.AddEvent.php +++ b/out/out.AddEvent.php @@ -29,7 +29,7 @@ if ($user->isGuest()) { $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user)); if($view) { - $view->show(); + $view($_GET); exit; } diff --git a/views/bootstrap/class.AddEvent.php b/views/bootstrap/class.AddEvent.php index 542e8572a..ab41e44d4 100644 --- a/views/bootstrap/class.AddEvent.php +++ b/views/bootstrap/class.AddEvent.php @@ -31,19 +31,9 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_AddEvent extends SeedDMS_Bootstrap_Style { - function show() { /* {{{ */ - - $this->htmlStartPage(getMLText("calendar")); - $this->globalNavigation(); - $this->contentStart(); - $this->pageNavigation("", "calendar"); - - $this->contentHeading(getMLText("add_event")); - $this->contentContainerStart(); - - $expdate = date('Y-m-d'); + function js() { /* {{{ */ + header('Content-Type: application/javascript; charset=UTF-8'); ?> - -
+$(document).ready(function() { + $('body').on('submit', '#form1', function(ev){ + if(checkForm()) return; + event.preventDefault(); + }); +}); +htmlStartPage(getMLText("calendar")); + $this->globalNavigation(); + $this->contentStart(); + $this->pageNavigation("", "calendar"); + + $this->contentHeading(getMLText("add_event")); + $this->contentContainerStart(); + + $expdate = date('Y-m-d'); +?> + +
: