summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 06274ea)
raw | patch | inline | side by side (parent: 06274ea)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Dec 2006 11:38:01 +0000 (11:38 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Dec 2006 11:38:01 +0000 (11:38 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5298 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_faiPartitionTableEntry.inc | patch | blob | history | |
plugins/admin/fai/faiPartitionTableEntry.tpl | patch | blob | history |
diff --git a/plugins/admin/fai/class_faiPartitionTableEntry.inc b/plugins/admin/fai/class_faiPartitionTableEntry.inc
index bef8d646bb235b2d5499b48498c7a64d2f86d967..57dc434b95679a64eff5249ca8f921e3196d0669 100644 (file)
/* attribute list for save action */
var $ignore_account= TRUE;
- var $attributes = array("DISK_cn","DISK_description");
+ var $attributes = array("DISKcn","DISKdescription");
var $objectclasses= array();
- var $DISK_cn = "";
- var $DISK_description = "";
+ var $DISKcn = "";
+ var $DISKdescription = "";
var $partitions = array();
var $UsedAttrs = array();
}
/* Set default attributes */
- $this->DISK_cn = $disk['cn'];
- $this->DISK_description = $disk['description'];
+ $this->DISKcn = $disk['cn'];
+ $this->DISKdescription = $disk['description'];
$this->partitions = $disk['partitions'];
$this->is_edit = true;
$this->old_cn = $disk['cn'];
}
}
+
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
/* Fill templating stuff */
$smarty = get_smarty();
function save()
{
$tmp = array();
- $tmp['cn'] = $this->DISK_cn;
+ $tmp['cn'] = $this->DISKcn;
/* Attach partitions */
foreach($this->partitions as $key=>$val) {
$this->partitions[$key."-delete"]['status']="delete";
}
- $tmp['description'] = $this->DISK_description;
+ $tmp['description'] = $this->DISKdescription;
$tmp['partitions'] = $this->partitions;
$tmp['status'] = $this->status;
/* If hdd name has changed, tell partitionTable to rename it */
- if(($this->is_edit)&&($this->old_cn != $this->DISK_cn)){
+ if(($this->is_edit)&&($this->old_cn != $this->DISKcn)){
$tmp['rename']['from'] = $this->old_cn;
- $tmp['rename']['to'] = $this->DISK_cn;
+ $tmp['rename']['to'] = $this->DISKcn;
}
return($tmp);
}
/* Save data to object */
function save_object()
{
+
+
if((isset($_POST['TableEntryFrameSubmitted'])) && ($this->FAIstate != "freeze") ){
+ print_a($_POST);
plugin::save_object();
foreach($this->partitions as $key => $part){
{
/* Call common method to give check the hook */
$message= plugin::check();
-
+
+ /* Check for an empty disk name */
+ if(empty($this->DISKcn)){
+ $message[] = _("Please specify a valid disc name.");
+ }
+
/* check every partition.
* if there is an invalid value defined, append an errorstr to message
*/
"plSection" => array("administration"),
"plCategory" => array("fai"),
"plProvidedAcls" => array(
- "cn" => _("Name"),
- "description" => _("Description"),
+ "DISKcn" => _("Name"),
+ "DISKdescription" => _("Description"),
"FAIpartitionType" => _("Partition type"),
"FAIpartitionNr" => _("Partition no."),
"FAIfsType" => _("File system type"),
diff --git a/plugins/admin/fai/faiPartitionTableEntry.tpl b/plugins/admin/fai/faiPartitionTableEntry.tpl
index 1e17e156fe76627a0ab79edd96f172cc6fc60c59..870b66e03a2ef6fdf9c22f8c6f90ce57aeedc579 100644 (file)
<h2><img class="center" alt="" src="images/fai_partitionTable.png" align="middle" title="{t}Generic{/t}"> {t}Device{/t}</h2>
<table style='width:100%' summary="">
<tr>
- <td style='width:50%;border-right:1px solid #909090;'><LABEL for="DISK_cn">
+ <td style='width:50%;border-right:1px solid #909090;'><LABEL for="DISKcn">
{t}Name{/t}
</LABEL>{$must}
-{render acl=$cnACL}
- <input value="{$DISK_cn}" size="45" maxlength="80" name="DISK_cn" id="DISK_cn">
+{render acl=$DISKcnACL}
+ <input value="{$DISKcn}" size="45" maxlength="80" name="DISKcn" id="DISKcn">
{/render}
</td>
- <td><LABEL for="DISK_description">
+ <td><LABEL for="DISKdescription">
{t}Description{/t}
</LABEL>
-{render acl=$descriptionACL}
- <input value="{$DISK_description}" size="45" maxlength="80" name="DISK_description" id="DISK_description">
+{render acl=$DISKdescriptionACL}
+ <input value="{$DISKdescription}" size="45" maxlength="80" name="DISKdescription" id="DISKdescription">
{/render}
</td>
</tr>
<!-- Place cursor -->
<script language="JavaScript" type="text/javascript">
<!-- // First input field on page
- document.mainform.DISK_cn.focus();
+ document.mainform.DISKcn.focus();
-->
</script>