From e4ec0c81057fa083a526489eb621b3e8d186e5a4 Mon Sep 17 00:00:00 2001
From: Antonin <zepcome@gmail.com>
Date: Thu, 26 Mar 2015 16:48:39 +0100
Subject: [PATCH] Passing message directly in template

---
 adminstuds.php | 1 -
 studs.php      | 1 -
 tpl/studs.tpl  | 2 +-
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/adminstuds.php b/adminstuds.php
index e613d517..0ce29610 100644
--- a/adminstuds.php
+++ b/adminstuds.php
@@ -374,6 +374,5 @@ $smarty->assign('editingVoteId', $editingVoteId);
 $smarty->assign('message', $message);
 $smarty->assign('admin', true);
 $smarty->assign('parameter_name_regex', NAME_REGEX);
-$smarty->assign('parameter_name_error', _('Name is incorrect.'));
 
 $smarty->display('studs.tpl');
\ No newline at end of file
diff --git a/studs.php b/studs.php
index 1bfbb525..461d86d9 100644
--- a/studs.php
+++ b/studs.php
@@ -203,6 +203,5 @@ $smarty->assign('editingVoteId', $editingVoteId);
 $smarty->assign('message', $message);
 $smarty->assign('admin', false);
 $smarty->assign('parameter_name_regex', NAME_REGEX);
-$smarty->assign('parameter_name_error', _('Name is incorrect.'));
 
 $smarty->display('studs.tpl');
diff --git a/tpl/studs.tpl b/tpl/studs.tpl
index 44a7ce84..b83f36ad 100644
--- a/tpl/studs.tpl
+++ b/tpl/studs.tpl
@@ -45,7 +45,7 @@
 
 <div class="hidden">
     <p id="parameter_name_regex">{$parameter_name_regex}</p>
-    <p id="parameter_name_error">{$parameter_name_error}</p>
+    <p id="parameter_name_error">{__('Error','Name is incorrect.')|var_dump}</p>
 </div>
 
 
-- 
GitLab