From a3644638aaf0418598196a870204e0b632a4c8ad Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Fri, 17 Apr 2015 06:28:40 -0400 Subject: [PATCH] Allow preference sections to define CSS class names --- plugins/password/password.php | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/plugins/password/password.php b/plugins/password/password.php index cdea0ab..9239cd0 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -227,20 +227,20 @@ $table->add(null, $input_confpasswd->show()); $rules = ''; - + $required_length = intval($rcmail->config->get('password_minimum_length')); - if($required_length > 0) { + if ($required_length > 0) { $rules .= html::tag('li', array('id' => 'required-length'), $this->gettext(array( - 'name' => 'passwordshort', + 'name' => 'passwordshort', 'vars' => array('length' => $required_length) - ))); + ))); } - - if($rcmail->config->get('password_require_nonalpha')) { + + if ($rcmail->config->get('password_require_nonalpha')) { $rules .= html::tag('li', array('id' => 'require-nonalpha'), $this->gettext('passwordweak')); } - - if(!empty($rules)) { + + if (!empty($rules)) { $rules = html::tag('ul', array('id' => 'ruleslist'), $rules); } @@ -251,16 +251,16 @@ 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); @@ -306,10 +306,10 @@ switch ($result) { case PASSWORD_SUCCESS: return; - case PASSWORD_CRYPT_ERROR; + case PASSWORD_CRYPT_ERROR: $reason = $this->gettext('crypterror'); break; - case PASSWORD_CONNECT_ERROR; + case PASSWORD_CONNECT_ERROR: $reason = $this->gettext('connecterror'); break; case PASSWORD_ERROR: -- Gitblit v1.9.1