Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
issue: Queue Sort Title No Validation Error
This addresses an issue reported on the Forum where adding a new Sort Option
for Queues without a title fails without error. This is due to the
queue-sorting template that uses a new instance of the
`QueueSortDataConfigForm` form from a new instance of `QueueSort` rather
than the existing form with existing POST data/errors when a POST is
submitted. This updates the queue-sorting template to use the already
available `$data_form` form instance. This also adds an if statement to set
the `$data_form` if one doesn’t exist (this only applies to new modals
without a POST).
  • Loading branch information
JediKev committed Apr 29, 2019
1 parent dbc39b4 commit 029b0f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions include/ajax.admin.php
Expand Up @@ -237,6 +237,9 @@ function addQueueSort($root='Ticket') {
}
}

if (!$data_form)
$data_form = $sort->getDataConfigForm();

include STAFFINC_DIR . 'templates/queue-sorting-add.tmpl.php';

}
Expand Down
2 changes: 1 addition & 1 deletion include/staff/templates/queue-sorting.tmpl.php
@@ -1,4 +1,4 @@
<?php echo $sort->getDataConfigForm()->asTable(); ?>
<?php echo $data_form->asTable(); ?>

<table class="table">
<tbody class="sortable-rows">
Expand Down

0 comments on commit 029b0f2

Please sign in to comment.