summaryrefslogtreecommitdiff
path: root/protected/views/user/admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'protected/views/user/admin.php')
-rw-r--r--protected/views/user/admin.php37
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>