-As requested the datatables and bootstrap files have been moved into the tools folder
-Fixed spells and creatures datatable.
-Double space in name fix.
This commit is contained in:
Lee
2020-05-07 01:36:56 +01:00
parent 1799ef42a7
commit d281fc588b
9 changed files with 252 additions and 17 deletions

View File

@@ -84,6 +84,12 @@ class Validator
self::$lastError = 'Account name is too long (max. 32 chars).';
return false;
}
if(preg_match('/ {2,}/', $name))
{
self::$lastError = 'Invalid account name format. Use only A-Z and numbers 0-9 and no double spaces.';
return false;
}
if(!preg_match("/[A-Z0-9]/i", $name))
{
@@ -194,6 +200,12 @@ class Validator
self::$lastError = "Invalid name format. Use only A-Z, spaces and '.";
return false;
}
if(preg_match('/ {2,}/', $name))
{
self::$lastError = 'Invalid character name format. Use only A-Z and numbers 0-9 and no double spaces.';
return false;
}
if(!preg_match("/[A-z ']/", $name))
{
self::$lastError = "Invalid name format. Use only A-Z, spaces and '.";

View File

@@ -14,7 +14,7 @@ $title = "Creatures";
?>
<script type="text/javascript" src="tools/js/tipped.js"></script>
<link rel="stylesheet" type="text/css" href="tools/css/tipped.css"/>
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/datatables.min.css">
<script>
$(document).ready(function () {
@@ -170,4 +170,4 @@ if (empty($_REQUEST['creature'])) {
</script>
<script src="<?php echo BASE_URL; ?>tools/js/jquery.dataTables.min.js"></script>
<script src="<?php echo BASE_URL; ?>tools/js/datatables.min.js"></script>

View File

@@ -71,7 +71,7 @@ else {
}
?>
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="<?php echo BASE_URL; ?>tools/css/datatables.min.css">
<?php
$twig->display('spells.html.twig', array(
'canEdit' => $canEdit,
@@ -84,12 +84,10 @@ $twig->display('spells.html.twig', array(
<script>
$(document).ready( function () {
$("#tb_instantSpells").DataTable();
$("#tb_conjureSpells").DataTable();
$("#tb_runeSpells").DataTable();
} );
</script>
<script src="<?php echo BASE_URL; ?>tools/js/jquery.dataTables.min.js"></script>
<script src="<?php echo BASE_URL; ?>tools/js/datatables.min.js"></script>