summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-05-28 12:42:22 -0400
committerEvan Prodromou <evan@prodromou.name>2008-05-28 12:42:22 -0400
commit0bc94b14c445b16d634b69759bffba20e819e23d (patch)
tree1f4fa865aca570f537b9108dd790b5dc98461c55 /actions
parent84dfd8b52d4c3ce0e0435bf8cbc2a8504e01caa2 (diff)
registration requires accepting the license
darcs-hash:20080528164222-84dde-20fa91371bcd0116e8d38bb90e221b3edbc2179a.gz
Diffstat (limited to 'actions')
-rw-r--r--actions/register.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/actions/register.php b/actions/register.php
index fc729a29b..fbff26af0 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -47,7 +47,9 @@ class RegisterAction extends Action {
$nickname = common_canonical_nickname($nickname);
$email = common_canonical_email($email);
- if (!Validate::email($email, true)) {
+ if (!$this->boolean('license')) {
+ $this->show_form(_t('You can\'t register if you don\'t agree to the license.'));
+ } else if (!Validate::email($email, true)) {
$this->show_form(_t('Not a valid email address.'));
} else if (!Validate::string($nickname, array('min_length' => 1,
'max_length' => 64,
@@ -114,7 +116,8 @@ class RegisterAction extends Action {
}
function show_form($error=NULL) {
-
+ global $config;
+
common_show_header(_t('Register'));
common_element_start('form', array('method' => 'POST',
'id' => 'login',
@@ -123,6 +126,18 @@ class RegisterAction extends Action {
common_password('password', _t('Password'));
common_password('confirm', _t('Confirm'));
common_input('email', _t('Email'));
+ common_element_start('p');
+ common_element_start('label', array('for' => 'license'));
+ common_text(_t('My text and files are available under '));
+ common_element('a', array(href => $config['license']['url']),
+ $config['license']['title']);
+ common_text(_t(' except this private data: password, email address, IM address, phone number.'));
+ common_element_end('label');
+ common_element('input', array('type' => 'checkbox',
+ 'id' => 'license',
+ 'name' => 'license',
+ 'value' => 'true'));
+ common_element_end('p');
common_submit('submit', _t('Register'));
common_element_end('form');
common_show_footer();