From 8a2a829bac5d30de7319536e27910a9259899552 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Wed, 3 Dec 2014 11:10:23 -0500 Subject: [PATCH] Fixed reset on custom inv form Instead of clearing the form we reset it to the values in the API --- awx/ui/static/js/helpers/CustomInventory.js | 4 ++++ awx/ui/static/js/lists/CustomInventory.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/awx/ui/static/js/helpers/CustomInventory.js b/awx/ui/static/js/helpers/CustomInventory.js index 896d840e70..5dc7489e1b 100644 --- a/awx/ui/static/js/helpers/CustomInventory.js +++ b/awx/ui/static/js/helpers/CustomInventory.js @@ -320,6 +320,10 @@ function($compile, CustomInventoryList, Rest, Wait, GenerateList, CustomInventor scope.formReset = function () { generator.reset(); + //$('#forks-slider').slider("option", "value", $scope.forks); + for (var fld in master) { + scope[fld] = master[fld]; + } }; }; }]); diff --git a/awx/ui/static/js/lists/CustomInventory.js b/awx/ui/static/js/lists/CustomInventory.js index b1be6c4ea2..10e8dbb746 100644 --- a/awx/ui/static/js/lists/CustomInventory.js +++ b/awx/ui/static/js/lists/CustomInventory.js @@ -24,7 +24,7 @@ angular.module('CustomInventoryListDefinition', []) fields: { name: { - key: true, + //key: true, label: 'Name', columnClass: 'col-md-3 col-sm-9 col-xs-9', modalColumnClass: 'col-md-8'