feat(tickets): add status/priority admin CRUD (#206)
Generic: Repo Health / Access control (push) Successful in 3s
Generic: Repo Health / Site Health (push) Has been skipped
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Successful in 12s
Generic: Repo Health / Access control (pull_request) Successful in 3s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 54s
Universal: Auto Version Bump / Version Bump (push) Successful in 16s
Platform: moko-platform CI / Gate 1: Code Quality (pull_request) Failing after 1m16s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 19s
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (pull_request) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (pull_request) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (pull_request) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (pull_request) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (pull_request) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (pull_request) Has been cancelled
Platform: moko-platform CI / CI Summary (pull_request) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Access control (push) Successful in 3s
Generic: Repo Health / Site Health (push) Has been skipped
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Successful in 12s
Generic: Repo Health / Access control (pull_request) Successful in 3s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Platform: moko-platform CI / Gate 1: Code Quality (push) Failing after 54s
Universal: Auto Version Bump / Version Bump (push) Successful in 16s
Platform: moko-platform CI / Gate 1: Code Quality (pull_request) Failing after 1m16s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 19s
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (pull_request) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (pull_request) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (pull_request) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (pull_request) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (pull_request) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (pull_request) Has been cancelled
Platform: moko-platform CI / CI Summary (pull_request) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.1) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.2) (push) Has been cancelled
Platform: moko-platform CI / Gate 2: Unit Tests (8.3) (push) Has been cancelled
Platform: moko-platform CI / Gate 3: Self-Health Check (push) Has been cancelled
Platform: moko-platform CI / Gate 4: Governance (push) Has been cancelled
Platform: moko-platform CI / Gate 5: Template Integrity (push) Has been cancelled
Platform: moko-platform CI / CI Summary (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
New 'ticketsettings' view with inline CRUD for ticket statuses and priorities: - Table display with color preview, default/closed flags, ordering - Inline add/edit form with all fields - Delete with in-use protection (can't delete if tickets reference it) - Auto-generates alias from title - Controller actions: saveStatus, deleteStatus, savePriority, deletePriority - Gated by core.admin ACL
This commit is contained in:
@@ -33,9 +33,10 @@ class DisplayController extends BaseController
|
||||
'waflog' => 'core.admin',
|
||||
'categories' => 'mokosuite.tickets',
|
||||
'canned' => 'mokosuite.tickets',
|
||||
'automation' => 'core.admin',
|
||||
'database' => 'core.admin',
|
||||
'cleanup' => 'mokosuite.cache',
|
||||
'automation' => 'core.admin',
|
||||
'database' => 'core.admin',
|
||||
'cleanup' => 'mokosuite.cache',
|
||||
'ticketsettings' => 'core.admin',
|
||||
];
|
||||
|
||||
public function display($cachable = false, $urlparams = [])
|
||||
@@ -413,6 +414,81 @@ class DisplayController extends BaseController
|
||||
));
|
||||
}
|
||||
|
||||
// ==================================================================
|
||||
// Ticket Settings — Status/Priority CRUD
|
||||
// ==================================================================
|
||||
|
||||
public function saveStatus()
|
||||
{
|
||||
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||
|
||||
if (!$this->checkAcl('core.admin'))
|
||||
{
|
||||
$this->jsonForbidden();
|
||||
return;
|
||||
}
|
||||
|
||||
$input = Factory::getApplication()->getInput();
|
||||
$this->jsonResponse($this->getModel('Tickets')->saveStatus([
|
||||
'id' => $input->getInt('id', 0),
|
||||
'title' => $input->getString('title', ''),
|
||||
'alias' => $input->getString('alias', ''),
|
||||
'color' => $input->getString('color', 'bg-secondary'),
|
||||
'is_default' => $input->getInt('is_default', 0),
|
||||
'is_closed' => $input->getInt('is_closed', 0),
|
||||
'ordering' => $input->getInt('ordering', 0),
|
||||
]));
|
||||
}
|
||||
|
||||
public function deleteStatus()
|
||||
{
|
||||
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||
|
||||
if (!$this->checkAcl('core.admin'))
|
||||
{
|
||||
$this->jsonForbidden();
|
||||
return;
|
||||
}
|
||||
|
||||
$id = Factory::getApplication()->getInput()->getInt('id', 0);
|
||||
$this->jsonResponse($this->getModel('Tickets')->deleteStatus($id));
|
||||
}
|
||||
|
||||
public function savePriority()
|
||||
{
|
||||
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||
|
||||
if (!$this->checkAcl('core.admin'))
|
||||
{
|
||||
$this->jsonForbidden();
|
||||
return;
|
||||
}
|
||||
|
||||
$input = Factory::getApplication()->getInput();
|
||||
$this->jsonResponse($this->getModel('Tickets')->savePriority([
|
||||
'id' => $input->getInt('id', 0),
|
||||
'title' => $input->getString('title', ''),
|
||||
'alias' => $input->getString('alias', ''),
|
||||
'color' => $input->getString('color', 'bg-secondary'),
|
||||
'is_default' => $input->getInt('is_default', 0),
|
||||
'ordering' => $input->getInt('ordering', 0),
|
||||
]));
|
||||
}
|
||||
|
||||
public function deletePriority()
|
||||
{
|
||||
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
|
||||
|
||||
if (!$this->checkAcl('core.admin'))
|
||||
{
|
||||
$this->jsonForbidden();
|
||||
return;
|
||||
}
|
||||
|
||||
$id = Factory::getApplication()->getInput()->getInt('id', 0);
|
||||
$this->jsonResponse($this->getModel('Tickets')->deletePriority($id));
|
||||
}
|
||||
|
||||
// ==================================================================
|
||||
// KB Search
|
||||
// ==================================================================
|
||||
|
||||
@@ -1133,6 +1133,117 @@ class TicketsModel extends BaseDatabaseModel
|
||||
return $db->loadObjectList() ?: [];
|
||||
}
|
||||
|
||||
// ==================================================================
|
||||
// Status/Priority CRUD
|
||||
// ==================================================================
|
||||
|
||||
public function saveStatus(array $data): array
|
||||
{
|
||||
$db = $this->getDatabase();
|
||||
$obj = (object) $data;
|
||||
|
||||
if (!empty($obj->title) && empty($obj->alias))
|
||||
{
|
||||
$obj->alias = strtolower(preg_replace('/[^a-z0-9]+/i', '_', $obj->title));
|
||||
}
|
||||
|
||||
if (empty($obj->id))
|
||||
{
|
||||
unset($obj->id);
|
||||
$db->insertObject('#__mokosuite_ticket_statuses', $obj, 'id');
|
||||
|
||||
return ['status' => 'ok', 'id' => (int) $obj->id, 'message' => 'Status created'];
|
||||
}
|
||||
|
||||
$db->updateObject('#__mokosuite_ticket_statuses', $obj, 'id');
|
||||
|
||||
return ['status' => 'ok', 'id' => (int) $obj->id, 'message' => 'Status updated'];
|
||||
}
|
||||
|
||||
public function deleteStatus(int $id): array
|
||||
{
|
||||
if ($id < 1)
|
||||
{
|
||||
return ['status' => 'error', 'message' => 'Invalid ID'];
|
||||
}
|
||||
|
||||
$db = $this->getDatabase();
|
||||
|
||||
// Check no tickets use this status
|
||||
$db->setQuery(
|
||||
$db->getQuery(true)
|
||||
->select('COUNT(*)')
|
||||
->from($db->quoteName('#__mokosuite_tickets'))
|
||||
->where($db->quoteName('status_id') . ' = ' . $id)
|
||||
);
|
||||
|
||||
if ((int) $db->loadResult() > 0)
|
||||
{
|
||||
return ['status' => 'error', 'message' => 'Cannot delete — status is in use by tickets'];
|
||||
}
|
||||
|
||||
$db->setQuery(
|
||||
$db->getQuery(true)
|
||||
->delete($db->quoteName('#__mokosuite_ticket_statuses'))
|
||||
->where($db->quoteName('id') . ' = ' . $id)
|
||||
)->execute();
|
||||
|
||||
return ['status' => 'ok', 'message' => 'Status deleted'];
|
||||
}
|
||||
|
||||
public function savePriority(array $data): array
|
||||
{
|
||||
$db = $this->getDatabase();
|
||||
$obj = (object) $data;
|
||||
|
||||
if (!empty($obj->title) && empty($obj->alias))
|
||||
{
|
||||
$obj->alias = strtolower(preg_replace('/[^a-z0-9]+/i', '_', $obj->title));
|
||||
}
|
||||
|
||||
if (empty($obj->id))
|
||||
{
|
||||
unset($obj->id);
|
||||
$db->insertObject('#__mokosuite_ticket_priorities', $obj, 'id');
|
||||
|
||||
return ['status' => 'ok', 'id' => (int) $obj->id, 'message' => 'Priority created'];
|
||||
}
|
||||
|
||||
$db->updateObject('#__mokosuite_ticket_priorities', $obj, 'id');
|
||||
|
||||
return ['status' => 'ok', 'id' => (int) $obj->id, 'message' => 'Priority updated'];
|
||||
}
|
||||
|
||||
public function deletePriority(int $id): array
|
||||
{
|
||||
if ($id < 1)
|
||||
{
|
||||
return ['status' => 'error', 'message' => 'Invalid ID'];
|
||||
}
|
||||
|
||||
$db = $this->getDatabase();
|
||||
|
||||
$db->setQuery(
|
||||
$db->getQuery(true)
|
||||
->select('COUNT(*)')
|
||||
->from($db->quoteName('#__mokosuite_tickets'))
|
||||
->where($db->quoteName('priority_id') . ' = ' . $id)
|
||||
);
|
||||
|
||||
if ((int) $db->loadResult() > 0)
|
||||
{
|
||||
return ['status' => 'error', 'message' => 'Cannot delete — priority is in use by tickets'];
|
||||
}
|
||||
|
||||
$db->setQuery(
|
||||
$db->getQuery(true)
|
||||
->delete($db->quoteName('#__mokosuite_ticket_priorities'))
|
||||
->where($db->quoteName('id') . ' = ' . $id)
|
||||
)->execute();
|
||||
|
||||
return ['status' => 'ok', 'message' => 'Priority deleted'];
|
||||
}
|
||||
|
||||
// ==================================================================
|
||||
// Akeeba Ticket System Importer
|
||||
// ==================================================================
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
||||
*
|
||||
* SPDX-LICENSE-IDENTIFIER: GPL-3.0-or-later
|
||||
*
|
||||
* @package MokoSuite
|
||||
* @subpackage Component
|
||||
*/
|
||||
|
||||
namespace Moko\Component\MokoSuite\Administrator\View\Ticketsettings;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
protected $statuses = [];
|
||||
protected $priorities = [];
|
||||
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$model = $this->getModel('Tickets');
|
||||
|
||||
$this->statuses = $model->getStatuses();
|
||||
$this->priorities = $model->getPriorities();
|
||||
|
||||
$this->addToolbar();
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
protected function addToolbar(): void
|
||||
{
|
||||
ToolbarHelper::title(Text::_('COM_MOKOSUITE_TICKET_SETTINGS'), 'cog');
|
||||
ToolbarHelper::back('JTOOLBAR_BACK', 'index.php?option=com_mokosuite&view=tickets');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@@ -0,0 +1,203 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
||||
*
|
||||
* SPDX-LICENSE-IDENTIFIER: GPL-3.0-or-later
|
||||
*
|
||||
* @package MokoSuite
|
||||
* @subpackage Component
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\HTML\HTMLHelper;
|
||||
use Joomla\CMS\Router\Route;
|
||||
use Joomla\CMS\Session\Session;
|
||||
|
||||
$token = Session::getFormToken();
|
||||
|
||||
$colorOptions = [
|
||||
'bg-primary', 'bg-secondary', 'bg-success', 'bg-danger',
|
||||
'bg-warning text-dark', 'bg-info text-dark', 'bg-dark', 'bg-light text-dark',
|
||||
];
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<!-- Statuses -->
|
||||
<div class="col-lg-6">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<strong><span class="fa-solid fa-circle-dot"></span> Ticket Statuses</strong>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-striped mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th class="w-10 text-center">Color</th>
|
||||
<th class="w-10 text-center">Default</th>
|
||||
<th class="w-10 text-center">Closed?</th>
|
||||
<th class="w-10 text-center">Order</th>
|
||||
<th class="w-10 text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($this->statuses as $s): ?>
|
||||
<tr>
|
||||
<td><?php echo $this->escape($s->title); ?> <small class="text-muted">(<?php echo $this->escape($s->alias); ?>)</small></td>
|
||||
<td class="text-center"><span class="badge <?php echo $this->escape($s->color); ?>"> </span></td>
|
||||
<td class="text-center"><?php echo $s->is_default ? '<span class="badge bg-success">Yes</span>' : ''; ?></td>
|
||||
<td class="text-center"><?php echo $s->is_closed ? '<span class="badge bg-dark">Closed</span>' : ''; ?></td>
|
||||
<td class="text-center"><?php echo (int) $s->ordering; ?></td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-sm btn-outline-primary" onclick="editStatus(<?php echo htmlspecialchars(json_encode($s)); ?>)">
|
||||
<span class="icon-pencil"></span>
|
||||
</button>
|
||||
<a href="<?php echo Route::_('index.php?option=com_mokosuite&task=display.deleteStatus&id=' . $s->id . '&' . $token . '=1'); ?>"
|
||||
class="btn btn-sm btn-outline-danger"
|
||||
onclick="return confirm('Delete this status?')">
|
||||
<span class="icon-trash"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<form method="post" action="<?php echo Route::_('index.php?option=com_mokosuite&task=display.saveStatus'); ?>" id="statusForm" class="row g-2 align-items-end">
|
||||
<input type="hidden" name="id" id="status-id" value="0">
|
||||
<div class="col-md-3">
|
||||
<label class="form-label small">Title</label>
|
||||
<input type="text" name="title" id="status-title" class="form-control form-control-sm" required>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label class="form-label small">Alias</label>
|
||||
<input type="text" name="alias" id="status-alias" class="form-control form-control-sm">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label class="form-label small">Color</label>
|
||||
<select name="color" id="status-color" class="form-select form-select-sm">
|
||||
<?php foreach ($colorOptions as $c): ?>
|
||||
<option value="<?php echo $c; ?>"><?php echo $c; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<label class="form-label small">Order</label>
|
||||
<input type="number" name="ordering" id="status-ordering" class="form-control form-control-sm" value="0">
|
||||
</div>
|
||||
<div class="col-md-1 text-center">
|
||||
<label class="form-label small">Default</label>
|
||||
<input type="checkbox" name="is_default" id="status-default" value="1" class="form-check-input">
|
||||
</div>
|
||||
<div class="col-md-1 text-center">
|
||||
<label class="form-label small">Closed</label>
|
||||
<input type="checkbox" name="is_closed" id="status-closed" value="1" class="form-check-input">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="hidden" name="<?php echo $token; ?>" value="1">
|
||||
<button type="submit" class="btn btn-sm btn-primary w-100" id="status-btn">Add</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Priorities -->
|
||||
<div class="col-lg-6">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<strong><span class="fa-solid fa-flag"></span> Ticket Priorities</strong>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-striped mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th class="w-10 text-center">Color</th>
|
||||
<th class="w-10 text-center">Default</th>
|
||||
<th class="w-10 text-center">Order</th>
|
||||
<th class="w-10 text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($this->priorities as $p): ?>
|
||||
<tr>
|
||||
<td><?php echo $this->escape($p->title); ?> <small class="text-muted">(<?php echo $this->escape($p->alias); ?>)</small></td>
|
||||
<td class="text-center"><span class="badge <?php echo $this->escape($p->color); ?>"> </span></td>
|
||||
<td class="text-center"><?php echo $p->is_default ? '<span class="badge bg-success">Yes</span>' : ''; ?></td>
|
||||
<td class="text-center"><?php echo (int) $p->ordering; ?></td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-sm btn-outline-primary" onclick="editPriority(<?php echo htmlspecialchars(json_encode($p)); ?>)">
|
||||
<span class="icon-pencil"></span>
|
||||
</button>
|
||||
<a href="<?php echo Route::_('index.php?option=com_mokosuite&task=display.deletePriority&id=' . $p->id . '&' . $token . '=1'); ?>"
|
||||
class="btn btn-sm btn-outline-danger"
|
||||
onclick="return confirm('Delete this priority?')">
|
||||
<span class="icon-trash"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<form method="post" action="<?php echo Route::_('index.php?option=com_mokosuite&task=display.savePriority'); ?>" id="priorityForm" class="row g-2 align-items-end">
|
||||
<input type="hidden" name="id" id="priority-id" value="0">
|
||||
<div class="col-md-3">
|
||||
<label class="form-label small">Title</label>
|
||||
<input type="text" name="title" id="priority-title" class="form-control form-control-sm" required>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label class="form-label small">Alias</label>
|
||||
<input type="text" name="alias" id="priority-alias" class="form-control form-control-sm">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label class="form-label small">Color</label>
|
||||
<select name="color" id="priority-color" class="form-select form-select-sm">
|
||||
<?php foreach ($colorOptions as $c): ?>
|
||||
<option value="<?php echo $c; ?>"><?php echo $c; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<label class="form-label small">Order</label>
|
||||
<input type="number" name="ordering" id="priority-ordering" class="form-control form-control-sm" value="0">
|
||||
</div>
|
||||
<div class="col-md-1 text-center">
|
||||
<label class="form-label small">Default</label>
|
||||
<input type="checkbox" name="is_default" id="priority-default" value="1" class="form-check-input">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="hidden" name="<?php echo $token; ?>" value="1">
|
||||
<button type="submit" class="btn btn-sm btn-primary w-100" id="priority-btn">Add</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function editStatus(s) {
|
||||
document.getElementById('status-id').value = s.id;
|
||||
document.getElementById('status-title').value = s.title;
|
||||
document.getElementById('status-alias').value = s.alias;
|
||||
document.getElementById('status-color').value = s.color;
|
||||
document.getElementById('status-ordering').value = s.ordering;
|
||||
document.getElementById('status-default').checked = !!parseInt(s.is_default);
|
||||
document.getElementById('status-closed').checked = !!parseInt(s.is_closed);
|
||||
document.getElementById('status-btn').textContent = 'Update';
|
||||
}
|
||||
function editPriority(p) {
|
||||
document.getElementById('priority-id').value = p.id;
|
||||
document.getElementById('priority-title').value = p.title;
|
||||
document.getElementById('priority-alias').value = p.alias;
|
||||
document.getElementById('priority-color').value = p.color;
|
||||
document.getElementById('priority-ordering').value = p.ordering;
|
||||
document.getElementById('priority-default').checked = !!parseInt(p.is_default);
|
||||
document.getElementById('priority-btn').textContent = 'Update';
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
Reference in New Issue
Block a user