summaryrefslogtreecommitdiff
path: root/plugins/kolab_files/lib/kolab_files_engine.php
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-10-17 11:59:38 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-10-17 11:59:38 (GMT)
commitfa20f96c30ce8b5808b68ce27ea5fe67cb271cc2 (patch)
tree0116474515d66f92af88991e12255c787c25c09c /plugins/kolab_files/lib/kolab_files_engine.php
parent538edd1707f763721222675142df250b2e0f7f3a (diff)
downloadroundcubemail-plugins-kolab-fa20f96c30ce8b5808b68ce27ea5fe67cb271cc2.tar.gz
Add "remember password" option
Diffstat (limited to 'plugins/kolab_files/lib/kolab_files_engine.php')
-rw-r--r--plugins/kolab_files/lib/kolab_files_engine.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/plugins/kolab_files/lib/kolab_files_engine.php b/plugins/kolab_files/lib/kolab_files_engine.php
index bbcd666..d319fe7 100644
--- a/plugins/kolab_files/lib/kolab_files_engine.php
+++ b/plugins/kolab_files/lib/kolab_files_engine.php
@@ -123,6 +123,7 @@ class kolab_files_engine
$this->rc->output->add_handlers(array(
'folder-create-form' => array($this, 'folder_create_form'),
'folder-mount-form' => array($this, 'folder_mount_form'),
+ 'folder-auth-options'=> array($this, 'folder_auth_options'),
'file-search-form' => array($this, 'file_search_form'),
'file-edit-form' => array($this, 'file_edit_form'),
'filelist' => array($this, 'file_list'),
@@ -243,7 +244,7 @@ class kolab_files_engine
$table->add(array('id' => $id, 'colspan' => 2, 'class' => 'source'), $row);
}
- $out = $table->show();
+ $out = $table->show() . $this->folder_auth_options(array('suffix' => '-form'));
// add form tag around text field
if (empty($attrib['form'])) {
@@ -259,6 +260,23 @@ class kolab_files_engine
}
/**
+ * Template object for folder authentication options
+ */
+ public function folder_auth_options($attrib)
+ {
+ $checkbox = new html_checkbox(array(
+ 'name' => 'store_passwords',
+ 'value' => '1',
+ 'id' => 'auth-pass-checkbox' . $attrib['suffix'],
+ ));
+
+ return html::div('auth-options', $checkbox->show(). '&nbsp;'
+ . html::label('auth-pass-checkbox' . $attrib['suffix'], $this->plugin->gettext('storepasswords'))
+ . html::span('description', $this->plugin->gettext('storepasswordsdesc'))
+ );
+ }
+
+ /**
* Template object for file_edit form
*/
public function file_edit_form($attrib)