From: hickert Date: Wed, 25 Jan 2006 07:39:08 +0000 (+0000) Subject: Updated manufacturer handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=435383a162d478dea687b2d4322f6f52cbfc543b;p=gosa.git Updated manufacturer handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2564 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_glpiManufacturer.inc b/plugins/admin/systems/class_glpiManufacturer.inc index e7a9b65cb..b021060e4 100644 --- a/plugins/admin/systems/class_glpiManufacturer.inc +++ b/plugins/admin/systems/class_glpiManufacturer.inc @@ -105,6 +105,21 @@ class glpiManufacturer extends plugin $allok = false; } + $attr = $this->parent->handle->getEnterprises(); + + if($this->ID == -1 ){ + if(in_array($tmp['name'],$attr)){ + $allok = false; + print_red(_("Specified name is already in use, please choose another one.")); + } + }else{ + unset($attr[$this->ID]); + if(in_array($tmp['name'],$attr)){ + $allok = false; + print_red(_("Specified name is already in use, please choose another one.")); + } + } + /* all checks are ok , so save changes */ if($allok){ if($this->Edit_Add == "add"){ diff --git a/plugins/admin/systems/glpiManufacturer.tpl b/plugins/admin/systems/glpiManufacturer.tpl index df6469c9c..e422ec2e2 100644 --- a/plugins/admin/systems/glpiManufacturer.tpl +++ b/plugins/admin/systems/glpiManufacturer.tpl @@ -1,5 +1,5 @@
- {html_options values=$ManuKeys output=$Manus}
diff --git a/plugins/admin/systems/glpiManufacturerAdd.tpl b/plugins/admin/systems/glpiManufacturerAdd.tpl index f31c6d639..204578114 100644 --- a/plugins/admin/systems/glpiManufacturerAdd.tpl +++ b/plugins/admin/systems/glpiManufacturerAdd.tpl @@ -9,13 +9,6 @@ - {t}Website{/t}