summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-06-26 11:31:26 +0200
committerThomas Bruederli <thomas@roundcube.net>2014-06-26 11:31:26 +0200
commite62d6964231613b4fb1628551c2e3f1cde78e1bb (patch)
treebfb53f1f9498dd9e3a526ec2235b0277819cb50e
parent50177172e4f6ef9fd9200d2d8dfee02b1cf46834 (diff)
parent1a3132366e42a514ea9c471928eef8a63953125a (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
-rw-r--r--plugins/password/password.php29
1 files changed, 24 insertions, 5 deletions
diff --git a/plugins/password/password.php b/plugins/password/password.php
index ad65616d2..0db57afc6 100644
--- a/plugins/password/password.php
+++ b/plugins/password/password.php
@@ -226,22 +226,41 @@ class password extends rcube_plugin
$table->add('title', html::label($field_id, rcube::Q($this->gettext('confpasswd'))));
$table->add(null, $input_confpasswd->show());
+ $rules = '';
+
+ $required_length = intval($rcmail->config->get('password_minimum_length'));
+ if ($required_length > 0) {
+ $rules .= html::tag('li', array('id' => 'required-length'), $this->gettext(array(
+ 'name' => 'passwordshort',
+ 'vars' => array('length' => $required_length)
+ )));
+ }
+
+ if ($rcmail->config->get('password_require_nonalpha')) {
+ $rules .= html::tag('li', array('id' => 'require-nonalpha'), $this->gettext('passwordweak'));
+ }
+
+ if (!empty($rules)) {
+ $rules = html::tag('ul', array('id' => 'ruleslist'), $rules);
+ }
+
$out = html::div(array('class' => 'box'),
html::div(array('id' => 'prefs-title', 'class' => 'boxtitle'), $this->gettext('changepasswd')) .
html::div(array('class' => 'boxcontent'), $table->show() .
+ $rules .
html::p(null,
$rcmail->output->button(array(
'command' => 'plugin.password-save',
- 'type' => 'input',
- 'class' => 'button mainaction',
- 'label' => 'save'
+ 'type' => 'input',
+ 'class' => 'button mainaction',
+ 'label' => 'save'
)))));
$rcmail->output->add_gui_object('passform', 'password-form');
return $rcmail->output->form_tag(array(
- 'id' => 'password-form',
- 'name' => 'password-form',
+ 'id' => 'password-form',
+ 'name' => 'password-form',
'method' => 'post',
'action' => './?_task=settings&_action=plugin.password-save',
), $out);