aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/uservalidationbyemail/views/default/admin/users/unvalidated.php2
-rw-r--r--mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php18
-rw-r--r--mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php22
-rw-r--r--mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php12
-rw-r--r--mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php33
5 files changed, 39 insertions, 48 deletions
diff --git a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
index abe539108..62a35d0bb 100644
--- a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
+++ b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
@@ -4,6 +4,6 @@
*/
echo elgg_view_form('uservalidationbyemail/bulk_action', array(
- 'id' => 'unvalidated-users',
+ 'id' => 'uservalidationbyemail-form',
'action' => 'action/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
index 036336734..2afd6022d 100644
--- a/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
+++ b/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
@@ -46,14 +46,14 @@ $pagination = elgg_view('navigation/pagination',array(
'limit' => $limit,
));
-$bulk_actions_checkbox = '<label><input type="checkbox" class="uservalidationbyemail-unvalidated-users-checkall" />'
+$bulk_actions_checkbox = '<label><input type="checkbox" id="uservalidationbyemail-checkall" />'
. elgg_echo('uservalidationbyemail:check_all') . '</label>';
$validate = elgg_view('output/url', array(
'href' => 'action/uservalidationbyemail/validate/',
'text' => elgg_echo('uservalidationbyemail:admin:validate'),
'title' => elgg_echo('uservalidationbyemail:confirm_validate_checked'),
- 'class' => 'uservalidationbyemail-unvalidated-users-bulk-post',
+ 'class' => 'uservalidationbyemail-submit',
'is_action' => true,
'is_trusted' => true,
));
@@ -62,7 +62,7 @@ $resend_email = elgg_view('output/url', array(
'href' => 'action/uservalidationbyemail/resend_validation/',
'text' => elgg_echo('uservalidationbyemail:admin:resend_validation'),
'title' => elgg_echo('uservalidationbyemail:confirm_resend_validation_checked'),
- 'class' => 'uservalidationbyemail-unvalidated-users-bulk-post',
+ 'class' => 'uservalidationbyemail-submit',
'is_action' => true,
'is_trusted' => true,
));
@@ -71,25 +71,21 @@ $delete = elgg_view('output/url', array(
'href' => 'action/uservalidationbyemail/delete/',
'text' => elgg_echo('uservalidationbyemail:admin:delete'),
'title' => elgg_echo('uservalidationbyemail:confirm_delete_checked'),
- 'class' => 'uservalidationbyemail-unvalidated-users-bulk-post',
+ 'class' => 'uservalidationbyemail-submit',
'is_action' => true,
'is_trusted' => true,
));
$bulk_actions = <<<___END
-<div class="uservalidationbyemail-bulk-actions pas">
- <ul class="uservalidationbyemail-controls right">
+ <ul class="elgg-menu elgg-menu-general elgg-menu-hz float-alt">
<li>$resend_email</li><li>$validate</li><li>$delete</li>
</ul>
$bulk_actions_checkbox
-</div>
___END;
-//$bulk_actions = elgg_view('page_elements/contentwrapper', array('body' => $bulk_actions));
-
if (is_array($users) && count($users) > 0) {
- $html = '<ul class="elgg-list uservalidationbyemail-unvalidated-user-list">';
+ $html = '<ul class="elgg-list elgg-list-distinct">';
foreach ($users as $user) {
$html .= "<li id=\"unvalidated-user-{$user->guid}\" class=\"elgg-item uservalidationbyemail-unvalidated-user-item\">";
$html .= elgg_view('uservalidationbyemail/unvalidated_user', array('user' => $user));
@@ -99,7 +95,7 @@ if (is_array($users) && count($users) > 0) {
}
echo <<<___END
-<div class="elgg-module elgg-module-inline">
+<div class="elgg-module elgg-module-inline uservalidation-module">
<div class="elgg-head">
$bulk_actions
</div>
diff --git a/mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php b/mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php
index 3ce9a8ac9..afe334713 100644
--- a/mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php
+++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/css.php
@@ -1,14 +1,12 @@
-.elgg-head .uservalidationbyemail-bulk-actions label, .elgg-head .uservalidationbyemail-bulk-actions a{
- color: white;
-}
+<?php
+/**
+ * CSS for user validation by email
+ */
+?>
-.uservalidationbyemail-controls li {
- display: inline;
- border-right: solid 1px;
- padding: 0 4px 0 4px;
-}
-
-.uservalidationbyemail-controls li:last-child {
- border: 0;
- padding-right: 0;
+.uservalidation-module > .elgg-head * {
+ color: white;
}
+.uservalidation-module > .elgg-body * {
+ color: #333;
+} \ No newline at end of file
diff --git a/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php b/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php
index a10d7fbe6..948a54651 100644
--- a/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php
+++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/js.php
@@ -2,17 +2,17 @@
elgg.provide('elgg.uservalidationbyemail');
elgg.uservalidationbyemail.init = function() {
- $('.uservalidationbyemail-unvalidated-users-checkall').click(function() {
- checked = $(this).attr('checked') == 'checked';
- $('form#unvalidated-users').find('input[type=checkbox]').attr('checked', checked);
+ $('#uservalidationbyemail-checkall').click(function() {
+ var checked = $(this).attr('checked') == 'checked';
+ $('#uservalidationbyemail-form .elgg-body').find('input[type=checkbox]').attr('checked', checked);
});
- $('.uservalidationbyemail-unvalidated-users-bulk-post').click(function(event) {
- $form = $('form#unvalidated-users');
+ $('.uservalidationbyemail-submit').click(function(event) {
+ var $form = $('#uservalidationbyemail-form');
event.preventDefault();
// check if there are selected users
- if ($form.find('input[type=checkbox]:checked').length < 1) {
+ if ($('#uservalidationbyemail-form .elgg-body').find('input[type=checkbox]:checked').length < 1) {
return false;
}
diff --git a/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php b/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php
index 6431712ce..5c652a637 100644
--- a/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php
+++ b/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php
@@ -8,13 +8,11 @@
$user = elgg_extract('user', $vars);
-// doesn't work.
-//$checkbox = elgg_view('input/checkboxes', array(
-// 'name' => 'user_guids',
-// 'options' => array("$user->username - \"$user->name\" &lt;$user->email&gt;" => $user->guid)
-//));
-$checkbox = "<label><input type=\"checkbox\" value=\"$user->guid\" class=\"elgg-input-checkboxes\" name=\"user_guids[]\" />"
- . "$user->username - \"$user->name\" &lt;$user->email&gt;</label>";
+$checkbox = elgg_view('input/checkbox', array(
+ 'name' => 'user_guids[]',
+ 'value' => $user->guid,
+ 'default' => false,
+));
$created = elgg_echo('uservalidationbyemail:admin:user_created', array(elgg_view_friendly_time($user->time_created)));
@@ -35,19 +33,18 @@ $delete = elgg_view('output/confirmlink', array(
'href' => "action/uservalidationbyemail/delete/?user_guids[]=$user->guid",
'text' => elgg_echo('uservalidationbyemail:admin:delete')
));
-
+$menu = 'test';
$block = <<<___END
-<div class="admin-settings radius8 pas baa">
- $checkbox<br />
-
- <ul class="uservalidationbyemail-controls right">
- <li>$resend_email</li><li>$validate</li><li>$delete</li>
- </ul>
-
- <div class="uservalidationbyemail-unvalidated-user-details mll small">
+ <label>$user->username: "$user->name" &lt;$user->email&gt;</label>
+ <div class="uservalidationbyemail-unvalidated-user-details">
$created
</div>
-</div>
___END;
-echo elgg_view_image_block('', $block);
+$menu = <<<__END
+ <ul class="elgg-menu elgg-menu-general elgg-menu-hz float-alt">
+ <li>$resend_email</li><li>$validate</li><li>$delete</li>
+ </ul>
+__END;
+
+echo elgg_view_image_block($checkbox, $block, array('image_alt' => $menu));