Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
swizzle form model to use a more json-schema like layout
  • Loading branch information
jstrachan committed Mar 27, 2013
1 parent 8baed4c commit 68a38c1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/forms/html/test.html
Expand Up @@ -31,7 +31,7 @@ <h3>Form Testing</h3>
form with inline json config
<div simple-form name='form-with-inline-json-config' action='#/forms/test' method='post' showTypes='false' json='
{
"args": [
"properties": [
{ "desc": "Argument key", "name": "key", "type": "java.lang.String" },
{ "desc": "Argument value", "name": "value", "type": "java.lang.String" },
{ "desc": "Long argument", "name": "longArg", "type": "Long" },
Expand Down
Expand Up @@ -15,7 +15,7 @@ module Forms {
public data:any = {};
public json:any = undefined;

public args = [];
public properties = [];
public action = '';

public formclass = 'form-horizontal no-bottom-margin';
Expand Down Expand Up @@ -123,7 +123,7 @@ module Forms {
fieldset.append(input);
};

config.data.args.forEach(addInput, this);
config.data.properties.forEach(addInput, this);

var group = this.getControlGroup(config, {});
var controlDiv = this.getControlDiv(config);
Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/forms/js/test.ts
Expand Up @@ -9,7 +9,7 @@ module Forms {
}

$scope.setVMOption = {
args: [
properties: [
{
desc: 'Argument key',
name: 'key',
Expand Down
2 changes: 1 addition & 1 deletion hawtio-web/src/main/webapp/app/wiki/js/formTable.ts
Expand Up @@ -64,7 +64,7 @@ module Wiki {
$scope.formDefinition = Wiki.parseJson(text);

var columnDefs = [];
angular.forEach($scope.formDefinition.args, (property) => {
angular.forEach($scope.formDefinition.properties, (property) => {
var name = property.name;
if (name) {
var colDef = {
Expand Down

0 comments on commit 68a38c1

Please sign in to comment.