summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 86cfe7a)
raw | patch | inline | side by side (parent: 86cfe7a)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Dec 2007 14:42:02 +0000 (14:42 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Dec 2007 14:42:02 +0000 (14:42 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8019 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_faiTemplateEntry.inc | patch | blob | history | |
plugins/admin/fai/faiTemplateEntry.tpl | patch | blob | history |
diff --git a/plugins/admin/fai/class_faiTemplateEntry.inc b/plugins/admin/fai/class_faiTemplateEntry.inc
index f2278b65e7c5e706973d87481dbe12e5a865a200..b24901c048af2f19857a836c5bab387dec6ca868 100644 (file)
$smarty->assign($attr."ACL",$this->getacl($attr,preg_match("/freeze/",$this->FAIstate)));
}
+ /* We now split cn/FAItemplatePath to make things more clear... */
+ $smarty->assign("cn", basename($this->FAItemplatePath));
+ $smarty->assign("templatePath", dirname($this->FAItemplatePath));
+
$display.= $smarty->fetch(get_template_path('faiTemplateEntry.tpl', TRUE));
return($display);
}
$tmode= $tmode.$dest;
}
$this->FAImode= $tmode;
+
+ /* Assemble cn/FAItemplatePath */
+ $this->cn= preg_replace('/\/+/', '/', $this->FAItemplatePath.'/'.$this->cn);
+ $this->FAItemplatePath= $this->cn;
}
}
}
$message[]=_("Please specify a value for attribute 'file'.");
}
- if(empty($this->FAItemplatePath)){
- $message[]=_("Please specify a value for attribute 'path'.");
+ if(!preg_match('/^\//', $this->FAItemplatePath)){
+ $message[]=_("Please specify a valid value for attribute 'Destination path'.");
}
if(empty($this->cn)){
- $message[] = _("Please enter a name.");
+ $message[] = _("Please enter a file name.");
+ }
+
+ if(preg_match('/\//', $this->cn)){
+ $message[] = _("The file name should not contain / characters.");
}
if(empty($this->user)){
index 86079b1c2c0fb42cc5f7b7fd039d31dca9f83a1d..b8ee41a61a4d3b3a2da31c8061d8a7ea6c546ce6 100644 (file)
<table width="100%" summary="">
<tr>
<td width="50%">
- {t}Name{/t}{$must}
+ <table>
+ <tr>
+ <td>
+ {t}File name{/t}{$must}
+ </td>
+ <td>
{render acl=$cnACL}
<input value="{$cn}" name="cn" size="45" maxlength="80">
{/render}
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <LABEL for="templatePath">
+ {t}Destination path{/t}{$must}
+ </LABEL>
+ </td>
+ <td>
+{render acl=$FAItemplatePathACL}
+ <input type="text" name="FAItemplatePath" value="{$templatePath}" id="templatePath" size="45">
+{/render}
+ </td>
+ </tr>
+ </table>
</td>
<td>
{t}Description{/t}
</td>
</tr><tr>
<td>
- <LABEL for="FAItemplatePath">
- {t}Destination path{/t}{$must}
- </LABEL>
+ {t}Full path{/t}
</td>
<td>
{render acl=$FAItemplatePathACL}
- <input type="text" name="FAItemplatePath" value="{$FAItemplatePath}" id="FAItemplatePath" size="45">
+ <i>{$FAItemplatePath}</i>
{/render}
</td>
</tr>