Timeout form fields now supported. Backbone.JS Validation error handling updates.

pull/105/merge
Michael Jett 2012-05-17 17:15:37 -04:00
parent ad9874d4eb
commit a1234a4fcd
2 changed files with 30 additions and 7 deletions

View File

@ -31,6 +31,14 @@
},
registeredRedirectUri: {
custom: 'validateURI'
},
accessTokenTimeout: {
required: true,
type:"number"
},
refreshTokenTimeout: {
required: true,
type:"number"
}
},
@ -57,7 +65,9 @@
authorities:[],
clientDescription:"",
clientId:null,
allowRefresh:false
allowRefresh:false,
accessTokenTimeout: 0,
refreshTokenTimeout: 0
},
urlRoot:"api/clients"
@ -115,6 +125,8 @@
});
}
});
app.clientListView.delegateEvents();
return false;
},
@ -177,12 +189,17 @@
clientName:$('#clientName input').val(),
registeredRedirectUri:[$('#registeredRedirectUri input').val()],
clientDescription:$('#clientDescription textarea').val(),
allowRefresh:$('#allowRefresh').is(':checked')
allowRefresh:$('#allowRefresh').is(':checked'),
accessTokenTimeout: $('#accessTokenTimeout input').val(),
refreshTokenTimeout: $('#refreshTokenTimeout input').val()
});
this.model.save(this.model, {
success:function () {
app.navigate('clients', {trigger: true});
},
error:function() {
}
});
@ -191,6 +208,9 @@
app.clientList.create(this.model, {
success:function () {
app.navigate('clients', {trigger: true});
},
error:function() {
}
});
@ -237,6 +257,7 @@
list:function () {
$('#content').html(this.clientListView.render().el);
this.clientListView.delegateEvents();
},
newClient:function() {

View File

@ -170,29 +170,31 @@
</div>
<div class="span4 control-group">
<div class="span4">
<span class="control-group" id="accessTokenTimeout">
<label class="control-label" for="access-token-timeout-seconds" style="">Access Token
Timeout</label>
<div class="controls form-horizontal" style="">
<div class="input-append">
<input type="text" class="" id="access-token-timeout-seconds" size="16"><span
<input type="text" class="" value="<%=accessTokenTimeout%>" id="access-token-timeout-seconds" size="16"><span
class="add-on">seconds</span>
</div>
<span class="help-inline">Here's more help text</span>
</div>
</span>
<span class="control-group" id="refreshTokenTimeout">
<label class="control-label" for="refresh-token-timeout-seconds" style="">Refresh Token
Timeout</label>
<div class="controls form-horizontal" style="">
<div class="input-append">
<input type="text" class="" id="refresh-token-timeout-seconds" size="16"><span
<input type="text" class="" value="<%=refreshTokenTimeout%>" id="refresh-token-timeout-seconds" size="16"><span
class="add-on">seconds</span>
</div>
<span class="help-inline">Here's more help text</span>
</div>
</span>
</div>