-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Extended session lifetime #9991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2355,6 +2355,18 @@ protected function login_form($attrib) | |
| 'buttons' => [], | ||
| ]; | ||
|
|
||
| if ($this->config->session_lifetime_extension_days() > 0) { | ||
| $session_lifetime_extension_hidden_field = new html_hiddenfield(['name' => '_session_lifetime_extension', 'value' => '0']); | ||
| $form_content['hidden']['session_lifetime_extension'] = $session_lifetime_extension_hidden_field->show(); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This hidden field isn't used, is it? |
||
|
|
||
| // Make sure the value is in the range 1..365. | ||
| $session_lifetime_extension_text = str_replace('#', $this->config->session_lifetime_extension_days(), $this->app->gettext('session_lifetime_extension_switch_text')); | ||
| $session_lifetime_extension_checkbox = new html_checkbox(['name' => '_session_lifetime_extension', 'id' => '_session_lifetime_extension', 'title' => $session_lifetime_extension_text]); | ||
| $form_content['inputs']['session_lifetime_extension'] = [ | ||
| 'content' => html::label(['for' => '_session_lifetime_extension'], [$session_lifetime_extension_checkbox->show(), $session_lifetime_extension_text]), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see the checkbox is checked by default, it shouldn't. |
||
| ]; | ||
| } | ||
|
|
||
| if (is_array($default_host) && count($default_host) > 1) { | ||
| $input_host = new html_select(['name' => '_host', 'id' => 'rcmloginhost', 'class' => 'custom-select']); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1160,6 +1160,11 @@ function rcube_elastic_ui() { | |
| icon_name = input.data('icon'), | ||
| icon = $('<i>').attr('class', 'input-group-text icon ' + input.attr('name').replace('_', '')); | ||
|
|
||
| // Ignore checkboxes, they are prettified well enough by pretty_checkbox() already. | ||
| if (input.attr('type') === 'checkbox') { | ||
| return; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we return here the |
||
| } | ||
|
|
||
| if (icon_name) { | ||
| icon.addClass(icon_name); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the code the default value is 0.