Cleans up add platform pages
parent
5327a82685
commit
3c85c16480
|
@ -111,7 +111,9 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
|||
|
||||
switch ($item) {
|
||||
case 'platform':
|
||||
if (isset($action) && $action === 'edit') {
|
||||
if (isset($action) && $action === 'add') {
|
||||
include '../app/templates/config-platform-add.php';
|
||||
} elseif (isset($action) && $action === 'edit') {
|
||||
include '../app/templates/config-platform-edit.php';
|
||||
} elseif (isset($action) && $action === 'delete') {
|
||||
include '../app/templates/config-platform-delete.php';
|
||||
|
@ -156,16 +158,11 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
|||
$jilo_agent_types_in_platform = array_column($jilo_agents_in_platform, 'agent_type_id');
|
||||
include '../app/templates/config-add-agent.php';
|
||||
break;
|
||||
case 'add':
|
||||
include '../app/templates/config-add-platform.php';
|
||||
break;
|
||||
case 'edit':
|
||||
if (isset($_GET['agent'])) {
|
||||
$agentDetails = $agentObject->getAgentDetails($platform_id, $agent);
|
||||
$jilo_agent_types = $agentObject->getAgentTypes();
|
||||
include '../app/templates/config-edit-agent.php';
|
||||
} else {
|
||||
include '../app/templates/config-edit-platform.php';
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<p class="h4 card-header">Add new Jitsi platform</p>
|
||||
<div class="card-body">
|
||||
<!--p class="card-text">add new platform:</p-->
|
||||
<form method="POST" action="<?= htmlspecialchars($app_root) ?>?platform=<?= htmlspecialchars($platform_id) ?>&page=config">
|
||||
<form method="POST" action="<?= htmlspecialchars($app_root) ?>?platform=<?= htmlspecialchars($platform_id) ?>&page=config&item=platform">
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-4 text-end">
|
||||
|
@ -42,7 +42,7 @@
|
|||
<input type="hidden" name="new" value="true" />
|
||||
|
||||
<br />
|
||||
<a class="btn btn-secondary" href="<?= htmlspecialchars($app_root) ?>?page=config" />Cancel</a>
|
||||
<a class="btn btn-secondary" href="<?= htmlspecialchars($app_root) ?>?page=config&item=platform" />Cancel</a>
|
||||
<input type="submit" class="btn btn-primary" value="Save" />
|
||||
</form>
|
||||
</div>
|
Loading…
Reference in New Issue