aboutsummaryrefslogtreecommitdiff
path: root/mod/uservalidationbyemail/views/default/uservalidationbyemail/unvalidated_user.php
blob: 9e9efa29a219b9b0a5bd0d535a10885ba2e11f85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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' => "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' => "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' => "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;">
	<?php echo $checkbox; ?><br />

	<div class="uservalidationbyemail_unvalidated_controls" style="float: right">
		<?php echo "$resend_email | $validate | $delete"; ?>
	</div>

	<div class="uservalidationbyemail_unvalidated_user_details" style="margin-left: 15px; font-size: smaller;">
		<?php echo $created; ?>
	</div>
</div>