mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
40 lines
994 B
JavaScript
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();
|
|
}});
|
|
}
|
|
});
|
|
|
|
});
|