diff options
Diffstat (limited to 'mod/uservalidationbyemail/views/default/uservalidationbyemail')
3 files changed, 31 insertions, 36 deletions
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\" <$user->email>" => $user->guid) -//)); -$checkbox = "<label><input type=\"checkbox\" value=\"$user->guid\" class=\"elgg-input-checkboxes\" name=\"user_guids[]\" />" - . "$user->username - \"$user->name\" <$user->email></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" <$user->email></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)); |