Timeout form updates. Logo URL updates
parent
cb6767dfb4
commit
19df5ae032
|
@ -145,14 +145,6 @@
|
|||
pattern:/^[\w ]+$/,
|
||||
minlength:3,*/
|
||||
maxlength:200
|
||||
},
|
||||
accessTokenValiditySeconds: {
|
||||
required: true,
|
||||
type:"number"
|
||||
},
|
||||
refreshTokenValiditySeconds: {
|
||||
required: true,
|
||||
type:"number"
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -346,9 +338,8 @@
|
|||
|
||||
previewLogo:function(event) {
|
||||
if ($('#logoUrl input').val()) {
|
||||
//$('#logoBlock').show();
|
||||
$('#logoPreview').empty();
|
||||
$('#logoPreview').append('<img src="' + $('#logoUrl input').val() + '"/>');
|
||||
$('#logoPreview').attr('src', $('#logoUrl input').val());
|
||||
} else {
|
||||
//$('#logoBlock').hide();
|
||||
}
|
||||
|
@ -408,6 +399,11 @@
|
|||
$('#clientSecretGenerated').hide();
|
||||
}
|
||||
},
|
||||
|
||||
getFormTokenValue:function(value) {
|
||||
if (value == "") return null;
|
||||
else return value;
|
||||
},
|
||||
|
||||
saveClient:function (event) {
|
||||
|
||||
|
@ -440,12 +436,16 @@
|
|||
logoUrl:$('#logoUrl input').val(),
|
||||
allowRefresh:$('#allowRefresh').is(':checked'),
|
||||
authorizedGrantTypes: authorizedGrantTypes,
|
||||
accessTokenValiditySeconds: $('#accessTokenValiditySeconds input').val(),
|
||||
refreshTokenValiditySeconds: $('#refreshTokenValiditySeconds input').val(),
|
||||
idTokenValiditySeconds: $('#idTokenValiditySeconds input').val(),
|
||||
accessTokenValiditySeconds: this.getFormTokenValue($('#accessTokenValiditySeconds input').val()),
|
||||
refreshTokenValiditySeconds: this.getFormTokenValue($('#refreshTokenValiditySeconds input').val()),
|
||||
idTokenValiditySeconds: this.getFormTokenValue($('#idTokenValiditySeconds input').val()),
|
||||
scope: this.scopeCollection.pluck("item")
|
||||
});
|
||||
|
||||
if (this.model.get("allowRefresh") == false) {
|
||||
this.model.set("refreshTokenValiditySeconds",null);
|
||||
}
|
||||
|
||||
if (valid) {
|
||||
|
||||
var _self = this;
|
||||
|
|
|
@ -93,9 +93,7 @@
|
|||
<div class="control-group" id="logoBlock">
|
||||
<label class="control-label">Logo Preview</label>
|
||||
<div class="controls">
|
||||
<ul class="thumbnails">
|
||||
<li class="span3"><div id="logoPreview" class="thumbnail"></div></li>
|
||||
</ul>
|
||||
<img src="http://placehold.it/275x200&text=Enter a logo URL" alt="logo" id="logoPreview" width="275px" class="thumbnail" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -177,10 +175,23 @@
|
|||
Timeout</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="text" class="" value="<%=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>
|
||||
</div>
|
||||
<p class="help-block">Enter this time in seconds</p>
|
||||
<p class="help-block">Enter this time in seconds. Leave blank if the token does not timeout.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="control-group" id="idTokenValiditySeconds">
|
||||
<label class="control-label">ID Token
|
||||
Timeout</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="text" class="" value="<%=(idTokenValiditySeconds == null ? '' : idTokenValiditySeconds)%>" id="id-token-timeout-seconds" size="16"><span
|
||||
class="add-on">seconds</span>
|
||||
</div>
|
||||
<p class="help-block">Enter this time in seconds. Leave blank if the token does not timeout.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -198,22 +209,10 @@
|
|||
Timeout</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="text" class="" value="<%=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>
|
||||
</div>
|
||||
<p class="help-block">Enter this time in seconds</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="idTokenValiditySeconds">
|
||||
<label class="control-label">ID Token
|
||||
Timeout</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="text" class="" value="<%=idTokenValiditySeconds%>" id="id-token-timeout-seconds" size="16"><span
|
||||
class="add-on">seconds</span>
|
||||
</div>
|
||||
<p class="help-block">Enter this time in seconds</p>
|
||||
<p class="help-block">Enter this time in seconds. Leave blank if the token does not timeout.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue