mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 05:01:43 +00:00
place js into extra file
This commit is contained in:
parent
79cb2b3b2c
commit
71b8cd7311
|
@ -29,7 +29,7 @@ if ($user->isGuest()) {
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||||
if($view) {
|
if($view) {
|
||||||
$view->show();
|
$view($_GET);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,19 +31,9 @@ require_once("class.Bootstrap.php");
|
||||||
*/
|
*/
|
||||||
class SeedDMS_View_AddEvent extends SeedDMS_Bootstrap_Style {
|
class SeedDMS_View_AddEvent extends SeedDMS_Bootstrap_Style {
|
||||||
|
|
||||||
function show() { /* {{{ */
|
function js() { /* {{{ */
|
||||||
|
header('Content-Type: application/javascript; charset=UTF-8');
|
||||||
$this->htmlStartPage(getMLText("calendar"));
|
|
||||||
$this->globalNavigation();
|
|
||||||
$this->contentStart();
|
|
||||||
$this->pageNavigation("", "calendar");
|
|
||||||
|
|
||||||
$this->contentHeading(getMLText("add_event"));
|
|
||||||
$this->contentContainerStart();
|
|
||||||
|
|
||||||
$expdate = date('Y-m-d');
|
|
||||||
?>
|
?>
|
||||||
<script language="JavaScript">
|
|
||||||
function checkForm()
|
function checkForm()
|
||||||
{
|
{
|
||||||
msg = new Array();
|
msg = new Array();
|
||||||
|
@ -69,9 +59,30 @@ function checkForm()
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
|
|
||||||
<form action="../op/op.AddEvent.php" name="form1" onsubmit="return checkForm();" method="POST">
|
$(document).ready(function() {
|
||||||
|
$('body').on('submit', '#form1', function(ev){
|
||||||
|
if(checkForm()) return;
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
<?php
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
|
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');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form action="../op/op.AddEvent.php" id="form1" name="form1" method="post">
|
||||||
<table class="table-condensed">
|
<table class="table-condensed">
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php printMLText("from");?>:</td>
|
<td><?php printMLText("from");?>:</td>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user