diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-01 21:01:39 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-01 21:01:39 +0000 |
commit | b04f30ecf2347104131b8dccf7bb349b5ec72762 (patch) | |
tree | e01ce61019547a4e8ccfcd66ea6cbf9247b15639 /mod/uservalidationbyemail/views/default | |
parent | b38d8fc9291ae3c9c6d64b2d950fb0b309699f22 (diff) | |
download | elgg-b04f30ecf2347104131b8dccf7bb349b5ec72762.tar.gz elgg-b04f30ecf2347104131b8dccf7bb349b5ec72762.tar.bz2 |
Added admin page to validate, resend validation requests, or delete unvalidated users.
git-svn-id: http://code.elgg.org/elgg/trunk@6997 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/uservalidationbyemail/views/default')
-rw-r--r-- | mod/uservalidationbyemail/views/default/admin/users/unvalidated.php | 35 | ||||
-rw-r--r-- | mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php | 53 |
2 files changed, 88 insertions, 0 deletions
diff --git a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php new file mode 100644 index 000000000..4a14482df --- /dev/null +++ b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php @@ -0,0 +1,35 @@ +<?php +/** + * Admin area to view, validate, resend validation email, or delete unvalidated users. + * + * @package Elgg.Core.Plugin + * @subpackage UserValidationByEmail.Administration + */ + +// @todo pagination would be nice. +$users = uservalidationbyemail_get_unvalidated_users(); + +if ($users) { + foreach ($users as $user) { + $form_body .= elgg_view('uservalidationbyemail/unvalidated_user', array('user' => $user)); + } +} else { + echo elgg_echo('uservalidationbyemail:admin:no_unvalidated_users'); + return; +} + +$form_body .= elgg_echo('uservalidationbyemail:admin:with_checked') . elgg_view('input/pulldown', array( + 'internalname' => 'action_type', + 'options_values' => array( + 'validate' => elgg_echo('uservalidationbyemail:admin:validate'), + 'resend_validation' => elgg_echo('uservalidationbyemail:admin:resend_validation'), + 'delete' => elgg_echo('uservalidationbyemail:admin:delete'), + ) +)); + +$form_body .= '<br />' . elgg_view('input/button', array('value' => elgg_echo('submit'))); + +echo elgg_view('input/form', array( + 'action' => $vars['url'] . 'action/uservalidationbyemail/bulk_action', + 'body' => $form_body +));
\ No newline at end of file diff --git a/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php b/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php new file mode 100644 index 000000000..06c4e633e --- /dev/null +++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php @@ -0,0 +1,53 @@ +<?php +/** + * Formats and list an unvalidated user. + * + * @package Elgg.Core.Plugin + * @subpackage UserValidationByEmail.Administration + */ + +$user = elgg_get_array_value('user', $vars); + +// doesn't work. +//$checkbox = elgg_view('input/checkboxes', array( +// 'internalname' => 'user_guids', +// 'options' => array("$user->username - \"$user->name\" <$user->email>" => $user->guid) +//)); +$checkbox = "<label><input type=\"checkbox\" value=\"$user->guid\" class=\"input_checkboxes\" name=\"user_guids[]\">" + . "$user->username - \"$user->name\" <$user->email></label>"; + +$created = sprintf(elgg_echo('uservalidationbyemail:admin:user_created'), elgg_view_friendly_time($user->time_created)); + +$validate = elgg_view('output/confirmlink', array( + 'confirm' => sprintf(elgg_echo('uservalidationbyemail:confirm_validate_user'), $user->username), + 'href' => $vars['url'] . "action/uservalidationbyemail/validate/?user_guids[]=$user->guid", + 'text' => elgg_echo('uservalidationbyemail:admin:validate') +)); + +$resend_email = elgg_view('output/confirmlink', array( + 'confirm' => sprintf(elgg_echo('uservalidationbyemail:confirm_resend_validation'), $user->username), + 'href' => $vars['url'] . "action/uservalidationbyemail/resend_validation/?user_guids[]=$user->guid", + 'text' => elgg_echo('uservalidationbyemail:admin:resend_validation') +)); + +$delete = elgg_view('output/confirmlink', array( + 'confirm' => sprintf(elgg_echo('uservalidationbyemail:confirm_delete'), $user->username), + 'href' => $vars['url'] . "action/uservalidationbyemail/delete/?user_guids[]=$user->guid", + 'text' => elgg_echo('uservalidationbyemail:admin:delete') +)); + +// @todo All of these hard coded styles need to be removed. +// they're here because you can't currently extend the admin css. +?> + +<div class="admin_settings radius8" style="border: 1px solid black; padding: 5px;"> + <div class="uservalidationbyemail_unvalidated_controls" style="float: right"> + <?php echo "$resend_email | $validate | $delete"; ?> + </div> + + <?php echo $checkbox; ?> + + <div class="uservalidationbyemail_unvalidated_user_details" style="margin-left: 15px; font-size: smaller;"> + <?php echo $created; ?> + </div> +</div> |