summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-06-26 10:37:24 +0200
committerAleksander Machniak <alec@alec.pl>2014-06-26 10:37:24 +0200
commitd26a895aec3b70ec66ad9ce9c47831eab5dd2dc0 (patch)
tree3f47649683268d264735a558b08c592d641dcfe1 /plugins
parent0ebb250164cb17a980724f0cf8935c81e12909b9 (diff)
parent4fc21bb5312a9088772971483c60a96b1423d36c (diff)
Merge branch 'simonpl-master'
Diffstat (limited to 'plugins')
-rw-r--r--plugins/password/password.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/password/password.php b/plugins/password/password.php
index ad65616d2..cdea0ab25 100644
--- a/plugins/password/password.php
+++ b/plugins/password/password.php
@@ -226,9 +226,28 @@ 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',