arma-server-web-admin/public/js/app/forms/settings.js
2014-04-07 01:46:06 +02:00

40 lines
994 B
JavaScript

define(function (require) {
"use strict";
var $ = require('jquery'),
_ = require('underscore'),
Backbone = require('backbone'),
Marionette = require('marionette'),
FormView = require('marionette-formview'),
Settings = require('app/models/settings'),
tpl = require('text!tpl/forms/settings.html');
return FormView.extend({
template: _.template(tpl),
fields: {
path: {
el: ".path",
required: "Please enter a valid path.",
validations: {
email: "Please enter a valid path."
}
},
type: {
el: ".type",
required: "Please choose a valid type."
},
},
initialize: function () {
var self = this;
new Settings().fetch({success: function (model, response, options) {
self.model = model;
self.runInitializers();
}});
}
});
});