diff --git a/adminstuds.php b/adminstuds.php
index a26bbd2..e613d51 100644
--- a/adminstuds.php
+++ b/adminstuds.php
@@ -373,5 +373,7 @@ $smarty->assign('comments', $comments);
$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/js/app/studs.js b/js/app/studs.js
new file mode 100644
index 0000000..7a32203
--- /dev/null
+++ b/js/app/studs.js
@@ -0,0 +1,21 @@
+$(document).ready(function() {
+
+ $("#poll_form").submit(function( event ) {
+ var name = $("#name").val();
+ var regexContent = $("#parameter_name_regex").text().split("/");
+ var regex = new RegExp(regexContent[1], regexContent[2]);
+ if (name.length == 0 || !regex.test(name)) {
+ event.preventDefault();
+ var errorMessage = $("#parameter_name_error").text();
+ var addedDiv = "
";
+ addedDiv += errorMessage;
+ addedDiv += "×
";
+ $("#message-container").empty();
+ $("#message-container").append(addedDiv);
+ $('html, body').animate({
+ scrollTop: $("#message-container").offset().top
+ }, 750);
+ }
+ });
+
+});
\ No newline at end of file
diff --git a/studs.php b/studs.php
index 281fdc9..1bfbb52 100644
--- a/studs.php
+++ b/studs.php
@@ -202,5 +202,7 @@ $smarty->assign('comments', $comments);
$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/head.tpl b/tpl/head.tpl
index 3b8bbac..401a271 100644
--- a/tpl/head.tpl
+++ b/tpl/head.tpl
@@ -24,6 +24,8 @@
{/if}
+ {block name="header"}{/block}
+
\ No newline at end of file
diff --git a/tpl/part/vote_table_classic.tpl b/tpl/part/vote_table_classic.tpl
index e36559d..ab0a652 100644
--- a/tpl/part/vote_table_classic.tpl
+++ b/tpl/part/vote_table_classic.tpl
@@ -5,7 +5,7 @@
{__('Poll results\\Votes of the poll')}