summaryrefslogtreecommitdiff
path: root/plugins/new_user_dialog
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/new_user_dialog')
-rw-r--r--plugins/new_user_dialog/localization/ar.inc20
-rw-r--r--plugins/new_user_dialog/localization/ar_SA.inc19
-rw-r--r--plugins/new_user_dialog/localization/ast.inc20
-rw-r--r--plugins/new_user_dialog/localization/en_US.inc4
-rw-r--r--plugins/new_user_dialog/localization/es_AR.inc20
-rw-r--r--plugins/new_user_dialog/localization/eu_ES.inc20
-rw-r--r--plugins/new_user_dialog/localization/fa_AF.inc20
-rw-r--r--plugins/new_user_dialog/localization/lb_LU.inc3
-rw-r--r--plugins/new_user_dialog/localization/lv_LV.inc4
-rw-r--r--plugins/new_user_dialog/localization/ro_RO.inc4
-rw-r--r--plugins/new_user_dialog/new_user_dialog.php69
-rw-r--r--plugins/new_user_dialog/package.xml91
12 files changed, 238 insertions, 56 deletions
diff --git a/plugins/new_user_dialog/localization/ar.inc b/plugins/new_user_dialog/localization/ar.inc
new file mode 100644
index 000000000..110b6c429
--- /dev/null
+++ b/plugins/new_user_dialog/localization/ar.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/
+*/
+$labels['identitydialogtitle'] = 'يرجى إكمال هوية المرسل';
+$labels['identitydialoghint'] = 'يظهر هذا المربع مرة واحدة فقط عند تسجيل الدخول أول مرة .';
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/ar_SA.inc b/plugins/new_user_dialog/localization/ar_SA.inc
new file mode 100644
index 000000000..ea65a059c
--- /dev/null
+++ b/plugins/new_user_dialog/localization/ar_SA.inc
@@ -0,0 +1,19 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/
+*/
+$labels['identitydialoghint'] = 'يظهر هذا المربع مرة واحدة فقط عند أول الدخول';
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/ast.inc b/plugins/new_user_dialog/localization/ast.inc
new file mode 100644
index 000000000..0ec826dee
--- /dev/null
+++ b/plugins/new_user_dialog/localization/ast.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/
+*/
+$labels['identitydialogtitle'] = 'Por favor, completa los tos datos personales';
+$labels['identitydialoghint'] = 'Esti diálogu namái va apaecer la primer vegada que te coneutes al corréu.';
+?> \ 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
index d508cfc9c..a9e66bd23 100644
--- a/plugins/new_user_dialog/localization/en_US.inc
+++ b/plugins/new_user_dialog/localization/en_US.inc
@@ -2,10 +2,10 @@
/*
+-----------------------------------------------------------------------+
- | plugins/new_user_dialog/localization/<lang>.inc |
+ | plugins/new_user_dialog/localization/<lang>.inc |
| |
| Localization file of the Roundcube Webmail New User Dialog plugin |
- | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | Copyright (C) 2012, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
diff --git a/plugins/new_user_dialog/localization/es_AR.inc b/plugins/new_user_dialog/localization/es_AR.inc
new file mode 100644
index 000000000..bda1c7477
--- /dev/null
+++ b/plugins/new_user_dialog/localization/es_AR.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/
+*/
+$labels['identitydialogtitle'] = 'Por favor, seleccione una identidad para los mensajes salientes';
+$labels['identitydialoghint'] = 'Este diálogo aparecerá sólo una vez durante el primer ingreso';
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/eu_ES.inc b/plugins/new_user_dialog/localization/eu_ES.inc
new file mode 100644
index 000000000..1276ea70c
--- /dev/null
+++ b/plugins/new_user_dialog/localization/eu_ES.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/
+*/
+$labels['identitydialogtitle'] = 'Osatu zure bidaltzaile-identitatea';
+$labels['identitydialoghint'] = 'Kutxa hau behin bakarri agertzen da lehenengoz sartzean.';
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/fa_AF.inc b/plugins/new_user_dialog/localization/fa_AF.inc
new file mode 100644
index 000000000..d66d4cbcf
--- /dev/null
+++ b/plugins/new_user_dialog/localization/fa_AF.inc
@@ -0,0 +1,20 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | plugins/new_user_dialog/localization/<lang>.inc |
+ | |
+ | Localization file of the Roundcube Webmail New User Dialog plugin |
+ | Copyright (C) 2012-2013, The Roundcube Dev Team |
+ | |
+ | Licensed under the GNU General Public License version 3 or |
+ | any later version with exceptions for skins & plugins. |
+ | See the README file for a full license statement. |
+ | |
+ +-----------------------------------------------------------------------+
+
+ For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/
+*/
+$labels['identitydialogtitle'] = 'لطفا مشخصات فرستنده را کامل کنید';
+$labels['identitydialoghint'] = 'این متن تنها هنگام اولین ورود نمایش داده خواهد شد';
+?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/lb_LU.inc b/plugins/new_user_dialog/localization/lb_LU.inc
index 36da96e5e..4fe55546a 100644
--- a/plugins/new_user_dialog/localization/lb_LU.inc
+++ b/plugins/new_user_dialog/localization/lb_LU.inc
@@ -15,9 +15,6 @@
For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/
*/
-
-$labels = array();
$labels['identitydialogtitle'] = 'Vervollstänneg w.e.gl deng Sender-Identitéit';
$labels['identitydialoghint'] = 'Dës Këscht erschéngt just beim éischte Login.';
-
?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/lv_LV.inc b/plugins/new_user_dialog/localization/lv_LV.inc
index 0447d995a..2e3642330 100644
--- a/plugins/new_user_dialog/localization/lv_LV.inc
+++ b/plugins/new_user_dialog/localization/lv_LV.inc
@@ -17,7 +17,7 @@
*/
$labels = array();
-$labels['identitydialogtitle'] = 'Lūdzu aizpildiet Jūsu, kā sūtītāja, identitātes informāciju';
-$labels['identitydialoghint'] = 'Šis logs parādīsies tikai pirmajā autorizācijas reizē.';
+$labels['identitydialogtitle'] = 'Lūdzu, aizpildiet nosūtītāja identifikācijas informāciju';
+$labels['identitydialoghint'] = 'Šis logs parādīsies tikai pirmajā pieteikšanās reizē';
?> \ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/ro_RO.inc b/plugins/new_user_dialog/localization/ro_RO.inc
index caa8f3257..9d16daee5 100644
--- a/plugins/new_user_dialog/localization/ro_RO.inc
+++ b/plugins/new_user_dialog/localization/ro_RO.inc
@@ -17,7 +17,7 @@
*/
$labels = array();
-$labels['identitydialogtitle'] = 'Te rog completează identitatea de expeditor.';
-$labels['identitydialoghint'] = 'Această căsuţă apare o data la prima autentificare.';
+$labels['identitydialogtitle'] = 'Te rog completează identitatea expeditorului.';
+$labels['identitydialoghint'] = 'Această căsuţă apare doar la prima autentificare.';
?> \ 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 39a707638..9c9dcce1c 100644
--- a/plugins/new_user_dialog/new_user_dialog.php
+++ b/plugins/new_user_dialog/new_user_dialog.php
@@ -10,12 +10,10 @@
* @version @package_version@
* @license GNU GPLv3+
* @author Thomas Bruederli
- * @author Aleksander Machniak
*/
class new_user_dialog extends rcube_plugin
{
public $task = 'login|mail';
- public $noframe = true;
function init()
{
@@ -34,9 +32,8 @@ 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
- if ($p['login'] && !$p['complete']) {
+ if ($p['login'] && !$p['complete'])
$_SESSION['plugin.newuserdialog'] = true;
- }
}
/**
@@ -66,7 +63,7 @@ class new_user_dialog extends rcube_plugin
$table->add(null, html::tag('input', array(
'type' => 'text',
'name' => '_email',
- 'value' => rcube_utils::idn_to_utf8($identity['email']),
+ 'value' => rcube_idn_to_utf8($identity['email']),
'disabled' => ($identities_level == 1 || $identities_level == 3)
)));
@@ -89,30 +86,20 @@ class new_user_dialog extends rcube_plugin
'id' => 'newuserdialog',
'action' => $rcmail->url('plugin.newusersave'),
'method' => 'post'),
- html::p('hint', rcube::Q($this->gettext('identitydialoghint'))) .
+ 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'))))
));
- $title = rcube::JQ($this->gettext('identitydialogtitle'));
-
// disable keyboard events for messages list (#1486726)
- $rcmail->output->add_script("
- $('#newuserdialog').show()
- .dialog({modal:true, resizable:false, closeOnEscape:false, width:450, title:'$title'})
- .submit(function() {
- var i, request = {}, form = $(this).serializeArray();
-
- for (i in form)
- request[form[i].name] = form[i].value;
-
- rcmail.http_post('plugin.newusersave', request, true);
- return false;
- });
- $('input[name=_name]').focus();
- rcube_webmail.prototype.new_user_dialog_close = function() { $('#newuserdialog').dialog('close'); }
+ $rcmail->output->add_script(
+ "rcmail.message_list.key_press = function(){};
+ rcmail.message_list.key_down = function(){};
+ $('#newuserdialog').show().dialog({ modal:true, resizable:false, closeOnEscape:false, width:420 });
+ $('input[name=_name]').focus();
", 'docready');
$this->include_stylesheet('newuserdialog.css');
@@ -120,45 +107,39 @@ class new_user_dialog extends rcube_plugin
}
/**
- * Handler for submitted form (ajax request)
+ * Handler for submitted form
*
* Check fields and save to default identity if valid.
* Afterwards the session flag is removed and we're done.
*/
function save_data()
{
- $rcmail = rcmail::get_instance();
- $identity = $rcmail->user->get_identity();
- $ident_level = intval($rcmail->config->get('identities_level', 0));
+ $rcmail = rcmail::get_instance();
+ $identity = $rcmail->user->get_identity();
+ $identities_level = intval($rcmail->config->get('identities_level', 0));
$save_data = array(
- 'name' => rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST),
- 'email' => rcube_utils::get_input_value('_email', rcube_utils::INPUT_POST),
- 'organization' => rcube_utils::get_input_value('_organization', rcube_utils::INPUT_POST),
- 'signature' => rcube_utils::get_input_value('_signature', rcube_utils::INPUT_POST),
+ 'name' => get_input_value('_name', RCUBE_INPUT_POST),
+ 'email' => get_input_value('_email', RCUBE_INPUT_POST),
+ 'organization' => get_input_value('_organization', RCUBE_INPUT_POST),
+ 'signature' => get_input_value('_signature', RCUBE_INPUT_POST),
);
// don't let the user alter the e-mail address if disabled by config
- if (in_array($ident_level, array(1,3,4))) {
+ if ($identities_level == 1 || $identities_level == 3)
$save_data['email'] = $identity['email'];
- }
+ else
+ $save_data['email'] = rcube_idn_to_ascii($save_data['email']);
- if (empty($save_data['name']) || empty($save_data['email'])) {
- $rcmail->output->show_message('formincomplete', 'error');
- }
- else if (!rcube_utils::check_email($save_data['email'] = rcube_utils::idn_to_ascii($save_data['email']))) {
- $rcmail->output->show_message('emailformaterror', 'error', array('email' => $save_data['email']));
- }
- else {
- // save data
+ // save data if not empty
+ if (!empty($save_data['name']) && !empty($save_data['email'])) {
$rcmail->user->update_identity($identity['identity_id'], $save_data);
$rcmail->session->remove('plugin.newuserdialog');
- // hide dialog
- $rcmail->output->command('new_user_dialog_close');
- $rcmail->output->show_message('successfullysaved', 'confirmation');
}
- $rcmail->output->send();
+ $rcmail->output->redirect('');
}
}
+
+?>
diff --git a/plugins/new_user_dialog/package.xml b/plugins/new_user_dialog/package.xml
index 68a929931..0bca1d9d4 100644
--- a/plugins/new_user_dialog/package.xml
+++ b/plugins/new_user_dialog/package.xml
@@ -13,16 +13,21 @@
<email>roundcube@gmail.com</email>
<active>yes</active>
</lead>
- <date>2013-05-09</date>
+ <date>2012-01-16</date>
+ <time>17:00</time>
<version>
- <release>2.0</release>
- <api>2.0</api>
+ <release>1.5</release>
+ <api>1.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.gnu.org/licenses/gpl.html">GNU GPLv3+</license>
+ <notes>
+- Use jquery UI to render the dialog
+- Fixed IDNA encoding/decoding of e-mail addresses (#1487909)
+ </notes>
<contents>
<dir baseinstalldir="/" name="/">
<file name="new_user_dialog.php" role="php">
@@ -66,4 +71,84 @@
</required>
</dependencies>
<phprelease/>
+ <changelog>
+ <release>
+ <date>2010-03-29</date>
+ <time>13:20:00</time>
+ <version>
+ <release>1.0</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <notes></notes>
+ </release>
+ <release>
+ <date>2010-05-13</date>
+ <time>19:35:00</time>
+ <version>
+ <release>1.1</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <notes>
+- Fix space bar and backspace buttons not working (#1486726)
+ </notes>
+ </release>
+ <release>
+ <date>2010-05-27</date>
+ <time>12:00:00</time>
+ <version>
+ <release>1.2</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <notes>
+- Add overlay box only to mail task main template
+- Fix possible error on form submission (#1486103)
+ </notes>
+ </release>
+ <release>
+ <date>2010-12-02</date>
+ <time>12:00:00</time>
+ <version>
+ <release>1.3</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <notes>
+- Added setting of focus on name input
+- Added gl_ES translation
+ </notes>
+ </release>
+ <release>
+ <date>2012-01-16</date>
+ <time>17:00:00</time>
+ <version>
+ <release>1.5</release>
+ <api>1.0</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
+ <notes>- Use jquery UI to render the dialog</notes>
+ </release>
+ </changelog>
</package>