summaryrefslogtreecommitdiff
path: root/plugins/kolab_files/lib/kolab_files_engine.php
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-10-22 09:28:07 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-10-22 09:28:07 (GMT)
commita4ec2d2287db4264f9ba9130b9f3f51f6cc99e56 (patch)
tree27fc6847794b5fd353b397ad112422120b6c24e4 /plugins/kolab_files/lib/kolab_files_engine.php
parent9763bb1d1d35163925a3dc300602881178e122be (diff)
downloadroundcubemail-plugins-kolab-a4ec2d2287db4264f9ba9130b9f3f51f6cc99e56.tar.gz
Add possibility to move/rename folders in Files (#3815)
Diffstat (limited to 'plugins/kolab_files/lib/kolab_files_engine.php')
-rw-r--r--plugins/kolab_files/lib/kolab_files_engine.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/kolab_files/lib/kolab_files_engine.php b/plugins/kolab_files/lib/kolab_files_engine.php
index d319fe7..f4c78ef 100644
--- a/plugins/kolab_files/lib/kolab_files_engine.php
+++ b/plugins/kolab_files/lib/kolab_files_engine.php
@@ -122,6 +122,7 @@ class kolab_files_engine
// register template objects for dialogs (and main interface)
$this->rc->output->add_handlers(array(
'folder-create-form' => array($this, 'folder_create_form'),
+ 'folder-edit-form' => array($this, 'folder_edit_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'),
@@ -194,6 +195,38 @@ class kolab_files_engine
}
/**
+ * Template object for folder editing form
+ */
+ public function folder_edit_form($attrib)
+ {
+ $attrib['name'] = 'folder-edit-form';
+ if (empty($attrib['id'])) {
+ $attrib['id'] = 'folder-edit-form';
+ }
+
+ $input_name = new html_inputfield(array('id' => 'folder-edit-name', 'name' => 'name', 'size' => 30));
+ $select_parent = new html_select(array('id' => 'folder-edit-parent', 'name' => 'parent'));
+ $table = new html_table(array('cols' => 2, 'class' => 'propform'));
+
+ $table->add('title', html::label('folder-name', rcube::Q($this->plugin->gettext('foldername'))));
+ $table->add(null, $input_name->show());
+ $table->add('title', html::label('folder-parent', rcube::Q($this->plugin->gettext('folderinside'))));
+ $table->add(null, $select_parent->show());
+
+ $out = $table->show();
+
+ // add form tag around text field
+ if (empty($attrib['form'])) {
+ $out = $this->rc->output->form_tag($attrib, $out);
+ }
+
+ $this->plugin->add_label('folderupdating', 'folderupdatenotice', 'save', 'folderedit', 'cancel');
+ $this->rc->output->add_gui_object('folder-edit-form', $attrib['id']);
+
+ return $out;
+ }
+
+ /**
* Template object for folder mounting form
*/
public function folder_mount_form($attrib)