Skip to content
Snippets Groups Projects
Commit 029b0f28 authored by JediKev's avatar JediKev
Browse files

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).
parent dbc39b4f
No related branches found
No related tags found
No related merge requests found
...@@ -237,6 +237,9 @@ class AdminAjaxAPI extends AjaxController { ...@@ -237,6 +237,9 @@ class AdminAjaxAPI extends AjaxController {
} }
} }
if (!$data_form)
$data_form = $sort->getDataConfigForm();
include STAFFINC_DIR . 'templates/queue-sorting-add.tmpl.php'; include STAFFINC_DIR . 'templates/queue-sorting-add.tmpl.php';
} }
......
<?php echo $sort->getDataConfigForm()->asTable(); ?> <?php echo $data_form->asTable(); ?>
<table class="table"> <table class="table">
<tbody class="sortable-rows"> <tbody class="sortable-rows">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment