<?php defined("SYSPATH") or die("No direct script access.") ?>
<style>
#g-registration-admin li input[type=radio],
#g-registration-admin li input[type=checkbox] {
float: left;
margin-right: .5em;
}
#g-registration-admin li label {
#g-registration-admin li h3 {
clear: both;
</style>
<script type="text/javascript">
$("#g-active-pending-users").ready(function() {
$
});
</script>
<div id="g-admin-register">
<div id="g-registration-admin">
<h2><?= t("Registration adminstration") ?></h2>
<?= form::open($action, array("method" => "post"), $hidden) ?>
<?= form::open_fieldset() ?>
<ul>
<li>
<h3><?= t("Confirmation policy") ?></h3>
</li>
<? foreach ($policy_list as $policy => $text): ?>
<?= form::radio("policy", $policy, $policy == $form["policy"]) ?>
<?= form::label("policy", $text) ?>
<? endforeach ?>
<?= form::checkbox("email_verification", "true", !empty($form["email_verification"]), $no_admin) ?>
<?= form::label("email_verification", t("Require e-mail verification when a visitor creates an account")) ?>
<h3><?= t("Default group") ?></h3>
<?= form::dropdown(array("name" => "group"), $group_list, $form["default_group"]) ?>
<?= form::submit(array("id" => "g-registration-admin", "name" => "save", "class" => "submit", "style" => "clear:both!important"), t("Update")) ?>
</ul>
<?= form::close_fieldset() ?>
<?= form::close() ?>
</div>
<? if (count($pending)): ?>
<div id="g-activate-pending-users" style="margin-top: .5em">
<?= form::open($activate, array("method" => "post"), $hidden) ?>
<h3><?= t("Pending account activations") ?></h3>
<table>
<thead>
<tr>
<td><?= t("Activate") ?></td>
<td><?= t("Confirmed") ?></td>
<td><?= t("User name") ?></td>
<td><?= t("Full name") ?></td>
<td><?= t("Email") ?></td>
</tr>
</thead>
<? foreach ($pending as $user): ?>
<td><?= form::checkbox("activate[]", $user->id) ?>
<td><?= form::checkbox("confirmed[$user->id]", "checked", $user->confirmed, "disabled") ?></td>
<td><?= t($user->name) ?></td>
<td><?= t($user->full_name) ?></td>
<td><?= t($user->email) ?></td>
</table>
<?= form::submit(array("id" => "g-registration-activate", "name" => "activate_users", "class" => "submit", "style" => "clear:both!important"), t("Activate")) ?>
<? endif ?>