diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-12 01:07:33 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-12 01:07:33 +0000 |
commit | fbc1fdd0b7244d2f03164b62eb893223ff930319 (patch) | |
tree | 2b1c79d2795ee2d1ecc3b019fe3643bcf52010ad /mod/uservalidationbyemail/views/default | |
parent | 3a6e0dc6e80434789abe5b98e2748a6fc79bf320 (diff) | |
download | elgg-fbc1fdd0b7244d2f03164b62eb893223ff930319.tar.gz elgg-fbc1fdd0b7244d2f03164b62eb893223ff930319.tar.bz2 |
Converted most forms to use elgg_view_form (therefore also moved the views to forms/*). Some views are left that _only_ do elgg_view_form, so I wonder if those should even be kept around.
git-svn-id: http://code.elgg.org/elgg/trunk@8127 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/uservalidationbyemail/views/default')
-rw-r--r-- | mod/uservalidationbyemail/views/default/admin/users/unvalidated.php | 65 | ||||
-rw-r--r-- | mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php | 63 |
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 |