diff options
| author | Tristan Zur <tzur@ccwn.org> | 2012-05-20 15:11:36 +0200 |
|---|---|---|
| committer | Tristan Zur <tzur@ccwn.org> | 2012-05-20 15:11:36 +0200 |
| commit | e9e241011e2c390b0e2d88e330ed5fa770369a8d (patch) | |
| tree | 4e53218aa7c7019e0b66df9d7f3452a024c0e122 /protected/views/user/admin.php | |
| parent | 9aad228e1af661b9b39df83700d27e71697dc66f (diff) | |
Benutzer: Basisimplementierung um neues Passwort zu generieren
aktuell ohne eMail-Versand und direkte Anzeige des Passworts in der
Oberfläche
Diffstat (limited to 'protected/views/user/admin.php')
| -rw-r--r-- | protected/views/user/admin.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/protected/views/user/admin.php b/protected/views/user/admin.php index 90691ce..488559f 100644 --- a/protected/views/user/admin.php +++ b/protected/views/user/admin.php @@ -48,8 +48,45 @@ or <b>=</b>) at the beginning of each of your search values to specify how the c 'last_login', 'is_active', 'is_super_admin', + 'admin_pw_reset', + 'user_pw_reset', array( 'class'=>'CButtonColumn', + 'template'=>'{email}{view}{update}{delete}', + 'buttons'=>array( + 'email'=>array( + 'label'=>'Generate new password and email it', + 'imageUrl'=>Html::imageUrl('email.png'), + 'click'=>'function(){generatePassword($(this).parent().parent().children(":first-child").text());}' + ) + ) ), ), )); ?> + +<script type="text/javascript"> +function generatePassword(id) { + console.log(id); + <?php echo CHtml::ajax(array( + 'url'=>array('user/newPassword'), + 'data'=> "js:{'id':id}", + 'type'=>'post', + 'dataType'=>'json', + 'success'=>"function(data) + { + if (data.status == 'failure') + { + alert(data.message); + } + else + { + alert(data.message); + } + + } ", + ))?>; + return false; + +} + +</script> |
