diff --git a/plugins/admin/systems/class_glpiManufacturer.inc b/plugins/admin/systems/class_glpiManufacturer.inc
index 8463743a2ccae2684c5030105e2068cd9a80f40a..aeedaa4d2ddc07d2098f576214f4c810be8b8359 100644 (file)
$tmp[$attrs]=$this->$attrs;
}
$tmp[$attrs]=$this->$attrs;
}
- if($this->Edit_Add == "add"){
- $this->parent->handle->addEnterprisesType($tmp);
- }else{
- $this->parent->handle->updateEnterprisesType($tmp,$this->ID);
+ $allok = true;
+ if(empty($tmp['name'])){
+ print_red(_("Please specify a name."));
+ $allok = false;
}
}
- $this->editMode=false;
+ if($allok){
+ if($this->Edit_Add == "add"){
+ $this->parent->handle->addEnterprisesType($tmp);
+ $this->editMode=false;
+ }else{
+ $this->parent->handle->updateEnterprisesType($tmp,$this->ID);
+ $this->editMode=false;
+ }
+ }
}
if($this->editMode == true){
}
if($this->editMode == true){