Code

Updated enviroment edit handling.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Jul 2008 08:07:50 +0000 (08:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Jul 2008 08:07:50 +0000 (08:07 +0000)
-We were not able to edit enviroment settings frm My Account.
-Kiosk profile settings were not correctly "greyed-out"

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11616 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/personal/environment/class_environment.inc
gosa-plugins/goto/personal/environment/environment.tpl
gosa-plugins/goto/personal/environment/main.inc

index a19bb719f9654600ca2e5c2cbe60a92ee93a0ee2..511565d75902b63b938af076ef5ba1aca0d92b87 100644 (file)
@@ -275,7 +275,7 @@ class environment extends plugin
     $cnt = 0;
     $ui = get_userinfo();
     while($attrs = $ldap->fetch()){
-      $acl = $ui->get_permissions($attrs['dn'],"server/goShareServer","");
+      $acl = $ui->get_permissions($attrs['dn'],"server/goKioskService","");
       for($i = 0 ; $i < $attrs['gotoKioskProfile']['count'] ; $i ++){
         if(preg_match("/r/",$acl) || $this->gotoKioskProfile_Server == $attrs['cn'][0]){
           $name = preg_replace("/^.*\//","",$attrs['gotoKioskProfile'][$i]);
index b0784c5ce35362dd710bdd9d850e780334b91f0f..637f6b896f4715e8ecdfe0bdb42c07f85e96764e 100644 (file)
   </td>
   <td style="vertical-align:top">
 
+
   <table summary="{t}Kiosk profile settings{/t}">
 {if $kiosk_enabled }
     <tr>
                                         changeState('kiosk_profile');"> 
 {/if}
          {t}Server{/t}
+{render acl=$gotoKioskProfileACL}
       <select name='kiosk_server' id="kiosk_server" onChange='document.mainform.submit();'
                {if !$use_kiosk_server && $multiple_support} disabled {/if}>
        {html_options options=$kiosk_servers selected=$kiosk_server}
       </select>
+{/render}
      </td>
      <td>
       {if $kiosk_server != "none"}
       {t}Profile{/t}
+{render acl=$gotoKioskProfileACL}
       <select name='kiosk_profile' id="kiosk_profile"
         {if !$use_kiosk_server && $multiple_support} disabled {/if}>
        {html_options values=$kiosk_profiles output=$kiosk_profiles selected=$kiosk_profile}
       </select>
+{/render}
       {else}
         &nbsp;
       {/if}
index 23f97b23a685f258d1c54c6cb74cec11e7730b45..12a3b7a2bc66103ff2936e3286eb866da98add3e 100644 (file)
@@ -43,7 +43,7 @@ if (!$remove_lock){
   }
 
   /* Enter edit mode? */
-  if (isset($_POST['edit'])){
+  if (isset($_POST['edit']) || isset($_POST['delete_lock'])){
   
    /* Check locking */
     if (($username= get_lock($ui->dn)) != ""){
@@ -94,11 +94,11 @@ if (!$remove_lock){
 
   $info= "";
   /* Show page footer depending on the mode */
-  if (!$environment->in_dialog && $environment->is_account  && empty($lock_msg)){
+  if (!$environment->in_dialog && !$environment->dialog && $environment->is_account  && empty($lock_msg)){
     $display.= "<p class=\"plugbottom\">";
 
     /* Are we in edit mode? */
-    if ((session::is_set('edit'))&&($environment->dialog===NULL)){
+    if (session::is_set('edit')){
       $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
       $display.= "&nbsp;";
       $display.= "<input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">\n";