From 952b40da4284d0054116d4cb6b182630ea3c8144 Mon Sep 17 00:00:00 2001 From: Anthony F McInerney Date: Wed, 23 Sep 2020 03:08:43 +0100 Subject: [PATCH] Add service templates --- includes/html/forms/parse-service-template.inc.php | 2 +- includes/html/modal/new_service_template.inc.php | 4 ++-- includes/html/pages/addsrv-template.inc.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/html/forms/parse-service-template.inc.php b/includes/html/forms/parse-service-template.inc.php index 74e5746637..0b5f516b4d 100644 --- a/includes/html/forms/parse-service-template.inc.php +++ b/includes/html/forms/parse-service-template.inc.php @@ -24,8 +24,8 @@ if (is_numeric($service_template_id) && $service_template_id > 0) { $output = [ 'device_group_id' => $service[0]['device_group_id'], 'stype' => $service[0]['service_type'], - 'ip' => $service[0]['service_ip'], 'desc' => $service[0]['service_desc'], + 'ip' => $service[0]['service_ip'], 'param' => $service[0]['service_param'], 'ignore' => $service[0]['service_ignore'], 'disabled' => $service[0]['service_disabled'], diff --git a/includes/html/modal/new_service_template.inc.php b/includes/html/modal/new_service_template.inc.php index cdd76b57bf..00352ae2e5 100644 --- a/includes/html/modal/new_service_template.inc.php +++ b/includes/html/modal/new_service_template.inc.php @@ -100,8 +100,8 @@ $('#create-service-template').on('hide.bs.modal', function (event) { $('#device_group_id').val(''); $('#stype').val(''); $("#stype").prop("disabled", false); - $('#ip').val(''); $('#desc').val(''); + $('#ip').val(''); $('#param').val(''); $('#ignore').val(''); $('#disabled').val(''); @@ -122,8 +122,8 @@ $('#create-service-template').on('show.bs.modal', function (e) { $('#device_group_id').val(output['device_group_id']); $('#stype').val(output['stype']); $("#stype").prop("disabled", true); - $('#ip').val(output['ip']); $('#desc').val(output['desc']); + $('#ip').val(output['ip']); $('#param').val(output['param']); $('#ignore').val(output['ignore']); $('#disabled').val(output['disabled']); diff --git a/includes/html/pages/addsrv-template.inc.php b/includes/html/pages/addsrv-template.inc.php index a1aa0ecfd2..5184daf229 100644 --- a/includes/html/pages/addsrv-template.inc.php +++ b/includes/html/pages/addsrv-template.inc.php @@ -9,7 +9,7 @@ if (! Auth::user()->hasGlobalAdmin()) { if (Auth::user()->hasGlobalAdmin()) { $updated = '1'; - $service_template_id = add_service_template($vars['device_group'], $vars['type'], $vars['descr'], $vars['params'], 0); + $service_template_id = add_service_template($vars['device_group_id'], $vars['type'], $vars['descr'], $vars['ip'], $vars['params'], $vars['ignore'], $vars['disabled'], 0); if ($service_template_id !== null) { $message .= $message_break . 'Service Template added (' . $service_template_id . ')!'; $message_break .= '
';