mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
Fixes
-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:
@@ -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 '.";
|
||||
|
@@ -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>
|
@@ -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>
|
Reference in New Issue
Block a user