Timeout form fields now supported. Backbone.JS Validation error handling updates.
parent
ad9874d4eb
commit
a1234a4fcd
|
@ -31,6 +31,14 @@
|
||||||
},
|
},
|
||||||
registeredRedirectUri: {
|
registeredRedirectUri: {
|
||||||
custom: 'validateURI'
|
custom: 'validateURI'
|
||||||
|
},
|
||||||
|
accessTokenTimeout: {
|
||||||
|
required: true,
|
||||||
|
type:"number"
|
||||||
|
},
|
||||||
|
refreshTokenTimeout: {
|
||||||
|
required: true,
|
||||||
|
type:"number"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -57,7 +65,9 @@
|
||||||
authorities:[],
|
authorities:[],
|
||||||
clientDescription:"",
|
clientDescription:"",
|
||||||
clientId:null,
|
clientId:null,
|
||||||
allowRefresh:false
|
allowRefresh:false,
|
||||||
|
accessTokenTimeout: 0,
|
||||||
|
refreshTokenTimeout: 0
|
||||||
},
|
},
|
||||||
|
|
||||||
urlRoot:"api/clients"
|
urlRoot:"api/clients"
|
||||||
|
@ -115,6 +125,8 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.clientListView.delegateEvents();
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -177,12 +189,17 @@
|
||||||
clientName:$('#clientName input').val(),
|
clientName:$('#clientName input').val(),
|
||||||
registeredRedirectUri:[$('#registeredRedirectUri input').val()],
|
registeredRedirectUri:[$('#registeredRedirectUri input').val()],
|
||||||
clientDescription:$('#clientDescription textarea').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, {
|
this.model.save(this.model, {
|
||||||
success:function () {
|
success:function () {
|
||||||
app.navigate('clients', {trigger: true});
|
app.navigate('clients', {trigger: true});
|
||||||
|
},
|
||||||
|
error:function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -191,6 +208,9 @@
|
||||||
app.clientList.create(this.model, {
|
app.clientList.create(this.model, {
|
||||||
success:function () {
|
success:function () {
|
||||||
app.navigate('clients', {trigger: true});
|
app.navigate('clients', {trigger: true});
|
||||||
|
},
|
||||||
|
error:function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -237,6 +257,7 @@
|
||||||
list:function () {
|
list:function () {
|
||||||
|
|
||||||
$('#content').html(this.clientListView.render().el);
|
$('#content').html(this.clientListView.render().el);
|
||||||
|
this.clientListView.delegateEvents();
|
||||||
},
|
},
|
||||||
|
|
||||||
newClient:function() {
|
newClient:function() {
|
||||||
|
|
|
@ -170,29 +170,31 @@
|
||||||
|
|
||||||
</div>
|
</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
|
<label class="control-label" for="access-token-timeout-seconds" style="">Access Token
|
||||||
Timeout</label>
|
Timeout</label>
|
||||||
|
|
||||||
<div class="controls form-horizontal" style="">
|
<div class="controls form-horizontal" style="">
|
||||||
<div class="input-append">
|
<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>
|
class="add-on">seconds</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="help-inline">Here's more help text</span>
|
<span class="help-inline">Here's more help text</span>
|
||||||
</div>
|
</div>
|
||||||
|
</span>
|
||||||
|
<span class="control-group" id="refreshTokenTimeout">
|
||||||
<label class="control-label" for="refresh-token-timeout-seconds" style="">Refresh Token
|
<label class="control-label" for="refresh-token-timeout-seconds" style="">Refresh Token
|
||||||
Timeout</label>
|
Timeout</label>
|
||||||
|
|
||||||
<div class="controls form-horizontal" style="">
|
<div class="controls form-horizontal" style="">
|
||||||
<div class="input-append">
|
<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>
|
class="add-on">seconds</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="help-inline">Here's more help text</span>
|
<span class="help-inline">Here's more help text</span>
|
||||||
</div>
|
</div>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue