summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d6e24e3)
raw | patch | inline | side by side (parent: d6e24e3)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 11 Jan 2008 16:14:15 +0000 (16:14 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 11 Jan 2008 16:14:15 +0000 (16:14 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8316 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/devices/class_deviceGeneric.inc | patch | blob | history | |
gosa-core/plugins/admin/devices/deviceGeneric.tpl | patch | blob | history |
diff --git a/gosa-core/plugins/admin/devices/class_deviceGeneric.inc b/gosa-core/plugins/admin/devices/class_deviceGeneric.inc
index 1415be066c50b79fd1565b37da23ec1a62bbd17d..bc870eb74c6266989d050222c096758c3bbd11c0 100644 (file)
public $dev_id = "";
public $serial = "";
public $base = "";
+ public $types;
+ public $type;
- public $posts = array("description","dev_id","serial","vendor");
+ public $posts = array("description","dev_id","serial","vendor", "type");
public $attributes = array("cn");
public $objectclasses = array("top","gotoDevice");
$this->is_account = TRUE;
+ $this->types= array("camera" => _("Digital camera"),
+ "harddisk" => _("Harddisk"),
+ "stick" => _("USB stick"),
+ "cd" => _("CD/DVD drive"),);
+ asort($this->types);
+
/* Set class values */
if(isset($this->attrs['gotoHotplugDevice'][0])){
$tmp = preg_split("/\|/",$this->attrs['gotoHotplugDevice'][0]);
$this->dev_id = $tmp[1];
$this->serial = $tmp[2];
$this->vendor = $tmp[3];
+ if (isset($tmp[4])){
+ $this->type= $tmp[4];
+ }
}
$this->orig_cn = $this->cn;
foreach($this->posts as $attr){
$smarty->assign($attr,$this->$attr);
}
+
+ $smarty->assign("type",$this->type);
+ $smarty->assign ("types", $this->types);
+
return($smarty->fetch(get_template_path("deviceGeneric.tpl",TRUE,dirname(__FILE__))));
}
diff --git a/gosa-core/plugins/admin/devices/deviceGeneric.tpl b/gosa-core/plugins/admin/devices/deviceGeneric.tpl
index 59f7b9c18e7c3e0af4421f8b9bb316233317ddc2..863851e4492c82d17ec281c3ee7472961cb786b8 100644 (file)
<input type="text" size=40 value="{$description}" name="description" id="description">
</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>
+ </td>
+ </tr>
</table>
</td>
<td style="vertical-align:top">