From 70cb1777854c06f0bd42f84be1ce46e98c8e7467 Mon Sep 17 00:00:00 2001 From: Peter Rotich <peter@osticket.com> Date: Fri, 22 May 2015 19:52:51 +0000 Subject: [PATCH] Provide a way to configure ticket/task attachments --- include/staff/settings-tasks.inc.php | 39 ++++++++++++-------------- include/staff/settings-tickets.inc.php | 2 +- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/include/staff/settings-tasks.inc.php b/include/staff/settings-tasks.inc.php index d6a0d61d6..83b5ac067 100644 --- a/include/staff/settings-tasks.inc.php +++ b/include/staff/settings-tasks.inc.php @@ -79,28 +79,25 @@ if(!($maxfileuploads=ini_get('max_file_uploads'))) </td> </tr> <tr> - <td width="180" class="required"> - <?php echo __('Default SLA');?>: - </td> + <th colspan="2"> + <em><b><?php echo __('Attachments');?></b>:</em> + </th> + </tr> + <tr> + <td width="180"><?php echo __('Task Attachment Settings');?>:</td> <td> - <span> - <select name="default_task_sla_id"> - <option value="0">— <?php echo __('None');?> —</option> - <?php - if($slas=SLA::getSLAs()) { - foreach($slas as $id => $name) { - echo sprintf('<option value="%d" %s>%s</option>', - $id, - ($config['default_task_sla_id'] && - $id==$config['default_task_sla_id'])?'selected="selected"':'', - $name); - } - } - ?> - </select> - <span class="error">* <?php - echo $errors['default_task_sla_id']; ?></span> <i class="help-tip icon-question-sign" href="#default_sla"></i> - </span> + <?php + $tform = TaskForm::objects()->one()->getForm(); + $f = $tform->getField('description'); + ?> + <a class="action-button field-config" style="overflow:inherit" + href="#ajax.php/form/field-config/<?php + echo $f->get('id'); ?>" + onclick="javascript: + $.dialog($(this).attr('href').substr(1), [201]); + return false; + "><i class="icon-edit"></i> <?php echo __('Config'); ?></a> + <i class="help-tip icon-question-sign" href="#task_attachment_settings"></i> </td> </tr> </tbody> diff --git a/include/staff/settings-tickets.inc.php b/include/staff/settings-tickets.inc.php index d3e1bb8f1..b22387e57 100644 --- a/include/staff/settings-tickets.inc.php +++ b/include/staff/settings-tickets.inc.php @@ -209,7 +209,7 @@ if(!($maxfileuploads=ini_get('max_file_uploads'))) </th> </tr> <tr> - <td width="180"><?php echo __('EndUser Attachment Settings');?>:</td> + <td width="180"><?php echo __('Ticket Attachment Settings');?>:</td> <td> <?php $tform = TicketForm::objects()->one()->getForm(); -- GitLab