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 .= '
';