summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f57ca1f)
raw | patch | inline | side by side (parent: f57ca1f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 21 Jul 2008 08:48:13 +0000 (08:48 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 21 Jul 2008 08:48:13 +0000 (08:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11722 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/devices/class_deviceGeneric.inc | patch | blob | history | |
gosa-plugins/goto/admin/devices/deviceGeneric.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc
index 07a497e1baae5f846f377955cee4ef7276a6ed59..d66c4906c4483cb26bd2a5818db6337285ae8fd1 100644 (file)
public $types;
public $type;
- public $posts = array("description","dev_id","serial","vendor", "type");
- public $attributes = array("cn");
+ public $attributes = array("cn","description","dev_id","serial","vendor", "type");
public $objectclasses = array("top","gotoDevice");
public $CopyPasteVars = array("orig_cn","description","vendor","dev_id","serial","base");
foreach($this->attributes as $attr){
$smarty->assign($attr,$this->$attr);
}
- foreach($this->posts as $attr){
- $smarty->assign($attr,$this->$attr);
+
+ $tmp = $this->plInfo();
+ foreach($tmp['plProvidedAcls'] as $attr => $desc){
+ $smarty->assign($attr."ACL", $this->getacl($attr));
}
$smarty->assign("type",$this->type);
$smarty->assign ("types", $this->types);
-
return($smarty->fetch(get_template_path("deviceGeneric.tpl",TRUE,dirname(__FILE__))));
}
$this->base = get_post("base");
}
}
-
- foreach($this->posts as $post){
- if(isset($_POST[$post])){
- $this->$post = get_post($post);
- }
- }
}
}
{
plugin::save();
+ $this->attrs = array();
+ $this->attrs['cn'] = $this->cn;
$this->attrs['gotoHotplugDevice'] = "";
- foreach($this->posts as $post){
+ foreach(array("description","dev_id","serial","vendor", "type") as $post){
$this->attrs['gotoHotplugDevice'] .= $this->$post."|";
}
$this->attrs['gotoHotplugDevice'] = preg_replace("/\|$/","",$this->attrs['gotoHotplugDevice']);
{
return (array(
"plShortName" => _("Generic"),
- "plDescription" => _("Device generic"),
+ "plDescription" => _("Device generic")." ("._("Hotplug").")",
"plSelfModify" => FALSE,
"plDepends" => array(),
"plPriority" => 0,
"plCategory" => array("devices" => array("description" => _("Devices"),
"objectClass" => "gotoHotplugDevice")),
"plProvidedAcls"=> array(
- "cn" => _("Name"))
+ "cn" => _("Name"),
+ "base" => _("Base"),
+ "description" => _("Description"),
+ "type" => _("Tpye"),
+ "serial" => _("Serial"),
+ "vendor" => _("Vendor"),
+ "dev_id" => _("Devive ID"))
));
}
diff --git a/gosa-plugins/goto/admin/devices/deviceGeneric.tpl b/gosa-plugins/goto/admin/devices/deviceGeneric.tpl
index 863851e4492c82d17ec281c3ee7472961cb786b8..25aac08c64ea88b6936970d15cd04a5674634eb2 100644 (file)
<td><LABEL for="base">{t}Base{/t}</LABEL>
</td>
<td>
+{render acl=$baseACL}
<select name="base">
{html_options options=$bases selected=$base}
</select>
+{/render}
</td>
</tr>
<tr>
<td><LABEL for="cn">{t}Device name{/t}</LABEL>{$must}
</td>
<td>
+{render acl=$cnACL}
<input type="text" size=40 value="{$cn}" name="cn" id="cn">
+{/render}
</td>
</tr>
<tr>
<td><LABEL for="description">{t}Description{/t}</LABEL>
</td>
<td>
+{render acl=$descriptionACL}
<input type="text" size=40 value="{$description}" name="description" id="description">
+{/render}
</td>
</tr>
<tr>
<td><LABEL for="description">{t}Device type{/t}</LABEL>
</td>
<td>
- <select id="type" size="1" name="type" title="{t}Choose the device type{/t}">
- {html_options options=$types selected=$type}
- </select>
+{render acl=$typeACL}
+ <select id="type" size="1" name="type" title="{t}Choose the device type{/t}">
+ {html_options options=$types selected=$type}
+ </select>
+{/render}
</td>
</tr>
</table>
<td><LABEL for="dev_id">{t}Serial number{/t} {t}(iSerial){/t}</LABEL>{$must}
</td>
<td>
+{render acl=$dev_idACL}
<input type="text" value="{$dev_id}" name="dev_id" id="dev_id">
+{/render}
</td>
<td colspan="2"> </td>
</tr>
<td><LABEL for="vendor">{t}Vendor-ID{/t} {t}(idVendor){/t}</LABEL>{$must}
</td>
<td>
+{render acl=$vendorACL}
<input type="text" value="{$vendor}" name="vendor" id="vendor">
+{/render}
</td>
</tr>
<tr>
<td><LABEL for="produkt">{t}Product-ID{/t} {t}(idProduct){/t}</LABEL>{$must}
</td>
<td>
+{render acl=$serialACL}
<input type="text" value="{$serial}" name="serial" id="serial">
+{/render}
</td>
</tr>
</table>