Change type in settings

This commit is contained in:
Björn Dahlgren 2014-04-07 01:46:06 +02:00
parent 26a65e5c33
commit 94cfb866d0
3 changed files with 42 additions and 13 deletions

View File

@ -20,7 +20,11 @@ define(function (require) {
validations: { validations: {
email: "Please enter a valid path." email: "Please enter a valid path."
} }
} },
type: {
el: ".type",
required: "Please choose a valid type."
},
}, },
initialize: function () { initialize: function () {

View File

@ -9,6 +9,7 @@ define(function (require) {
return Backbone.Model.extend({ return Backbone.Model.extend({
defaults: { defaults: {
path: '', path: '',
type: 'windows',
}, },
urlRoot : '/api/settings' urlRoot : '/api/settings'
}); });

View File

@ -5,4 +5,28 @@
<input type="text" class="form-control path" id="path" data-field="path" placeholder="Path to ArmA3"> <input type="text" class="form-control path" id="path" data-field="path" placeholder="Path to ArmA3">
</div> </div>
</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> </form>