add instructions to remotesubscribe
darcs-hash:20080701163705-84dde-ee039de84a45080962671d15891f3f7f685a73a6.gz
This commit is contained in:
parent
f9879168b5
commit
596365672a
@ -39,13 +39,31 @@ class RemotesubscribeAction extends Action {
|
||||
}
|
||||
}
|
||||
|
||||
function get_instructions() {
|
||||
return _t('To subscribe, you can [login](%%action.login%%),' .
|
||||
' or [register](%%action.register%%) a new ' .
|
||||
' account. If you already have an account ' .
|
||||
' on another microblogging site, ' .
|
||||
' enter your profile URL below.');
|
||||
}
|
||||
|
||||
function show_top($err=NULL) {
|
||||
if ($err) {
|
||||
common_element('div', 'error', $err);
|
||||
} else {
|
||||
$instructions = $this->get_instructions();
|
||||
$output = common_markup_to_html($instructions);
|
||||
common_element_start('p', 'instructions');
|
||||
common_raw($output);
|
||||
common_element_end('p');
|
||||
}
|
||||
}
|
||||
|
||||
function show_form($err=NULL) {
|
||||
$nickname = $this->trimmed('nickname');
|
||||
$profile = $this->trimmed('profile_url');
|
||||
common_show_header(_t('Remote subscribe'));
|
||||
if ($err) {
|
||||
common_element('div', 'error', $err);
|
||||
}
|
||||
common_show_header(_t('Remote subscribe'), NULL, $err,
|
||||
array($this, 'show_top'));
|
||||
common_element_start('form', array('id' => 'remotesubscribe', 'method' => 'POST',
|
||||
'action' => common_local_url('remotesubscribe')));
|
||||
common_input('nickname', _t('User nickname'), $nickname,
|
||||
|
Loading…
Reference in New Issue
Block a user