This commit is contained in:
ivan 2018-06-04 18:04:03 -03:00
parent 84f213454a
commit 17bdcc66d5
3 changed files with 18 additions and 11 deletions

View File

@ -44,11 +44,11 @@ class TestSMTPController extends Controller {
Controller::request('smtp-password'),
Controller::request('no-reply-email')
);
if($mailSender->isConnected()) {
Response::respondSuccess();
} else {
throw new Exception(ERRORS::SMTP_CONNECTION);
}
}
}
}

View File

@ -5,7 +5,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/comment Comment ticket
* @apiVersion 4.1.0
*
*
* @apiName Comment ticket
*
* @apiGroup Ticket
@ -22,7 +22,7 @@ DataValidator::with('CustomValidations', true);
* @apiUse INVALID_TICKET
* @apiUse INVALID_TOKEN
*
* @apiSuccess {Object} data Empty object
* @apiSuccess {Object} data Empty object
*
*/
@ -86,7 +86,7 @@ class CommentController extends Controller {
}
Log::createLog('COMMENT', $this->ticket->ticketNumber);
Response::respondSuccess();
} else {
Response::respondError(ERRORS::NO_PERMISSION);
@ -132,14 +132,21 @@ class CommentController extends Controller {
$name = $this->ticket->owner->name;
}
$url = Setting::getSetting('url')->getValue();
if(!Controller::isUserSystemEnabled()) {
$url .= '/check-ticket/' . $this->ticket->ticketNumber;
$url .= '/' . $email;
}
$mailSender->setTemplate(MailTemplate::TICKET_RESPONDED, [
'to' => $email,
'name' => $name,
'ticketNumber' => $this->ticket->ticketNumber,
'title' => $this->ticket->title,
'url' => Setting::getSetting('url')->getValue()
'ticketNumber' => $this->ticket->ticketNumber,
'url' => $url
]);
$mailSender->send();
}
}
}

View File

@ -334,7 +334,7 @@
</tr>
<tr>
<td class="mini-block-container">
<table cellspacing="0" cellpadding="0" width="100%" style="border-collapse:separate !important;">
<table cellspacing="0" cellpadding="0" width="100%" style="border-collapse:separate !important;">
<tr>
<td class="mini-block">
<table cellpadding="0" cellspacing="0" width="100%">
@ -346,11 +346,11 @@
<tr>
<td class="button">
<div><!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="{{url}}/check-ticket/{{ticketNumber}}/{{to}}" style="height:45px;v-text-anchor:middle;width:155px;" arcsize="15%" strokecolor="#ffffff" fillcolor="#ff6f6f">
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="{{url}}" style="height:45px;v-text-anchor:middle;width:155px;" arcsize="15%" strokecolor="#ffffff" fillcolor="#ff6f6f">
<w:anchorlock/>
<center style="color:#ffffff;font-family:Helvetica, Arial, sans-serif;font-size:14px;font-weight:regular;">Check Ticket</center>
</v:roundrect>
<![endif]--><a class="button-mobile" target="_blank" href="{{url}}/check-ticket/{{ticketNumber}}/{{to}}"
<![endif]--><a class="button-mobile" target="_blank" href="{{url}}"
style="background-color:#ff6f6f;border-radius:5px;color:#ffffff;display:inline-block;font-family:'Cabin', Helvetica, Arial, sans-serif;font-size:14px;font-weight:regular;line-height:45px;text-align:center;text-decoration:none;width:155px;-webkit-text-size-adjust:none;mso-hide:all;">Check Ticket</a></div>
</td>
</tr>