summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2009-07-10 15:14:07 +0000
committerthomascube <thomas@roundcube.net>2009-07-10 15:14:07 +0000
commita183b76946ef6cd83fd324ced40cc7fb8b9334aa (patch)
tree8cb5b3811cceb1828512c8c84b06e36695cd8c59 /plugins
parent7d8e168cb1700455ae0746087d2e81c0696fbfaa (diff)
Finish new-user-dialog plugin with localizatized texts
Diffstat (limited to 'plugins')
-rw-r--r--plugins/new_user_dialog/localization/de_CH.inc7
-rw-r--r--plugins/new_user_dialog/localization/de_DE.inc7
-rw-r--r--plugins/new_user_dialog/localization/en_US.inc7
-rw-r--r--plugins/new_user_dialog/new_user_dialog.php10
-rw-r--r--plugins/new_user_dialog/newuserdialog.css21
5 files changed, 43 insertions, 9 deletions
diff --git a/plugins/new_user_dialog/localization/de_CH.inc b/plugins/new_user_dialog/localization/de_CH.inc
new file mode 100644
index 000000000..d2a1310d0
--- /dev/null
+++ b/plugins/new_user_dialog/localization/de_CH.inc
@@ -0,0 +1,7 @@
+<?php
+
+$labels = array();
+$labels['identitydialogtitle'] = 'Bitte vervollständigen Sie Ihre Absender-Informationen';
+$labels['identitydialoghint'] = 'Dieser Dialog erscheint nur einmal beim ersten Login.';
+
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/de_DE.inc b/plugins/new_user_dialog/localization/de_DE.inc
new file mode 100644
index 000000000..d2a1310d0
--- /dev/null
+++ b/plugins/new_user_dialog/localization/de_DE.inc
@@ -0,0 +1,7 @@
+<?php
+
+$labels = array();
+$labels['identitydialogtitle'] = 'Bitte vervollständigen Sie Ihre Absender-Informationen';
+$labels['identitydialoghint'] = 'Dieser Dialog erscheint nur einmal beim ersten Login.';
+
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/en_US.inc b/plugins/new_user_dialog/localization/en_US.inc
new file mode 100644
index 000000000..d9f531ba7
--- /dev/null
+++ b/plugins/new_user_dialog/localization/en_US.inc
@@ -0,0 +1,7 @@
+<?php
+
+$labels = array();
+$labels['identitydialogtitle'] = 'Please complete your sender identity';
+$labels['identitydialoghint'] = 'This box only appears once at the first login.';
+
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/new_user_dialog.php b/plugins/new_user_dialog/new_user_dialog.php
index c49dfc019..4f6250f08 100644
--- a/plugins/new_user_dialog/new_user_dialog.php
+++ b/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'))))
diff --git a/plugins/new_user_dialog/newuserdialog.css b/plugins/new_user_dialog/newuserdialog.css
index 91ea8f127..c03e6fd42 100644
--- a/plugins/new_user_dialog/newuserdialog.css
+++ b/plugins/new_user_dialog/newuserdialog.css
@@ -8,10 +8,11 @@
bottom: 0;
z-index: 10000;
background: rgba(0,0,0,0.5) !important;
- background: black;
+ background: #333;
/** IE hacks */
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)";
+ filter: alpha(opacity=90);
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=90)";
width: expression(document.documentElement.clientWidth+'px');
height: expression(document.documentElement.clientHeight+'px');
}
@@ -20,14 +21,23 @@
color: #333;
font-size: normal;
margin-top: 0.5em;
+ margin-bottom: 0;
+}
+
+#newuseroverlay p.hint {
+ margin-top: 0.5em;
+ font-style: italic;
}
#newuseroverlay form {
- width: 30em;
- margin: 6em auto;
+ width: 32em;
+ margin: 8em auto;
padding: 1em 2em;
background: #F6F6F6;
- border: 2px solid #999;
+ border: 2px solid #555;
+ border-radius: 6px;
+ -moz-border-radius: 6px;
+ -webkit-border-radius: 6px;
}
#newuseroverlay table td.title
@@ -44,5 +54,6 @@
}
#newuseroverlay .formbuttons {
+ margin-top: 1.5em;
text-align: center;
} \ No newline at end of file