client id and (sometimes) secret shown on save, addresses #517
parent
d12751a5b6
commit
b9d684fe1a
|
@ -5,14 +5,14 @@
|
|||
<o:topbar pageName="Home" />
|
||||
|
||||
<!-- Modal dialogue for management UI -->
|
||||
<div id="modalAlert" class="modal hide fade" role="dialog">
|
||||
<div id="modalAlert" class="modal hide fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modalAlert">×</button>
|
||||
<h3 id="myModalLabel">Modal header</h3>
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h3 id="modalAlertLabel"></h3>
|
||||
</div>
|
||||
<div class="modal-body"></div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" data-dismiss="modalAlert">OK</button>
|
||||
<button class="btn btn-primary" data-dismiss="modal">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -278,6 +278,10 @@ var ClientFormView = Backbone.View.extend({
|
|||
if (!this.template) {
|
||||
this.template = _.template($('#tmpl-client-form').html());
|
||||
}
|
||||
|
||||
if (!this.clientSavedTemplate) {
|
||||
this.clientSavedTemplate = _.template($('#tmpl-client-saved').html());
|
||||
}
|
||||
|
||||
this.redirectUrisCollection = new Backbone.Collection();
|
||||
this.scopeCollection = new Backbone.Collection();
|
||||
|
@ -556,7 +560,9 @@ var ClientFormView = Backbone.View.extend({
|
|||
this.model.save(attrs, {
|
||||
success:function () {
|
||||
|
||||
$('#modalAlert div.modal-body').html('Client Saved');
|
||||
$('#modalAlertLabel').html('Client Saved');
|
||||
|
||||
$('#modalAlert .modal-body').html(_self.clientSavedTemplate(_self.model.toJSON()));
|
||||
|
||||
$('#modalAlert').modal({
|
||||
'backdrop': 'static',
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
</div>
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/html" id="tmpl-client-form">
|
||||
|
||||
<h1><%=(id == null ? 'New' : 'Edit')%> Client</h1>
|
||||
|
@ -648,3 +647,21 @@
|
|||
</form>
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="tmpl-client-saved">
|
||||
|
||||
<div>
|
||||
<strong>ID:</strong> <code><%= clientId %></code>
|
||||
</div>
|
||||
<% if (generateClientSecret && clientSecret != null && clientSecret != '') { %>
|
||||
<div>
|
||||
<strong>Secret:</strong> <code><%= clientSecret %></code>
|
||||
</div>
|
||||
<% } else { %>
|
||||
<div>
|
||||
<strong>Secret:</strong> <i>unchanged</i>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue