summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7b31413)
raw | patch | inline | side by side (parent: 7b31413)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 9 Jan 2008 08:46:53 +0000 (08:46 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 9 Jan 2008 08:46:53 +0000 (08:46 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8259 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/groups/application.tpl | patch | blob | history | |
gosa-core/plugins/admin/groups/class_groupApplication.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/groups/application.tpl b/gosa-core/plugins/admin/groups/application.tpl
index 87d8050aa10209c63e8653fc69b8c0bce153b13f..4b70a54727dea4985bbe1354b849ea1494f5ff50 100644 (file)
+
+{if $multiple_support}
+
+ <h2>Multiple edit</h2>
+
+ {if $use_apps}
+ <input type="checkbox" name="use_apps" value="1" checked class="center"
+ onClick="toggle('div_use_apps');">
+ {t}Modify application settings.{/t}
+ <br>
+ <div id="div_use_apps">
+ {else}
+ <input type="checkbox" name="use_apps" value="1" class="center"
+ onClick="toggle('div_use_apps');">
+ {t}Modify application settings for groups.{/t}
+ <br>
+ <div style="visibility: hidden;" id="div_use_apps">
+ {/if}
+{/if}
+
{if $enableReleaseManagement == true}
<br>
<b>{t}Release focus{/t}</b>
{if $ReleaseSelectAble}
+
{render acl=$FAIreleaseACL}
<select name="FAIrelease" title="{t}Select release name{/t}" onChange="javascript: document.mainform.submit();">
{html_options output=$Releases values=$Releases selected=$FAIrelease}
</td>
</tr>
</table>
+{if $multiple_support}
+ </div>
+ <input type="hidden" value="1" name="group_apps_multi">
+{/if}
diff --git a/gosa-core/plugins/admin/groups/class_groupApplication.inc b/gosa-core/plugins/admin/groups/class_groupApplication.inc
index 418fe3bbb6a30227400e15670e9ed3b7c270a67d..ea33e112f8e3de2c98d81ac85545ddee1e0c1c0d 100644 (file)
var $ui = NULL;
var $no_release_acls = false;
+ var $multiple_support = TRUE;
+
function appgroup (&$config, $dn= NULL, $parent= NULL)
{
{
/* Call parent execute */
plugin::execute();
+ $display = "";
/* Log view */
if($this->is_account && !$this->view_logged){
new log("view","groups/".get_class($this),$this->dn);
}
- /* Check if department was selected */
- if((isset($_GET['act']))&&($_GET['act']=="depopen")){
- $dep = base64_decode($_GET['depid']);
- $this->curbase =$dep;
- }
+ /* Account state settings - Skip if we are editing multiple entries */
+ if(!$this->multiple_support_active){
- /* Check if category was selected */
- if((isset($_GET['act']))&&($_GET['act']=="open") && (empty($_GET['id']) || isset($this->Categories[base64_decode($_GET['id'])]))){
- $this->curCatDir = base64_decode($_GET['id']);
- }
-
- /* Do we need to flip is_account state? */
- if(isset($_POST['modify_state'])){
- if($this->is_account && $this->acl_is_removeable()){
- $this->is_account= FALSE;
- }elseif(!$this->is_account && $this->acl_is_createable()){
- $this->is_account= TRUE;
+ /* Do we need to flip is_account state? */
+ if(isset($_POST['modify_state'])){
+ if($this->is_account && $this->acl_is_removeable()){
+ $this->is_account= FALSE;
+ }elseif(!$this->is_account && $this->acl_is_createable()){
+ $this->is_account= TRUE;
+ }
}
- }
-
- /* Do we represent a valid group? */
- if (!$this->is_account && $this->parent === NULL){
- $display= "<img alt=\"\" src=\"images/stop.png\" align=\"middle\"> <b>".
- _("This 'dn' is no appgroup.")."</b>";
- return ($display);
- }
- /* Show tab dialog headers */
- $display= "";
- if ($this->parent !== NULL){
- if ($this->is_account){
- $display= $this->show_disable_header(_("Remove applications"),
- _("This group has application features enabled. You can disable them by clicking below."));
- } else {
- $display.= $this->show_enable_header(_("Create applications"),
- _("This group has application features disabled. You can enable them by clicking below."));
+ /* Do we represent a valid group? */
+ if (!$this->is_account && $this->parent === NULL){
+ $display= "<img alt=\"\" src=\"images/stop.png\" align=\"middle\"> <b>".
+ _("This 'dn' is no appgroup.")."</b>";
return ($display);
}
- }
+ /* Show tab dialog headers */
+ $display= "";
+ if ($this->parent !== NULL){
+ if ($this->is_account){
+ $display= $this->show_disable_header(_("Remove applications"),
+ _("This group has application features enabled. You can disable them by clicking below."));
+ } else {
+ $display.= $this->show_enable_header(_("Create applications"),
+ _("This group has application features disabled. You can enable them by clicking below."));
+ return ($display);
+ }
+ }
+ }
+
/* Check acl, applications must be readable */
if(!$this->check_acls()){
$display .= "<img src='images/button_cancel.png' alt='"._("ACL")."' class='center'>
"</p><p class='seperator'> </p>";
$this->no_release_acls = true;
}
+ /* Check if department was selected */
+ if((isset($_GET['act']))&&($_GET['act']=="depopen")){
+ $dep = base64_decode($_GET['depid']);
+ $this->curbase =$dep;
+ }
+
+ /* Check if category was selected */
+ if((isset($_GET['act']))&&($_GET['act']=="open") && (empty($_GET['id']) || isset($this->Categories[base64_decode($_GET['id'])]))){
+ $this->curCatDir = base64_decode($_GET['id']);
+ }
+
+
/* Add Categorie */
$smarty->assign($acl."ACL",$this->getacl($acl,$this->no_release_acls));
}
+ /* Assign multiple edit values */
+ foreach(array("apps") as $attr){
+ if(in_array($attr,$this->multi_boxes)){
+ $smarty->assign("use_".$attr,TRUE);
+ }else{
+ $smarty->assign("use_".$attr,FALSE);
+ }
+ }
+ $smarty->assign("multiple_support",$this->multiple_support_active);
+
/* Show main page */
- if (is_object($this->dialog)){
+ if (($this->dialog)){
$smarty->assign("table", $this->table);
$display.= $smarty->fetch (get_template_path('application_options.tpl', TRUE,dirname(__FILE__)));
} else {
$display.= $smarty->fetch (get_template_path('application.tpl', TRUE,dirname(__FILE__)));
}
-
return ($display);
}
function save()
{
/* Skip saving application settings, if we do not have release acls */
- if($this->no_release_acls){
+ if($this->no_release_acls && $this->enableReleaseManagement){
new log("security","groups/".get_class($this),$this->dn,array(),"Skip saving group application extension. Caused by insufficient acls");
return;
"gosaApplicationParameter" => _("Application parameter"))
));
}
+
+
+ function multiple_save_object()
+ {
+ if(isset($_POST['group_apps_multi'])){
+ $this->save_object();
+ plugin::multiple_save_object();
+
+ /* Get posts */
+ foreach(array("apps") as $attr){
+ if(isset($_POST['use_'.$attr])) {
+ $this->multi_boxes[] = $attr;
+ }
+ }
+ }
+ }
+
+ function multiple_execute()
+ {
+ return($this->execute());
+ }
+
+ function init_multiple_support($attrs,$all)
+ {
+ // Do nothing here
+ }
+
+ function get_multi_edit_values()
+ {
+ $ret = plugin::get_multi_edit_values();
+
+ if(in_array("apps",$this->multi_boxes)){
+ $ret['gosaApplicationParameter'] = $this->gosaApplicationParameter;
+ $ret['Categories'] = $this->Categories;
+ $ret['gosaMemberApplication'] = $this->gosaMemberApplication;
+ $ret['FAIrelease'] = $this->FAIrelease;
+ $ret['appoption'] = $this->appoption;
+ }
+ return($ret);
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>