Browse Source

Contentified JS language

merge-requests/1/head
Mike Koch 6 years ago
parent
commit
472911d05a
  1. 8
      admin/admin_ticket.php
  2. 6
      internal-api/js/admin-ticket.js
  3. 2
      language/en/text.php

8
admin/admin_ticket.php

@ -685,7 +685,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
?>
</span>-->
<br>
<button id="due-date-button" class="btn btn-default btn-sm">Change</button>
<button id="due-date-button" class="btn btn-default btn-sm"><?php echo $hesklang['chg']; ?></button>
</div>
<div id="editable-due-date" style="display: none">
<div class="form-group">
@ -1508,7 +1508,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</div>
</div>
<?php // TODO BEGIN HIDDEN FIELDS FOR LANGUAGE STRINGS ?>
<p style="display: none" id="lang-key"><?php echo $hesklang['save']; ?></p>
<div style="display: none">
<p id="lang_ticket_due_date_updated"><?php echo $hesklang['ticket_due_date_updated']; ?></p>
<p id="lang_none"><?php echo $hesklang['none']; ?></p>
<p id="lang_error_updating_ticket_due_date"><?php echo $hesklang['error_updating_ticket_due_date']; ?></p>
</div>
<?php

6
internal-api/js/admin-ticket.js

@ -27,13 +27,13 @@ $(document).ready(function() {
dueDate: newDueDate
},
success: function() {
$.jGrowl('Ticket due date successfully updated', { theme: 'alert-success', closeTemplate: '' });
$readonlyDueDateContainer.find('span#due-date').text(newDueDate == '' ? 'None' : newDueDate);
$.jGrowl($('#lang_ticket_due_date_updated').text(), { theme: 'alert-success', closeTemplate: '' });
$readonlyDueDateContainer.find('span#due-date').text(newDueDate == '' ? $('#lang_none').text() : newDueDate);
$readonlyDueDateContainer.show();
$editableDueDateContainer.hide();
},
error: function() {
$.jGrowl('An error occurred when trying to update the ticket due date', { theme: 'alert-danger', closeTemplate: '' });
$.jGrowl($('#lang_error_updating_ticket_due_date').text(), { theme: 'alert-danger', closeTemplate: '' });
}
});
});

2
language/en/text.php

@ -70,6 +70,8 @@ $hesklang['event_comments_tooltip'] = 'Additional comments about the event';
$hesklang['event_create_ticket'] = 'Create Ticket';
$hesklang['to_title_case'] = 'To';
$hesklang['clear_for_no_due_date'] = 'Clear for no due date';
$hesklang['ticket_due_date_updated'] = 'Ticket due date successfully updated';
$hesklang['error_updating_ticket_due_date'] = 'An error occurred when trying to update the ticket due date';
// ADDED OR MODIFIED IN Mods for HESK 2.5.2
$hesklang['manage_statuses'] = 'Manage Statuses';

Loading…
Cancel
Save