summaryrefslogtreecommitdiff
path: root/roundcubemail/plugins/new_user_dialog/new_user_dialog.php
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-10 15:14:07 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-10 15:14:07 +0000
commitbe0a218746791c5bb90b282b1e48199ce2cb3a9c (patch)
treeca87e439252874abb72e6cc3c0c38954859a3716 /roundcubemail/plugins/new_user_dialog/new_user_dialog.php
parent43eab4c5ea9c566e9c914acaf62df2a4861cad12 (diff)
Finish new-user-dialog plugin with localizatized texts
git-svn-id: https://svn.roundcube.net/trunk@2732 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/plugins/new_user_dialog/new_user_dialog.php')
-rw-r--r--roundcubemail/plugins/new_user_dialog/new_user_dialog.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/roundcubemail/plugins/new_user_dialog/new_user_dialog.php b/roundcubemail/plugins/new_user_dialog/new_user_dialog.php
index c49dfc019..4f6250f08 100644
--- a/roundcubemail/plugins/new_user_dialog/new_user_dialog.php
+++ b/roundcubemail/plugins/new_user_dialog/new_user_dialog.php
@@ -31,8 +31,7 @@ class new_user_dialog extends rcube_plugin
function create_identity($p)
{
// set session flag when a new user was created and the default identity seems to be incomplete
- $rcmail = rcmail::get_instance();
- if ($p['login'] && !$p['complete'] && (empty($p['record']['name']) || $p['record']['name'] == $rcmail->user->data['username']))
+ if ($p['login'] && !$p['complete'])
$_SESSION['plugin.newuserdialog'] = true;
}
@@ -42,7 +41,9 @@ class new_user_dialog extends rcube_plugin
*/
function render_page($p)
{
- if ($_SESSION['plugin.newuserdialog'] && $p['template'] == 'mail') {
+ if ($_SESSION['plugin.newuserdialog']) {
+ $this->add_texts('localization');
+
$rcmail = rcmail::get_instance();
$identity = $rcmail->user->get_identity();
$identities_level = intval($rcmail->config->get('identities_level', 0));
@@ -61,7 +62,8 @@ class new_user_dialog extends rcube_plugin
html::tag('form', array(
'action' => $rcmail->url('plugin.newusersave'),
'method' => "post"),
- html::tag('h3', null, 'Please complete your sender identity') . // TODO: localize title
+ html::tag('h3', null, Q($this->gettext('identitydialogtitle'))) .
+ html::p('hint', Q($this->gettext('identitydialoghint'))) .
$table->show() .
html::p(array('class' => "formbuttons"),
html::tag('input', array('type' => "submit", 'class' => "button mainaction", 'value' => $this->gettext('save'))))