Skip to content

Commit

Permalink
Version 5.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jshah4517 committed Oct 11, 2023
1 parent c4f7b42 commit a660026
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion core/addons_sidebar.twig
Expand Up @@ -31,7 +31,7 @@
<a href="{{ route('core.operator.integration.index') }}">{{ Lang.choice('core.third_party_integrations', 2) }}</a>
</li>
{% endif %}
{% if isModuleEnabled('Report') and auth_user().hasPermission('view.report') %}
{% if isModuleEnabled('Report') and auth_user().hasPermission('view.manage_report') %}
<li {% if route starts with 'report.operator.manage' %}class="sp-active"{% endif %}>
<a href="{{ route('report.operator.manage.index') }}">{{ Lang.choice('report.report', 2) }}</a>
</li>
Expand Down
11 changes: 11 additions & 0 deletions core/email_queue.twig
Expand Up @@ -96,6 +96,12 @@
<script>
$(function () {
$(document).on('click', '.send-button', function () {
const $this = $(this);
$this.prop('disabled', 'disabled');
$this.find('i').hide();
$this.append('<i class="fa-solid fa-spin fa-spinner">');
$.get('{{ route('core.operator.emailqueue.send') }}', { 'id[]': [ $(this).data('id') ] })
.done(function () {
$('.sp-sent-email.sp-alert').show(500).delay(5000).hide(500);
Expand All @@ -117,6 +123,11 @@
html: message,
icon: 'error'
});
})
.always(function () {
$this.find('i.fa-spinner').remove();
$this.find('i').show();
$this.prop('disabled', false);
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion index.twig
Expand Up @@ -230,7 +230,7 @@
</ul>
</li>
{% endif %}
{% if isModuleEnabled('Report') and auth_user().hasPermission('view.reportdashboard') %}
{% if isModuleEnabled('Report') and auth_user().hasPermission('view.report') %}
<li class="sp-block lg:sp-inline-block" aria-haspopup="false">
<a class="sp-nav-item" href="{{ route('report.operator.index') }}">{{ Lang.choice('report.report', 2) }}</a>
</li>
Expand Down
12 changes: 7 additions & 5 deletions report/sidebar.twig
Expand Up @@ -5,11 +5,13 @@
{{ Lang.get('report.reports_home') }}
</a>
</li>
<li {% if Route.currentRouteName() is same as('report.operator.manage.index') %}class="sp-font-bold"{% endif %}>
<a href="{{ route('report.operator.manage.index') }}">
{{ Lang.get('report.manage_reports') }}
</a>
</li>
{% if auth_user().hasPermission('view.manage_report') %}
<li {% if Route.currentRouteName() is same as('report.operator.manage.index') %}class="sp-font-bold"{% endif %}>
<a href="{{ route('report.operator.manage.index') }}">
{{ Lang.get('report.manage_reports') }}
</a>
</li>
{% endif %}
</ul>
</div>

Expand Down
20 changes: 6 additions & 14 deletions ticket/forms/submit_ticket_step2.twig
Expand Up @@ -243,6 +243,12 @@
brandId: "{{ brand.id }}",
departmentId: "{{ department.id }}"
});
$(function () {
$('textarea[name="text"]').editor($.extend({}, ticket.defaultEditorConfig(), {
excludeInternalArticles: {% if internal %}false{% else %}true{% endif %}
}));
})
</script>
<script src="{{ asset_rev('resources/assets/operator/js/newticket.js') }}"></script>

Expand All @@ -258,20 +264,6 @@

<script src="{{ asset_rev('resources/assets/general/js/done_typing.js') }}"></script>

<script>
$(document).ready(function() {
$('textarea[name="text"]').editor({
plugins: $.fn.editor.defaults.plugins.concat(['mentions', 'cannedresponses', 'selfservice', 'autosavecursor']),
toolbar: $.fn.editor.defaults.toolbar + ' | cannedresponses selfservice',
// Plugin settings.
ticketId: ticket.parameters().ticketId,
userId: ticket.parameters().userId,
brandId: ticket.parameters().brandId,
departmentId: ticket.parameters().departmentId
});
});
</script>

<!-- Custom fields -->
<script src="{{ asset_rev('resources/assets/general/js/customfields.js') }}"></script>
<script>
Expand Down
3 changes: 2 additions & 1 deletion ticket/ticket.twig
Expand Up @@ -444,11 +444,12 @@
departmentId: "{{ ticket.department_id }}",
replyOrder: '{{ auth_user().isAscendingReplyOrder() ? 'ASC' : 'DESC' }}',
notesPosition: {{ Config.get('settings.ticket_notes_position') }},
ticketGridUrl: "{{ Session.get('operator.url.ticketgrid', route('ticket.operator.ticket', manageTicketsParams)) }}",
ticketGridUrl: "{{ Session.get('operator.url.ticketgrid', route('ticket.operator.ticket', manageTicketsParams))|e('js') }}",
selfservice: {% if isModuleEnabled('Selfservice') %}true{% else %}false{% endif %},
{% if replyTemplate is not empty %}
replyTemplate: "{{ Purifier.clean(replyTemplate)|e('js') }}",
{% endif %}
excludeInternalArticles: {% if ticket.internal %}false{% else %}true{% endif %}
});
</script>
{% endblock %}
2 changes: 1 addition & 1 deletion user/forms/profile.twig
Expand Up @@ -67,7 +67,7 @@
</div>

<div class="sp-mb-3">
{{ form_button('<i class="fas fa-paper-plane"></i>&nbsp; ' ~ Lang.get('user.send_verification_email'), { 'class': 'verification-email' }) }} &nbsp;
{{ form_button('<i class="fas fa-paper-plane"></i>&nbsp; ' ~ Lang.get('user.send_verification_email'), { 'class': 'sp-verification-email' }) }} &nbsp;
{{ form_button('<i class="fas fa-check-square"></i>&nbsp; ' ~ Lang.get('user.mark_as_verified'), { 'class': 'mark-verified' }) }}
</div>
{% endif %}
Expand Down

0 comments on commit a660026

Please sign in to comment.