mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Change type in settings
This commit is contained in:
parent
26a65e5c33
commit
94cfb866d0
@ -1,7 +1,7 @@
|
||||
define(function (require) {
|
||||
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var $ = require('jquery'),
|
||||
_ = require('underscore'),
|
||||
Backbone = require('backbone'),
|
||||
@ -9,10 +9,10 @@ define(function (require) {
|
||||
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",
|
||||
@ -20,9 +20,13 @@ define(function (require) {
|
||||
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) {
|
||||
@ -31,5 +35,5 @@ define(function (require) {
|
||||
}});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -1,16 +1,17 @@
|
||||
define(function (require) {
|
||||
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
var $ = require('jquery'),
|
||||
_ = require('underscore'),
|
||||
Backbone = require('backbone');
|
||||
|
||||
|
||||
return Backbone.Model.extend({
|
||||
defaults: {
|
||||
path: '',
|
||||
type: 'windows',
|
||||
},
|
||||
urlRoot : '/api/settings'
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -5,4 +5,28 @@
|
||||
<input type="text" class="form-control path" id="path" data-field="path" placeholder="Path to ArmA3">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="type" class="col-sm-2 control-label">Type</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="type" data-field="type" id="type-linux" value="linux">
|
||||
Linux
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="type" data-field="type" id="type-windows" value="windows">
|
||||
Windows
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="type" data-field="type" id="type-wine" value="wine">
|
||||
Wine
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user