summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5078fe4)
raw | patch | inline | side by side (parent: 5078fe4)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 May 2011 12:35:55 +0000 (12:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 May 2011 12:35:55 +0000 (12:35 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20859 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc
index 4168b36434133fed389f7c0f9ff8463b16850429..31f3df8f0416cb491b09a53c589767b0f8760985 100644 (file)
}
if(in_array($values['name'],$usedNames)){
$msgs[] = msgPool::duplicated(_("Name"));
- #}elseif(preg_match("/[^a-z0-9\.]/i",$values['name'])){
- # $msgs[] = msgPool::invalid(_("Name"), $values['name'], '/[a-z0-9\.]/');
}
}
$this->listing->clearDialogObject();
}
}
+ }elseif($type == "Template"){
+
+ // Initiate the rpc request.
+ $rpc = $this->config->getRpcHandle();
+ $res = $rpc->installSetTemplate($values['name'], $values);
+ if(!$rpc->success()){
+ msg_dialog::display(_("Error"), sprintf(_("Failed to save template: %s"), $rpc->get_error()),ERROR_DIALOG);
+ return(NULL);
+ }else{
+
+ // We've successfully added/saved the item, now add it to the tree.
+ if(!$item){
+ $this->dataModel->addItem($type, $this->selectedContainer, $values['name'],$values, '-' );
+ $this->listing->clearDialogObject();
+ }else{
+
+ // Update the model and clear the dialogs
+ $path = $item['path'];
+ $this->dataModel->setItemValues($path, $values);
+ $this->listing->clearDialogObject();
+ }
+ }
+
}else{
echo "{$type} Cannot be saved yet";
$this->listing->clearDialogObject();
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.json b/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.json
index 3156d45ce600d6c6f4cb18b8f1fd224b93782970..423df6e218b961a7ffbac976949a62b9ed0234d8 100644 (file)
"name": {
"description": "Name",
"default": "",
- "syntax": "/^[a-z0-9\-\.]*$/i",
+ "syntax": "/^[a-z0-9\\-\\.]*$/i",
"value": "",
"required": true,
"type": "string",
"value": "",
"syntax": "/^[a-z0-9\\-]*$/i",
"required": true,
+ "initiallyEditableOnly": true,
"type": "string",
"display": "Name"
},
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.tpl b/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.tpl
index e2d8cd532d95f3bdcd8ed0645d6c2a614de8094e..e2c513404fe75073cbcd40d5d506d9ab70eeb742 100644 (file)
</td>
<td class="left-border">
</td><td>
- <table>
+ <table width="100%">
<tr>
<td>{$architecturesName}</td>
<td>{$architectures}</td>