Added logoURL stuff
parent
42389286e4
commit
b58ed8b616
|
@ -26,8 +26,21 @@
|
|||
|
||||
<form name="confirmationForm" style="display:inline" action="<%=request.getContextPath()%>/oauth/authorize"
|
||||
method="post">
|
||||
|
||||
<div class="row">
|
||||
<div class="span4 offset2 well-small" style="text-align:left">Do you authorize
|
||||
<div class="span4 offset2 well-small" style="text-align:left">
|
||||
<c:choose>
|
||||
<c:when test="${empty client.logoUrl }">
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<ul class="thumbnails">
|
||||
<li class="span4">
|
||||
<div class="thumbnail"><img src="${client.logoUrl }"/></div>
|
||||
</li>
|
||||
</ul>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
Do you authorize
|
||||
"<c:choose>
|
||||
<c:when test="${empty client.applicationName}">
|
||||
<c:out value="${client.clientId}"/>
|
||||
|
|
|
@ -168,6 +168,7 @@
|
|||
scope:["openid"],
|
||||
authorities:[],
|
||||
clientDescription:"",
|
||||
logoUrl:"",
|
||||
clientId:"",
|
||||
allowRefresh:false,
|
||||
accessTokenValiditySeconds: 0,
|
||||
|
@ -334,7 +335,18 @@
|
|||
"click .btn-cancel": function() { window.history.back(); return false; },
|
||||
"change #requireClientSecret":"toggleRequireClientSecret",
|
||||
"change #displayClientSecret":"toggleDisplayClientSecret",
|
||||
"change #generateClientSecret":"toggleGenerateClientSecret"
|
||||
"change #generateClientSecret":"toggleGenerateClientSecret",
|
||||
"change #logoUrl input":"previewLogo"
|
||||
},
|
||||
|
||||
previewLogo:function(event) {
|
||||
if ($('#logoUrl input').val()) {
|
||||
//$('#logoBlock').show();
|
||||
$('#logoPreview').empty();
|
||||
$('#logoPreview').append('<img src="' + $('#logoUrl input').val() + '"/>');
|
||||
} else {
|
||||
//$('#logoBlock').hide();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -420,6 +432,7 @@
|
|||
generateClientSecret:generateClientSecret,
|
||||
registeredRedirectUri: this.registeredRedirectUriCollection.pluck("item"),
|
||||
clientDescription:$('#clientDescription textarea').val(),
|
||||
logoUrl:$('#logoUrl input').val(),
|
||||
allowRefresh:$('#allowRefresh').is(':checked'),
|
||||
authorizedGrantTypes: authorizedGrantTypes,
|
||||
accessTokenValiditySeconds: $('#accessTokenValiditySeconds input').val(),
|
||||
|
@ -449,6 +462,19 @@
|
|||
|
||||
$(this.el).html(this.template(this.model.toJSON()));
|
||||
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
postRender:function() {
|
||||
this.toggleRequireClientSecret();
|
||||
this.previewLogo();
|
||||
}
|
||||
});
|
||||
|
||||
var URLListView = Backbone.View.extend({
|
||||
|
||||
|
||||
var _self = this;
|
||||
|
||||
// build and bind registered redirect URI collection and view
|
||||
|
|
|
@ -82,6 +82,23 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group" id="logoUrl">
|
||||
<label class="control-label">Logo URL</label>
|
||||
<div class="controls">
|
||||
<input placeholder="http://" value="<%=logoUrl%>" maxlength="100" type="text" class=""/>
|
||||
<p class="help-block">URL to use for a logo image</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">Refresh Tokens</label>
|
||||
<div class="controls">
|
||||
|
|
Loading…
Reference in New Issue