Code

Added password slection to copy & paste
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Apr 2006 07:05:18 +0000 (07:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 3 Apr 2006 07:05:18 +0000 (07:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2947 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/users/class_userManagement.inc
plugins/personal/generic/class_user.inc
plugins/personal/generic/paste_generic.tpl

index 045740c186896b0b381aff0d0365d71e3bf6c827..1a4d6ba7ce6b10fba69368e171c3e67e79a3d231 100644 (file)
@@ -181,7 +181,6 @@ class userManagement extends plugin
         $ret    = $this->CopyPasteHandler->execute(false);
         if($ret) return($ret);
         $this->reload();
-        $s_action = "change_pw";
         $dn = $this->CopyPasteHandler->lastdn;
 
         foreach($this->list as $id => $entry){
@@ -189,7 +188,9 @@ class userManagement extends plugin
             $s_entry = $id;
           }
         }
-        $s_action = "change_pw";
+        if($_POST['passwordTodo'] == "new"){
+          $s_action = "change_pw";
+        }
       }
 
 
index c56ddfa7fdca1a01865c0514db03a4bb290af7a2..4f11d399167104070e5e04af111ee4383f103f29 100644 (file)
@@ -1237,6 +1237,12 @@ class user extends plugin
 
     $smarty = get_smarty();
 
+    $smarty->assign("passwordTodo","clear");
+
+    if(isset($_POST['passwordTodo'])){
+      $smarty->assign("passwordTodo",$_POST['passwordTodo']);
+    }
+
     $smarty->assign("sn",       $this->sn);
     $smarty->assign("givenName",$this->givenName);
     $smarty->assign("uid",      $this->uid);
@@ -1251,7 +1257,6 @@ class user extends plugin
 
     if((isset($_FILES['picture_file']['tmp_name'])) && ($_FILES['picture_file']['size'] > 0)){
       $this->set_picture($_FILES['picture_file']['tmp_name']);
-      echo "changed";
     }
 
     /* Remove picture? */
index 9ab8f23ffb081dd8fb0f56177b937b2d736fb900..5768c4cdfec0030a4147cb73d705c0679aeb9917 100644 (file)
                        <input type=submit name="picture_remove" value="{t}Remove picture{/t}">
                  </td>
                </tr>
+               <tr>
+                       <td style='vertical-align:top;'>
+                               {t}Password{/t}
+                       </td>
+                       <td>
+                               <input type="radio" {if $passwordTodo=="clear"} checked{/if} name="passwordTodo" value="clear">{t}Clear password{/t}<br>
+                               <input type="radio" {if $passwordTodo=="new"}   checked{/if} name="passwordTodo" value="new">{t}Set new password{/t}
+                       </td>
+               </tr>
          </table>
        </td>
        <td style="vertical-align:top ">