diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php index ad52b5c9b8c778650a6785b383c8af4c97f3ffe1..01a537117382bb66c50d580ca7de5bfcdc80fed8 100644 --- a/include/ajax.tickets.php +++ b/include/ajax.tickets.php @@ -676,9 +676,12 @@ class TicketsAjaxAPI extends AjaxController { // Ticket thread variables are assumed to be quotes $response = "<br/><blockquote>$response</blockquote><br/>"; + // Return text if html thread is not enabled if (!$cfg->isHtmlThreadEnabled()) $response = Format::html2text($response, 90); + else + $response = Format::viewableImages($response); // XXX: assuming json format for now. return Format::json_encode(array('response' => $response)); diff --git a/include/class.export.php b/include/class.export.php index 3471ba5f6dc411035bd8defd43df6e5e0e66c5c4..521eb7cefbdb89605ebe87e04ea2d644f359d60c 100644 --- a/include/class.export.php +++ b/include/class.export.php @@ -66,7 +66,7 @@ class Export { return self::dumpQuery($sql, array( 'number' => __('Ticket Number'), - 'created' => __('Date'), + 'ticket_created' => __('Date'), 'subject' => __('Subject'), 'name' => __('From'), 'email' => __('From Email'), diff --git a/include/class.mailer.php b/include/class.mailer.php index 53a45eb7a2bba56cccd4eb76d065d4ea5b9855ee..2a0ebd768b1640851491c2eaa77254760a6e5e96 100644 --- a/include/class.mailer.php +++ b/include/class.mailer.php @@ -176,10 +176,12 @@ class Mailer { $mid_token = (isset($options['thread'])) ? $options['thread']->asMessageId($to) : ''; if (!(isset($options['text']) && $options['text'])) { - if ($cfg && $cfg->stripQuotedReply() && ($tag=$cfg->getReplySeparator()) + $tag = ''; + if ($cfg && $cfg->stripQuotedReply() && (!isset($options['reply-tag']) || $options['reply-tag'])) - $message = "<div style=\"display:none\" - data-mid=\"$mid_token\">$tag<br/><br/></div>$message"; + $tag = $cfg->getReplySeparator() . '<br/><br/>'; + $message = "<div style=\"display:none\" + data-mid=\"$mid_token\">$tag</div>$message"; $txtbody = rtrim(Format::html2text($message, 90, false)) . ($mid_token ? "\nRef-Mid: $mid_token\n" : ''); $mime->setTXTBody($txtbody); diff --git a/include/class.osticket.php b/include/class.osticket.php index 59dc66c6c83de78b4191fb2178ebf78b141ba9f7..d7e8f3d98a4386762d0071294f6dfb982f4a070e 100644 --- a/include/class.osticket.php +++ b/include/class.osticket.php @@ -226,7 +226,7 @@ class osTicket { $email=$this->getConfig()->getDefaultEmail(); //will take the default email. if($email) { - $email->sendAlert($to, $subject, $message, null, array('text'=>true)); + $email->sendAlert($to, $subject, $message, null, array('text'=>true, 'reply-tag'=>false)); } else {//no luck - try the system mail. Mailer::sendmail($to, $subject, $message, '"'.__('osTicket Alerts').sprintf('" <%s>',$to)); } diff --git a/include/client/login.inc.php b/include/client/login.inc.php index c3a809f957b9e2afcd8f00318352d39fdc564324..2eb28a227d004e2cd9e9f9e357b0b8c064811c78 100644 --- a/include/client/login.inc.php +++ b/include/client/login.inc.php @@ -50,13 +50,14 @@ if (count($ext_bks)) { } if ($cfg && $cfg->isClientRegistrationEnabled()) { if (count($ext_bks)) echo '<hr style="width:70%"/>'; ?> + <div style="margin-bottom: 5px"> <?php echo __('Not yet registered?'); ?> <a href="account.php?do=create"><?php echo __('Create an account'); ?></a> - <br/> - <div style="margin-top: 5px;"> + </div> +<?php } ?> + <div> <b><?php echo __("I'm an agent"); ?></b> — <a href="<?php echo ROOT_PATH; ?>scp"><?php echo __('sign in here'); ?></a> </div> -<?php } ?> </div> </div> </form> diff --git a/include/i18n/en_US/help/tips/manage.filter.yaml b/include/i18n/en_US/help/tips/manage.filter.yaml index 3b1da4336e7eb2ac5b46ffcf0b69a9da842d182e..4d183deb9bf39de8534c8eed7225c59ec2c5200d 100644 --- a/include/i18n/en_US/help/tips/manage.filter.yaml +++ b/include/i18n/en_US/help/tips/manage.filter.yaml @@ -94,7 +94,7 @@ department: assigned. links: - title: Manage Departments - href: /scp/canned.php + href: /scp/departments.php priority: title: Priority @@ -114,7 +114,7 @@ sla_plan: Filter</span>. links: - title: Manage SLA Plans - href: /scp/slaplan.php + href: /scp/slas.php auto_assign: title: Auto-Assign diff --git a/include/i18n/en_US/help/tips/settings.ticket.yaml b/include/i18n/en_US/help/tips/settings.ticket.yaml index d3c1da5cb9f1f7eb160d4d6279993469ecbb555c..3c7b872046a878bf15c964f6d65882d43deea241 100644 --- a/include/i18n/en_US/help/tips/settings.ticket.yaml +++ b/include/i18n/en_US/help/tips/settings.ticket.yaml @@ -49,7 +49,7 @@ default_sla: can remain Open before it is rendered Overdue. links: - title: Create more SLA Plans - href: scp/slas.php + href: /scp/slas.php default_priority: title: Default Priority diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php index 5da914258ea548bf4d18a46372bb06db13786b18..bfdf3deb9e3fd6b57bc0d0abb900c3ba1c62c441 100644 --- a/include/staff/ticket-view.inc.php +++ b/include/staff/ticket-view.inc.php @@ -541,8 +541,8 @@ $tcount+= $ticket->getNumNotes(); <td> <select id="cannedResp" name="cannedResp"> <option value="0" selected="selected"><?php echo __('Select a canned response');?></option> - <option value='lastmessage'><?php echo __('Original Message'); ?></option> - <option value='original'><?php echo __('Last Message'); ?></option> + <option value='original'><?php echo __('Original Message'); ?></option> + <option value='lastmessage'><?php echo __('Last Message'); ?></option> <?php if(($cannedResponses=Canned::responsesByDeptId($ticket->getDeptId()))) { echo '<option value="0" disabled="disabled"> @@ -721,7 +721,6 @@ print $note_form->getField('attachments')->render(); <span class='error'>* <?php echo $errors['note_status_id']; ?></span> </td> </tr> - </div> </table> <p style="padding-left:165px;"> diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php index 1848562703b24967fe741f2eccae76646c6b2cef..899f54e2ad4d6e6f493a83a9a42d8f830d1b60ba 100644 --- a/include/staff/tickets.inc.php +++ b/include/staff/tickets.inc.php @@ -251,7 +251,7 @@ $pageNav->setURL('tickets.php',$qstr.'&sort='.urlencode($_REQUEST['sort']).'&ord //ADD attachment,priorities, lock and other crap $qselect.=' ,IF(ticket.duedate IS NULL,IF(sla.id IS NULL, NULL, DATE_ADD(ticket.created, INTERVAL sla.grace_period HOUR)), ticket.duedate) as duedate ' .' ,CAST(GREATEST(IFNULL(ticket.lastmessage, 0), IFNULL(ticket.closed, 0), IFNULL(ticket.reopened, 0), ticket.created) as datetime) as effective_date ' - .' ,CONCAT_WS(" ", staff.firstname, staff.lastname) as staff, team.name as team ' + .' ,ticket.created as ticket_created, CONCAT_WS(" ", staff.firstname, staff.lastname) as staff, team.name as team ' .' ,IF(staff.staff_id IS NULL,team.name,CONCAT_WS(" ", staff.lastname, staff.firstname)) as assigned ' .' ,IF(ptopic.topic_pid IS NULL, topic.topic, CONCAT_WS(" / ", ptopic.topic, topic.topic)) as helptopic ' .' ,cdata.priority_id, cdata.subject, pri.priority_desc, pri.priority_color'; diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js index a2859c4334de2872bf7f78a81c25465e008002f3..8deaeb6ad0944e1aa135e574c6bcd55c7fa103ee 100644 --- a/js/redactor-osticket.js +++ b/js/redactor-osticket.js @@ -255,6 +255,13 @@ $(function() { el.redactor('set', '', false, false); }); } + $('input[type=submit]', el.closest('form')).on('click', function() { + // Some setups (IE v10 on Windows 7 at least) seem to have a bug + // where Redactor does not sync properly after adding an image. + // Therefore, the ::get() call will not include text added after + // the image was inserted. + el.redactor('sync'); + }); if (el.hasClass('draft')) { el.closest('form').append($('<input type="hidden" name="draft_id"/>')); options['plugins'].push('draft');