aboutsummaryrefslogtreecommitdiff
path: root/mod/uservalidationbyemail/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/uservalidationbyemail/views/default')
-rw-r--r--mod/uservalidationbyemail/views/default/admin/users/unvalidated.php35
-rw-r--r--mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php53
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\" &lt;$user->email&gt;" => $user->guid)
+//));
+$checkbox = "<label><input type=\"checkbox\" value=\"$user->guid\" class=\"input_checkboxes\" name=\"user_guids[]\">"
+ . "$user->username - \"$user->name\" &lt;$user->email&gt;</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>