From fd9517655fc8211bf049ddb6209c3fe9c09da9a0 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 28 Oct 2017 18:23:35 +0200 Subject: [PATCH] Fix password form --- plugins/password/password.php | 17 ++++++++--------- skins/classic/common.css | 5 +++++ skins/classic/functions.js | 3 +++ skins/classic/settings.css | 5 +++++ skins/classic/templates/plugin.html | 6 +++++- 5 files changed, 26 insertions(+), 10 deletions(-) diff --git a/plugins/password/password.php b/plugins/password/password.php index 36ae68b70..37552fc66 100644 --- a/plugins/password/password.php +++ b/plugins/password/password.php @@ -282,24 +282,23 @@ class password extends rcube_plugin 'class' => 'button mainaction submit', 'label' => 'save', )); - $form_buttons = html::p(array('class' => 'formbuttons'), $submit_button); - - $out = html::div(array('class' => 'box'), - html::div(array('id' => 'prefs-title', 'class' => 'boxtitle'), $this->gettext('changepasswd')) - . html::div(array('class' => 'boxcontent'), - $disabled_msg . $table->show() . $rules . $form_buttons)); + $form_buttons = html::p(array('class' => 'formbuttons footerleft'), $submit_button); $rcmail->output->add_gui_object('passform', 'password-form'); $this->include_script('password.js'); - return $rcmail->output->form_tag(array( + $form = $rcmail->output->form_tag(array( 'id' => 'password-form', 'name' => 'password-form', 'method' => 'post', - 'class' => 'formcontent', 'action' => './?_task=settings&_action=plugin.password-save', - ), $out); + ), $disabled_msg . $table->show() . $rules); + + return html::div(array('id' => 'prefs-title', 'class' => 'boxtitle'), $this->gettext('changepasswd')) + . html::div(array('class' => 'box formcontainer scroller'), + html::div(array('class' => 'boxcontent formcontent'), $form) + . $form_buttons); } private function _save($curpass, $passwd) diff --git a/skins/classic/common.css b/skins/classic/common.css index 39ed45a40..5265c5aed 100644 --- a/skins/classic/common.css +++ b/skins/classic/common.css @@ -1091,6 +1091,11 @@ div.searchbox > input width: 97%; } +.formcontainer +{ + background-color: #f2f2f2; +} + .formcontent table { width: 100%; } diff --git a/skins/classic/functions.js b/skins/classic/functions.js index 73f2744bb..51012fe36 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -1106,6 +1106,9 @@ function rcube_init_mail_ui() if (rcmail.env.action == 'folders') { rcmail_ui.folder_search_init($('#folder-manager')); } + + $('#mainscreen > #prefs-title').detach().prependTo($('#mainscreen > .box')); } }); } + diff --git a/skins/classic/settings.css b/skins/classic/settings.css index 673e145eb..c6bdb15c2 100644 --- a/skins/classic/settings.css +++ b/skins/classic/settings.css @@ -140,6 +140,11 @@ body.iframe, width: 100%; } +.footerleft +{ + padding-left: 10px; +} + #formfooter .footerleft { padding: 0 2px 10px; diff --git a/skins/classic/templates/plugin.html b/skins/classic/templates/plugin.html index cec701301..b9b6ebe85 100644 --- a/skins/classic/templates/plugin.html +++ b/skins/classic/templates/plugin.html @@ -16,8 +16,12 @@
- + + +