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.php65
-rw-r--r--mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php63
2 files changed, 64 insertions, 64 deletions
diff --git a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
index 6a541f88e..0b94ab039 100644
--- a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
+++ b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
@@ -1,66 +1,3 @@
<?php
-/**
- * Admin area to view, validate, resend validation email, or delete unvalidated users.
- *
- * @package Elgg.Core.Plugin
- * @subpackage UserValidationByEmail.Administration
- */
-$limit = get_input('limit', 10);
-$offset = get_input('offset', 0);
-
-// can't use elgg_list_entities() and friends because we don't use the default view for users.
-$ia = elgg_set_ignore_access(TRUE);
-$hidden_entities = access_get_show_hidden_status();
-access_show_hidden_entities(TRUE);
-
-$options = array(
- 'type' => 'user',
- 'metadata_name' => 'validated',
- 'metadata_value' => 0,
- 'limit' => $limit,
- 'offset' => $offset
-);
-$users = elgg_get_entities_from_metadata($options);
-
-$options['count'] = TRUE;
-$count = elgg_get_entities_from_metadata($options);
-
-access_show_hidden_entities($hidden_entities);
-elgg_set_ignore_access($ia);
-
-// setup pagination
-$pagination = elgg_view('navigation/pagination', array(
- 'baseurl' => elgg_get_site_url() . 'pg/admin/users/unvalidated',
- 'offset' => $offset,
- 'count' => $count,
- 'limit' => $limit,
-));
-
-echo $pagination;
-
-if ($users) {
- foreach ($users as $user) {
- $form_body .= elgg_view('uservalidationbyemail/unvalidated_user', array('theuser' => $user));
- }
-} else {
- echo elgg_echo('uservalidationbyemail:admin:no_unvalidated_users');
- return;
-}
-
-$form_body .= elgg_echo('uservalidationbyemail:admin:with_checked') . elgg_view('input/dropdown', 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'),
- ),
- 'value' => 'resend_validation',
-));
-
-$form_body .= '<br />' . elgg_view('input/submit', array('value' => elgg_echo('submit')));
-
-echo elgg_view('input/form', array(
- 'action' => 'action/uservalidationbyemail/bulk_action',
- 'body' => $form_body
-)); \ No newline at end of file
+echo elgg_view_form('uservalidationbyemail/bulk_action');
diff --git a/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php b/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
new file mode 100644
index 000000000..3389fc7f9
--- /dev/null
+++ b/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Admin area to view, validate, resend validation email, or delete unvalidated users.
+ *
+ * @package Elgg.Core.Plugin
+ * @subpackage UserValidationByEmail.Administration
+ */
+
+$limit = get_input('limit', 10);
+$offset = get_input('offset', 0);
+
+// can't use elgg_list_entities() and friends because we don't use the default view for users.
+$ia = elgg_set_ignore_access(TRUE);
+$hidden_entities = access_get_show_hidden_status();
+access_show_hidden_entities(TRUE);
+
+$options = array(
+ 'type' => 'user',
+ 'metadata_name' => 'validated',
+ 'metadata_value' => 0,
+ 'limit' => $limit,
+ 'offset' => $offset
+);
+$users = elgg_get_entities_from_metadata($options);
+
+$options['count'] = TRUE;
+$count = elgg_get_entities_from_metadata($options);
+
+access_show_hidden_entities($hidden_entities);
+elgg_set_ignore_access($ia);
+
+// setup pagination
+$pagination = elgg_view('navigation/pagination', array(
+ 'baseurl' => elgg_get_site_url() . 'pg/admin/users/unvalidated',
+ 'offset' => $offset,
+ 'count' => $count,
+ 'limit' => $limit,
+));
+
+echo $pagination;
+
+if ($users) {
+ foreach ($users as $user) {
+ $form_body .= elgg_view('uservalidationbyemail/unvalidated_user', array('theuser' => $user));
+ }
+} else {
+ echo elgg_echo('uservalidationbyemail:admin:no_unvalidated_users');
+ return;
+}
+
+$form_body .= elgg_echo('uservalidationbyemail:admin:with_checked') . elgg_view('input/dropdown', 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'),
+ ),
+ 'value' => 'resend_validation',
+));
+
+$form_body .= '<br />' . elgg_view('input/submit', array('value' => elgg_echo('submit')));
+
+echo $form_body; \ No newline at end of file