mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 12:11:19 +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']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
if($view) {
|
||||
$view->show();
|
||||
$view($_GET);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
@ -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');
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
function checkForm()
|
||||
{
|
||||
msg = new Array();
|
||||
|
@ -69,9 +59,30 @@ function checkForm()
|
|||
else
|
||||
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">
|
||||
<tr>
|
||||
<td><?php printMLText("from");?>:</td>
|
||||
|
|
Loading…
Reference in New Issue
Block a user