From 14352830a9ea6403cbc486b9eec077fe7fc21d68 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 3 Dec 2008 11:46:34 +0000 Subject: [PATCH] Updated FAI management git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13142 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../fai/admin/fai/class_divListFai.inc | 18 +++++++++++++----- .../fai/admin/fai/class_faiGroupHandle.inc | 10 ++++------ .../fai/admin/fai/class_faiManagement.inc | 7 +++++-- gosa-plugins/fai/admin/fai/faiGroupHandle.tpl | 14 +++++++++----- 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_divListFai.inc b/gosa-plugins/fai/admin/fai/class_divListFai.inc index ccdd45812..5ac631747 100644 --- a/gosa-plugins/fai/admin/fai/class_divListFai.inc +++ b/gosa-plugins/fai/admin/fai/class_divListFai.inc @@ -272,13 +272,21 @@ class divListFai extends MultiSelectWindow /* Create actions string */ $actions = ""; - $actions.= ""; - if(!$opsi_only){ + if($opsi_only){ + $actions.= ""; + $actions.= " "; + }else{ + + $actions.= '  +  '; + + $actions.= ""; $actions.= ""; - }else{ - $actions.= " "; } /* Create list diff --git a/gosa-plugins/fai/admin/fai/class_faiGroupHandle.inc b/gosa-plugins/fai/admin/fai/class_faiGroupHandle.inc index 2ae27825e..999b69233 100644 --- a/gosa-plugins/fai/admin/fai/class_faiGroupHandle.inc +++ b/gosa-plugins/fai/admin/fai/class_faiGroupHandle.inc @@ -20,12 +20,10 @@ class faiGroupHandle{ /* Preset required values */ foreach($FAI_group as $type => $data){ $FAI_group[$type]['selected'] = FALSE; - } - - /* Select first entry in edit mode */ - if($this->mode == "edit"){ - reset($FAI_group); - $FAI_group[key($FAI_group)]['selected'] = TRUE; + $FAI_group[$type]['freezed'] = isset($data['FAIstate']) && preg_match("/freeze/",$data['FAIstate']); + if($this->mode == "edit" && !$FAI_group[$type]['freezed']){ + $FAI_group[$type]['selected'] = TRUE; + } } $this->FAI_group = $FAI_group; } diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index 013ee7657..c88f435d2 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -277,9 +277,12 @@ class faiManagement extends plugin $this->dialog->save_object(); if($this->dialog->is_open()){ return($this->dialog->execute()); - } - if($this->dialog->is_canceled() || isset($_POST['cancel_lock'])){ + }elseif($this->dialog->is_canceled() || isset($_POST['cancel_lock'])){ $this->dialog = FALSE; + }else{ + if(!count($this->dialog->get_selected())){ + $this->dialog = FALSE; + } } } diff --git a/gosa-plugins/fai/admin/fai/faiGroupHandle.tpl b/gosa-plugins/fai/admin/fai/faiGroupHandle.tpl index 5b771277a..cddbd0fa4 100644 --- a/gosa-plugins/fai/admin/fai/faiGroupHandle.tpl +++ b/gosa-plugins/fai/admin/fai/faiGroupHandle.tpl @@ -1,7 +1,7 @@ {if $mode == "remove"} -

{t}Edit entry{/t}

+

{t}Remove entry{/t}


{t}Select the entries you want to remove.{/t}
@@ -10,16 +10,20 @@ {foreach from=$FAI_group item=item key=key} - + {if $item.freezed} + + {else} + + {/if} {$types.$key.KZL} {$types.$key.NAME} - {$item.description} - + {if $item.freezed}({t}Freezed{/t}){/if} + {$item.description} {/foreach} -- 2.30.2