summaryrefslogtreecommitdiffstats
path: root/lib/kolab_client_task.php
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2017-11-24 10:35:34 +0000
committerAleksander Machniak <machniak@kolabsys.com>2017-11-24 10:35:34 +0000
commitd9e1ef57277d8ffa022365eb2497e49428d3aa7e (patch)
treeda9dbf223daeb3359a4cdf96485ade9985882046 /lib/kolab_client_task.php
parent9f4605eae5f0dfb17fd4267d1072b5f79771e705 (diff)
downloadwebadmin-d9e1ef57277d8ffa022365eb2497e49428d3aa7e.tar.gz
Add possibility to clone object types (Bifrost#T57633)
Diffstat (limited to 'lib/kolab_client_task.php')
-rw-r--r--lib/kolab_client_task.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index 363ceb0..5365b51 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -1477,7 +1477,7 @@ class kolab_client_task
));
}
- // add delete button
+ // add Delete button
if ($this->is_deletable($data)) {
$id = $data['id'];
$form->add_button(array(
@@ -1486,6 +1486,15 @@ class kolab_client_task
));
}
+ // add Clone button
+ if (!empty($attribs['clone-button'])) {
+ $id = $data['id'];
+ $form->add_button(array(
+ 'value' => kolab_html::escape($this->translate('button.clone')),
+ 'onclick' => "kadm.command('{$attribs['clone-button']}', '{$id}')",
+ ));
+ }
+
$ac_min_len = $this->config_get('autocomplete_min_length', 1, Conf::INT);
$this->output->set_env('form_id', $attribs['id']);