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