Skip to content

Commit

Permalink
Fix for listfields (backend XML element type) for gui mode, so we use
Browse files Browse the repository at this point in the history
full element names not table names.
  • Loading branch information
cheesegrits committed Feb 17, 2014
1 parent 3bded2a commit fca1ec3
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ var ListFieldsElement = new Class({
var list = this.el.getParent().getElement('select');
var v = list.get('value');
if (this.options.addBrackets) {
v = v.replace(/\./, '___');
v = '{' + v + '}';
}
this.insertTextAtCaret(this.el, v);
Expand Down

1 comment on commit fca1ec3

@cheesegrits
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of a bandaid. Ideally, I'd like to add 'labelformat' as well as 'valueformat' as a property, so we can specify id, table name, short element name, long element name or placholder, do all that in the PHP, and the JS just uses whatever is in the menu opts, and doesn't apply any smarts to it.

Please sign in to comment.