Timout UI refactor
parent
19df5ae032
commit
26c3cf5989
|
@ -325,6 +325,9 @@
|
||||||
events:{
|
events:{
|
||||||
"click .btn-primary":"saveClient",
|
"click .btn-primary":"saveClient",
|
||||||
"click #allowRefresh" : "toggleRefreshTokenTimeout",
|
"click #allowRefresh" : "toggleRefreshTokenTimeout",
|
||||||
|
"click #disableAccessTokenTimeout" : function(){ $("#access-token-timeout-seconds", this.$el).prop('disabled',!$("#access-token-timeout-seconds", this.$el).prop('disabled')); },
|
||||||
|
"click #disableIDTokenTimeout" : function(){ $("#id-token-timeout-seconds", this.$el).prop('disabled',!$("#id-token-timeout-seconds", this.$el).prop('disabled')); },
|
||||||
|
"click #disableRefreshTokenTimeout" : function(){ $("#refresh-token-timeout-seconds", this.$el).prop('disabled',!$("#refresh-token-timeout-seconds", this.$el).prop('disabled')); },
|
||||||
"click .btn-cancel": function() { window.history.back(); return false; },
|
"click .btn-cancel": function() { window.history.back(); return false; },
|
||||||
"change #requireClientSecret":"toggleRequireClientSecret",
|
"change #requireClientSecret":"toggleRequireClientSecret",
|
||||||
"change #displayClientSecret":"toggleDisplayClientSecret",
|
"change #displayClientSecret":"toggleDisplayClientSecret",
|
||||||
|
@ -367,7 +370,7 @@
|
||||||
* @param event
|
* @param event
|
||||||
*/
|
*/
|
||||||
toggleGenerateClientSecret:function(event) {
|
toggleGenerateClientSecret:function(event) {
|
||||||
|
|
||||||
if ($('#generateClientSecret input').is(':checked')) {
|
if ($('#generateClientSecret input').is(':checked')) {
|
||||||
// show the "generated" block, hide the "display" checkbox
|
// show the "generated" block, hide the "display" checkbox
|
||||||
$('#displayClientSecret').hide();
|
$('#displayClientSecret').hide();
|
||||||
|
@ -446,6 +449,18 @@
|
||||||
this.model.set("refreshTokenValiditySeconds",null);
|
this.model.set("refreshTokenValiditySeconds",null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($('#disableIDTokenTimeout').is(':checked')) {
|
||||||
|
this.model.set("idTokenValiditySeconds",null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($('#disableAccessTokenTimeout').is(':checked')) {
|
||||||
|
this.model.set("accessTokenValiditySeconds",null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($('#disableRefreshTokenTimeout').is(':checked')) {
|
||||||
|
this.model.set("refreshTokenValiditySeconds",null);
|
||||||
|
}
|
||||||
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
||||||
var _self = this;
|
var _self = this;
|
||||||
|
@ -492,6 +507,19 @@
|
||||||
$("#refreshTokenValiditySeconds", this.$el).hide();
|
$("#refreshTokenValiditySeconds", this.$el).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.model.get("accessTokenValiditySeconds")) {
|
||||||
|
$("#access-token-timeout-seconds", this.$el).prop('disabled',true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.model.get("refreshTokenValiditySeconds")) {
|
||||||
|
$("#refresh-token-timeout-seconds", this.$el).prop('disabled',true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.model.get("idTokenValiditySeconds")) {
|
||||||
|
$("#id-token-timeout-seconds", this.$el).prop('disabled',true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -177,8 +177,9 @@
|
||||||
<div class="input-append">
|
<div class="input-append">
|
||||||
<input type="text" class="" value="<%=(accessTokenValiditySeconds == null ? '' : accessTokenValiditySeconds)%>" id="access-token-timeout-seconds" size="16"><span
|
<input type="text" class="" value="<%=(accessTokenValiditySeconds == null ? '' : accessTokenValiditySeconds)%>" id="access-token-timeout-seconds" size="16"><span
|
||||||
class="add-on">seconds</span>
|
class="add-on">seconds</span>
|
||||||
|
<input type="checkbox" id="disableAccessTokenTimeout" <%=(accessTokenValiditySeconds == null ? 'checked' : '')%>/> disable?
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block">Enter this time in seconds. Leave blank if the token does not timeout.</p>
|
<p class="help-block">Enter this time in seconds.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -190,8 +191,9 @@
|
||||||
<div class="input-append">
|
<div class="input-append">
|
||||||
<input type="text" class="" value="<%=(idTokenValiditySeconds == null ? '' : idTokenValiditySeconds)%>" id="id-token-timeout-seconds" size="16"><span
|
<input type="text" class="" value="<%=(idTokenValiditySeconds == null ? '' : idTokenValiditySeconds)%>" id="id-token-timeout-seconds" size="16"><span
|
||||||
class="add-on">seconds</span>
|
class="add-on">seconds</span>
|
||||||
|
<input type="checkbox" id="disableIDTokenTimeout" <%=(idTokenValiditySeconds == null ? 'checked' : '')%>/> disable?
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block">Enter this time in seconds. Leave blank if the token does not timeout.</p>
|
<p class="help-block">Enter this time in seconds.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -211,8 +213,9 @@
|
||||||
<div class="input-append">
|
<div class="input-append">
|
||||||
<input type="text" class="" value="<%=(refreshTokenValiditySeconds == null ? '' : refreshTokenValiditySeconds)%>" id="refresh-token-timeout-seconds" size="16"><span
|
<input type="text" class="" value="<%=(refreshTokenValiditySeconds == null ? '' : refreshTokenValiditySeconds)%>" id="refresh-token-timeout-seconds" size="16"><span
|
||||||
class="add-on">seconds</span>
|
class="add-on">seconds</span>
|
||||||
|
<input type="checkbox" id="disableRefreshTokenTimeout" <%=(refreshTokenValiditySeconds == null ? 'checked' : '')%>/> disable?
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block">Enter this time in seconds. Leave blank if the token does not timeout.</p>
|
<p class="help-block">Enter this time in seconds.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue