2009-10-30 02:21:22 +00:00
|
|
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
2009-10-30 20:19:57 +00:00
|
|
|
<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 {
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
#g-registration-admin li h3 {
|
|
|
|
clear: both;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
2009-11-03 22:45:52 +00:00
|
|
|
$("#g-active-pending-users").ready(function() {
|
|
|
|
$(":radio[name='policy']").click(function (event) {
|
|
|
|
if ($(this).val() == "admin_only") {
|
|
|
|
$(":checkbox[name=email_verification]").attr("disabled", "disabled");
|
|
|
|
} else {
|
|
|
|
$(":checkbox[name=email_verification]").removeAttr("disabled");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
2009-10-30 20:19:57 +00:00
|
|
|
</script>
|
2009-10-30 02:21:22 +00:00
|
|
|
<div id="g-admin-register">
|
2009-10-30 20:19:57 +00:00
|
|
|
<div id="g-registration-admin">
|
2009-10-30 02:21:22 +00:00
|
|
|
<h2><?= t("Registration adminstration") ?></h2>
|
|
|
|
<?= form::open($action, array("method" => "post"), $hidden) ?>
|
2009-10-30 20:19:57 +00:00
|
|
|
<?= form::open_fieldset() ?>
|
|
|
|
<ul>
|
2009-10-30 02:21:22 +00:00
|
|
|
<li>
|
|
|
|
<h3><?= t("Confirmation policy") ?></h3>
|
|
|
|
</li>
|
2009-10-30 20:19:57 +00:00
|
|
|
<? foreach ($policy_list as $policy => $text): ?>
|
2009-10-30 02:21:22 +00:00
|
|
|
<li>
|
2009-10-30 20:19:57 +00:00
|
|
|
<?= form::radio("policy", $policy, $policy == $form["policy"]) ?>
|
|
|
|
<?= form::label("policy", $text) ?>
|
2009-10-30 02:21:22 +00:00
|
|
|
</li>
|
2009-10-30 20:19:57 +00:00
|
|
|
<? endforeach ?>
|
2009-10-30 02:21:22 +00:00
|
|
|
<li>
|
2009-11-03 22:45:52 +00:00
|
|
|
<?= form::checkbox("email_verification", "true", !empty($form["email_verification"]), $disable_email) ?>
|
2009-10-30 20:19:57 +00:00
|
|
|
<?= form::label("email_verification", t("Require e-mail verification when a visitor creates an account")) ?>
|
2009-10-30 02:21:22 +00:00
|
|
|
</li>
|
2009-11-03 22:45:52 +00:00
|
|
|
<? if (!empty($group_list)): ?>
|
2009-10-30 02:21:22 +00:00
|
|
|
<li>
|
2009-10-30 20:19:57 +00:00
|
|
|
<h3><?= t("Default group") ?></h3>
|
2009-10-30 02:21:22 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
2009-11-03 22:45:52 +00:00
|
|
|
<?= form::dropdown(array("name" => "group"), $group_list, $form["group"]) ?>
|
2009-10-30 02:21:22 +00:00
|
|
|
</li>
|
2009-10-30 20:19:57 +00:00
|
|
|
<li>
|
2009-10-30 02:21:22 +00:00
|
|
|
<?= form::submit(array("id" => "g-registration-admin", "name" => "save", "class" => "submit", "style" => "clear:both!important"), t("Update")) ?>
|
|
|
|
</li>
|
2009-11-03 22:45:52 +00:00
|
|
|
<? endif ?>
|
2009-10-30 02:21:22 +00:00
|
|
|
</ul>
|
2009-10-30 20:19:57 +00:00
|
|
|
<?= form::close_fieldset() ?>
|
2009-10-30 02:21:22 +00:00
|
|
|
<?= form::close() ?>
|
|
|
|
</div>
|
|
|
|
<? if (count($pending)): ?>
|
2009-10-30 20:19:57 +00:00
|
|
|
<div id="g-activate-pending-users" style="margin-top: .5em">
|
2009-10-30 02:21:22 +00:00
|
|
|
<?= form::open($activate, array("method" => "post"), $hidden) ?>
|
2009-10-30 20:19:57 +00:00
|
|
|
<?= form::open_fieldset() ?>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<h3><?= t("Pending account activations") ?></h3>
|
|
|
|
</li>
|
2009-10-30 02:21:22 +00:00
|
|
|
<li>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<td><?= t("Activate") ?></td>
|
2009-11-03 22:45:52 +00:00
|
|
|
<td><?= t("State") ?></td>
|
2009-10-30 02:21:22 +00:00
|
|
|
<td><?= t("User name") ?></td>
|
|
|
|
<td><?= t("Full name") ?></td>
|
2009-11-03 22:45:52 +00:00
|
|
|
<td><?= t("Requested") ?></td>
|
2009-10-30 02:21:22 +00:00
|
|
|
<td><?= t("Email") ?></td>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<? foreach ($pending as $user): ?>
|
|
|
|
<tr>
|
2009-11-03 22:45:52 +00:00
|
|
|
<td>
|
|
|
|
<? if ($user->state != 2): ?>
|
|
|
|
<?= form::checkbox("activate[]", $user->id) ?>
|
|
|
|
<? else: ?>
|
|
|
|
|
|
|
|
<? endif ?>
|
|
|
|
</td>
|
|
|
|
<td><?= register::format_registration_state($user->state) ?></td>
|
2009-10-30 02:21:22 +00:00
|
|
|
<td><?= t($user->name) ?></td>
|
|
|
|
<td><?= t($user->full_name) ?></td>
|
2009-11-03 22:45:52 +00:00
|
|
|
<td><?= t(gallery::date_time($user->request_date)) ?></td>
|
2009-10-30 02:21:22 +00:00
|
|
|
<td><?= t($user->email) ?></td>
|
|
|
|
</tr>
|
|
|
|
<? endforeach ?>
|
|
|
|
</table>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<?= form::submit(array("id" => "g-registration-activate", "name" => "activate_users", "class" => "submit", "style" => "clear:both!important"), t("Activate")) ?>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2009-10-30 20:19:57 +00:00
|
|
|
<?= form::close_fieldset() ?>
|
2009-10-30 02:21:22 +00:00
|
|
|
<?= form::close() ?>
|
|
|
|
</div>
|
|
|
|
<? endif ?>
|
|
|
|
</div>
|