summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c090b85)
raw | patch | inline | side by side (parent: c090b85)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 11 Apr 2007 08:00:28 +0000 (08:00 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 11 Apr 2007 08:00:28 +0000 (08:00 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6002 594d385d-05f5-0310-b6e9-bd551577e9d8
include/sieve/class_sieveManagement.inc | patch | blob | history | |
include/sieve/templates/create_script.tpl | patch | blob | history |
index 4124232881614e89532f223d2d636222d00cfb62..bc8936b37e213b6fcf39e5f22e767be0ec88f527 100644 (file)
}
/* Check given name */
- $err = "";
+ $err = false;
/* Is given name in lower case characters ? */
if(isset($_POST['create_script_save'])){
if(!strlen($name)){
- $err = _("You should specify a name for your new script.");
+ $err =true;
+ print_red(_("You should specify a name for your new script."));
}
/* Is given name in lower case characters ? */
if($name != strtolower($name)){
- $err = _("Only lower case names are allowed here.");
+ $err =true;
+ print_red(_("Only lower case names are allowed here."));
}
/* Only chars are allowed here */
if(preg_match("/[^a-z]/i",$name)){
- $err = _("Only a-z are allowed in script names.");
+ $err =true;
+ print_red(_("Only a-z are allowed in script names."));
}
$tmp = $this->get_used_script_names();
if(in_array_ics($name,$tmp)){
- $err =_("The specified name is already in use.");
+ $err =true;
+ print_red(_("The specified name is already in use."));
}
}
/* Create script if everything is ok */
- if($this->create_script && isset($_POST['create_script_save']) && $err == "" ){
+ if($this->create_script && isset($_POST['create_script_save']) && !$err){
/* Close dialog */
$this->create_script = FALSE;
/* Display dialog to enter new script name */
$smarty = get_smarty();
$smarty->assign("NewScriptName",$name);
- $smarty->assign("Error",$err);
return($smarty->fetch(get_template_path("templates/create_script.tpl",TRUE,dirname(__FILE__))));
}
}
index e5e97c9dc0e66e5bba2bfa8b2d8d7c8be14f9d3d..95ea9e68ea0fef76bf7a158e04259b841a1a3ede 100644 (file)
<br>
<br>
-{if $Error != ""}
- <font color='red'>{$Error}</font>
- <br>
- <br>
-{/if}
<p class="seperator"> </p>
<br>
<b>{t}Script name{/t}</b> <input type='text' name='NewScriptName' value='{$NewScriptName}'>