summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e768cdc)
raw | patch | inline | side by side (parent: e768cdc)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 4 Jan 2006 09:06:20 +0000 (09:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 4 Jan 2006 09:06:20 +0000 (09:06 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2399 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_glpiAccount.inc | patch | blob | history | |
plugins/admin/systems/glpi.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_glpiAccount.inc b/plugins/admin/systems/class_glpiAccount.inc
index bd0e0eb4027428c63dc36a3af350e790702ac8cc..563ad430d98382d3f840483cd4d95ad1a784f702 100644 (file)
var $tech_num ="";
var $comments ="";
+ var $addUser ="";
+
var $date_mod ="";
var $os =0;
var $location =0;
$this->is_account = true;
$tmp = ($this->handle->getComputerInformations($this->dn));
- foreach(array("tech_num","os","FK_glpi_enterprise","type","comments") as $attr){
+ foreach(array("tech_num","os","FK_glpi_enterprise","type","comments","contact_num") as $attr){
$this->$attr = $tmp[0][$attr];
}
$this->usedDevices = $this->handle->getUsedDevices($tmp[0]['ID']);
/* ENDE, os management.
*/
+ if(isset($_POST['SelectContactPerson'])){
+ $this->addUser = "contact";
+ $this->cur_dialog= new glpiSelectUser($this->config,$this->dn);
+ }
+
if(isset($_POST['edit_manufacturer'])){
$this->cur_dialog = new glpiManufacturer($this->config,$this->dn);
$this->dialog = true;
if(isset($_POST['SelectUserCancel'])){
$this->dialog = false;
+ $this->addUser ="";
$this->cur_dialog = false;
}
+
if(isset($_POST['SelectTechPerson'])){
+ $this->addUser ="tech";
$this->cur_dialog= new glpiSelectUser($this->config,$this->dn);
}
$id=$tmp[$id];
/* Use user id, close dialog */
- $this->tech_num = $id;
+ if($this->addUser == "tech"){
+ $this->tech_num = $id;
+ }else{
+ $this->contact_num = $id;
+ }
$this->cur_dialog = false;
$this->dialog= false;
}
$smarty->assign($attr."ACL",chkacl($this->acl,$attr));
}
- foreach(array("type","FK_glpi_enterprise","os","tech_num") as $attr){
+ foreach(array("type","FK_glpi_enterprise","os","tech_num","contact_num") as $attr){
$smarty->assign($attr,"");
$smarty->assign($attr."ACL",chkacl($this->acl,$attr));
}
$smarty->assign("Manufacturers", $this->handle->getEnterprises());
$smarty->assign("FK_glpi_enterprise", $this->FK_glpi_enterprise);
+ if(isset($users[$this->contact_num])){
+ $tr = $ldap->fetch($ldap->cat($users[$this->contact_num]));
+ $str = "";
+ if(isset($tr['givenName'][0])){
+ $str .= $tr['givenName'][0]." ";
+ }
+
+ if(isset($tr['sn'][0])){
+ $str .= $tr['sn'][0]." ";
+ }
+
+ if(isset($tr['uid'][0])){
+ $str .= "[".$tr['uid'][0]."]";
+ }
+
+
+ $smarty->assign("contact_num", $str);
+ }else{
+ $smarty->assign("contact_num", _("N/A"));
+ }
+
if(isset($users[$this->tech_num])){
$tr = $ldap->fetch($ldap->cat($users[$this->tech_num]));
$str = "";
index 2f960e09b75a4cde2c3a94991b80c9795a963681..08e43a690af165f9cf1be5e0c23a104e91212f42 100644 (file)
</td>
<td>
<i>{$contact_num} </i>
- <input {$contact_numACL} type="submit" value="{t}Edit{/t}"><img src="images/mailto.png" class="center" alt="{t}mailto{/t}">
+ <input {$contact_numACL} type="submit" name="SelectContactPerson" value="{t}Edit{/t}"><img src="images/mailto.png" class="center" alt="{t}mailto{/t}">
</td>
</tr>
<tr>