Created
June 4, 2013 15:37
-
-
Save m-vdb/5706897 to your computer and use it in GitHub Desktop.
Param form (Backbone.Form)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ParamForm = window.Interface.BaseForm.extend({ | |
initialize: function(options){ | |
options.schema = { | |
client_name: {type: 'Text', title: 'Client Name', validators: ['required'], editorClass: 'client_name'}, | |
name: {type: 'Text', title: 'Short Name', editorClass: 'name', fieldClass: 'hidden'}, | |
urls: {type: 'List', title: 'Source urls', validators: ['url']}, | |
exporters: {type: 'List', title: 'Facebook Pages', itemType: 'InlineObject', validators: [this.validateListExporter], | |
subSchema: { | |
name: {type: 'Text', title: 'Name', validators: ['required']}, | |
exporter: {type: 'Exporter', title: 'Type', | |
options: window.Interface.exporterCollection}, | |
parameters: {type: 'Object', title: '', subSchema: { | |
facebook_page_id: {type: 'Text', title: 'Page Id', validators: ['required']}, | |
config_password: {type: 'Text', title: 'API Secret'}, | |
'config/tracking': {type: 'Text', title: 'Tracking Code'} | |
}} | |
}} | |
}; | |
Backbone.Form.prototype.initialize.call(this, options); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment