Form Widget validation

- reorganized jquery validation lib to include languages
- added Widget initializer class
- fixed cache method in initializer
- added widget front JS to validate and submit (ajax / post)
This commit is contained in:
Jonathan Labreuille
2015-08-13 12:26:11 +02:00
parent bbe4d1d853
commit 6b46ef7fea
10 changed files with 189 additions and 11 deletions

View File

@@ -12,7 +12,7 @@ class Renderer {
$file_system = new TwigFileSystem(Env::$views_path);
$this->renderer = new TwigEnv(
$file_system,
array('cache' => $this->detectCache())
array('cache' => $this->getCachePath())
);
}
@@ -49,9 +49,8 @@ class Renderer {
$this->renderer->setLexer($lexer);
}
function detectCache() {
$cache_path = Env::$views_path . '/cache';
if (WP_DEBUG === false) return $cache_path;
return false;
function getCachePath() {
if(WP_DEBUG === true) { return false; }
return Env::$views_path . '/cache';
}
}