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