diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-06-19 13:32:25 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-06-19 13:32:25 -0400 |
commit | aabac60b6eb04b7f4c25a96fa1c103baf1cf53e0 (patch) | |
tree | 0c7e00a5fc1de0301f8667bca83c7cb3b3870e86 /actions/finishopenidlogin.php | |
parent | 6ef35544b1876bbc5877d6a52e525198c63cfe01 (diff) |
push instructions into head and require license
darcs-hash:20080619173225-84dde-d73961d047f75fa1e3ac4287d35e4c6afb391e84.gz
Diffstat (limited to 'actions/finishopenidlogin.php')
-rw-r--r-- | actions/finishopenidlogin.php | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/actions/finishopenidlogin.php b/actions/finishopenidlogin.php index da2a05c26..703334453 100644 --- a/actions/finishopenidlogin.php +++ b/actions/finishopenidlogin.php @@ -29,6 +29,11 @@ class FinishopenidloginAction extends Action { common_user_error(_t('Already logged in.')); } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($this->arg('create')) { + if (!$this->boolean('license')) { + $this->show_form(_t('You can\'t register if you don\'t agree to the license.'), + $this->trimmed('newname')); + return; + } $this->create_new_user(); } else if ($this->arg('connect')) { $this->connect_user(); @@ -42,8 +47,7 @@ class FinishopenidloginAction extends Action { } } - function show_form($error=NULL, $username=NULL) { - common_show_header(_t('OpenID Account Setup')); + function show_top($error=NULL) { if ($error) { common_element('div', array('class' => 'error'), $error); } else { @@ -54,7 +58,13 @@ class FinishopenidloginAction extends Action { _t(' so we must connect your OpenID to a local account. ' . ' You can either create a new account, or connect with ' . ' your existing account, if you have one.')); - } + } + } + + function show_form($error=NULL, $username=NULL) { + common_show_header(_t('OpenID Account Setup'), NULL, $error, + array($this, 'show_top')); + common_element_start('form', array('method' => 'POST', 'id' => 'account_connect', 'action' => common_local_url('finishopenidlogin'))); @@ -65,6 +75,16 @@ class FinishopenidloginAction extends Action { common_input('newname', _t('New nickname'), ($username) ? $username : '', _t('1-64 lowercase letters or numbers, no punctuation or spaces')); + common_element_start('p'); + common_element('input', array('type' => 'checkbox', + 'id' => 'license', + 'name' => 'license', + 'value' => 'true')); + common_text(_t('My text and files are available under ')); + common_element('a', array(href => common_config('license', 'url')), + common_config('license', 'title')); + common_text(_t(' except this private data: password, email address, IM address, phone number.')); + common_element_end('p'); common_submit('create', _t('Create')); common_element('h2', NULL, 'Connect existing account'); |