From ba73f4eed5ebb8e84efcc6a639ba14317891c07d Mon Sep 17 00:00:00 2001 From: JediKev <kevin@enhancesoft.com> Date: Tue, 5 Feb 2019 15:24:50 -0600 Subject: [PATCH] oops: Last Fixes This addresses all the issues found in the final round of testing. --- include/ajax.tickets.php | 2 +- include/class.forms.php | 4 ++-- include/class.misc.php | 4 ++-- include/staff/templates/dynamic-form.tmpl.php | 3 ++- include/staff/templates/queue-quickfilter.tmpl.php | 3 ++- include/staff/templates/tasks-queue-sort.tmpl.php | 3 ++- include/staff/ticket-open.inc.php | 2 ++ setup/test/tests/stubs.php | 4 ++++ 8 files changed, 17 insertions(+), 8 deletions(-) diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php index 016ffcab2..c92789dbb 100644 --- a/include/ajax.tickets.php +++ b/include/ajax.tickets.php @@ -1516,7 +1516,7 @@ function refer($tid, $target=null) { $note = array( 'title' => __('Task Created From Thread Entry'), - 'note' => sprintf(__('This Task was created from Ticket %1$s', $ticketLink)) + 'note' => sprintf(__('This Task was created from Ticket %1$s'), $ticketLink), ); $task->postNote($note, $errors, $thisstaff); diff --git a/include/class.forms.php b/include/class.forms.php index 099c971f5..4ceee8a55 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -2043,11 +2043,11 @@ class DatetimeField extends FormField { 'yd' => __('Yesterday'), 'tw' => __('This Week'), 'tm' => __('This Month'), - 'tq' => __('This Quater'), + 'tq' => __('This Quarter'), 'ty' => __('This Year'), 'lw' => __('Last Week'), 'lm' => __('Last Month'), - 'lq' => __('Last Quater'), + 'lq' => __('Last Quarter'), 'ly' => __('Last Year'), ); return $period ? $periods[$period] : $periods; diff --git a/include/class.misc.php b/include/class.misc.php index 65b1c357a..3a1dc0551 100644 --- a/include/class.misc.php +++ b/include/class.misc.php @@ -174,7 +174,7 @@ class Misc { $end = $dt->modify('last day of this month'); break; case 'tq': - case 'this-quater': + case 'this-quarter': $offset = ($dt->format('m') - 1) % 3; $start = $dt->modify(" - $offset month") ->modify('first day of this month'); @@ -197,7 +197,7 @@ class Misc { $end = $start->modify('last day of this month'); break; case 'lq': - case 'last-quater': + case 'last-quarter': $offset = (($dt->format('m') - 1) % 3)+3; $start = $dt->modify(" - $offset month") ->modify('first day of this month'); diff --git a/include/staff/templates/dynamic-form.tmpl.php b/include/staff/templates/dynamic-form.tmpl.php index 00abf34cb..4cf5162df 100644 --- a/include/staff/templates/dynamic-form.tmpl.php +++ b/include/staff/templates/dynamic-form.tmpl.php @@ -78,7 +78,8 @@ if (isset($options['entry']) && $options['mode'] == 'edit') { ?> success: $.proxy(function() { $(this).closest('tr').fadeOut(); }, this) - });" + }); + return false;" data-field-id="<?php echo $field->getAnswer()->get('field_id'); ?>" data-entry-id="<?php echo $field->getAnswer()->get('entry_id'); ?>"> <i class="icon-trash"></i> </a></div><?php diff --git a/include/staff/templates/queue-quickfilter.tmpl.php b/include/staff/templates/queue-quickfilter.tmpl.php index d7919963d..6046f7ae2 100644 --- a/include/staff/templates/queue-quickfilter.tmpl.php +++ b/include/staff/templates/queue-quickfilter.tmpl.php @@ -35,7 +35,8 @@ var query = addSearchParam({'<?php echo $param; ?>': $(event.target).data('value $.pjax({ url: '?' + query, timeout: 2000, - container: '#pjax-container'});"> + container: '#pjax-container'}); +return false;"> <ul <?php if (count($choices) > 20) echo 'style="height:500px;overflow-x:hidden;overflow-y:scroll;"'; ?>> <?php foreach ($choices as $k=>$desc) { $selected = isset($quick_filter) && $quick_filter == $k; diff --git a/include/staff/templates/tasks-queue-sort.tmpl.php b/include/staff/templates/tasks-queue-sort.tmpl.php index c0156fddd..19fa4ccd2 100644 --- a/include/staff/templates/tasks-queue-sort.tmpl.php +++ b/include/staff/templates/tasks-queue-sort.tmpl.php @@ -9,7 +9,8 @@ var query = addSearchParam({'sort': $(event.target).data('mode'), 'dir': $(event $.pjax({ url: '?' + query, timeout: 2000, - container: '#pjax-container'});"> + container: '#pjax-container'}); +return false;"> <ul class="bleed-left"> <?php foreach ($queue_sort_options as $mode) { $desc = $sort_options[$mode]; diff --git a/include/staff/ticket-open.inc.php b/include/staff/ticket-open.inc.php index 267d92765..a1f23e116 100644 --- a/include/staff/ticket-open.inc.php +++ b/include/staff/ticket-open.inc.php @@ -130,6 +130,7 @@ if ($_POST) var newUser = new Option(user.email + ' - ' + user.name, user.id, true, true); return $("#user-name").append(newUser).trigger('change'); }); + return false; "><i class="icon-plus"></i> <?php echo __('Add New'); ?></a> <span class="error">*</span> @@ -158,6 +159,7 @@ if ($_POST) var newUser = new Option(user.name, user.id, true, true); return $("#cc_users_open").append(newUser).trigger('change'); }); + return false; "><i class="icon-plus"></i> <?php echo __('Add New'); ?></a> <br/><span class="error"><?php echo $errors['ccs']; ?></span> diff --git a/setup/test/tests/stubs.php b/setup/test/tests/stubs.php index 4c96e7104..c6bad69b1 100644 --- a/setup/test/tests/stubs.php +++ b/setup/test/tests/stubs.php @@ -98,6 +98,10 @@ class DateTimeZone { static function listIdentifiers() {} } +class DateTimeImmutable { + function createFromMutable() {} +} + class Phar { static function isValidPharFilename() {} function setStub() {} -- GitLab