added support for help blocks on list widget views
parent
cc02f8fbe8
commit
da9c8bdee5
|
@ -132,7 +132,7 @@ var ListWidgetChildView = Backbone.View.extend({
|
||||||
|
|
||||||
var ListWidgetView = Backbone.View.extend({
|
var ListWidgetView = Backbone.View.extend({
|
||||||
|
|
||||||
tagName: "table",
|
tagName: "div",
|
||||||
|
|
||||||
childView:ListWidgetChildView,
|
childView:ListWidgetChildView,
|
||||||
|
|
||||||
|
@ -155,7 +155,6 @@ var ListWidgetView = Backbone.View.extend({
|
||||||
this.template = _.template($('#tmpl-list-widget').html());
|
this.template = _.template($('#tmpl-list-widget').html());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$el.addClass("table table-condensed table-hover table-striped span4");
|
|
||||||
this.collection.bind('add', this.render, this);
|
this.collection.bind('add', this.render, this);
|
||||||
this.collection.bind('remove', this.render, this);
|
this.collection.bind('remove', this.render, this);
|
||||||
},
|
},
|
||||||
|
@ -193,7 +192,8 @@ var ListWidgetView = Backbone.View.extend({
|
||||||
|
|
||||||
render:function (eventName) {
|
render:function (eventName) {
|
||||||
|
|
||||||
this.$el.html(this.template({placeholder:this.options.placeholder}));
|
this.$el.html(this.template({placeholder:this.options.placeholder,
|
||||||
|
helpBlockText:this.options.helpBlockText}));
|
||||||
|
|
||||||
// bind autocomplete options
|
// bind autocomplete options
|
||||||
if (this.options.autocomplete) {
|
if (this.options.autocomplete) {
|
||||||
|
|
|
@ -1036,6 +1036,7 @@ var ClientFormView = Backbone.View.extend({
|
||||||
|
|
||||||
var contactsView = new ListWidgetView({
|
var contactsView = new ListWidgetView({
|
||||||
placeholder: $.t("client.client-form.contacts-placeholder"),
|
placeholder: $.t("client.client-form.contacts-placeholder"),
|
||||||
|
helpBlockText: $.t("client.client-form.contacts-help"),
|
||||||
collection: this.contactsCollection});
|
collection: this.contactsCollection});
|
||||||
$("#contacts .controls", this.el).html(contactsView.render().el);
|
$("#contacts .controls", this.el).html(contactsView.render().el);
|
||||||
this.listWidgetViews.push(contactsView);
|
this.listWidgetViews.push(contactsView);
|
||||||
|
@ -1061,6 +1062,7 @@ var ClientFormView = Backbone.View.extend({
|
||||||
var requestUriView = new ListWidgetView({
|
var requestUriView = new ListWidgetView({
|
||||||
type: 'uri',
|
type: 'uri',
|
||||||
placeholder: 'https://',
|
placeholder: 'https://',
|
||||||
|
helpBlockText: $.t('client.client-form.request-uri-help'),
|
||||||
collection: this.requestUrisCollection});
|
collection: this.requestUrisCollection});
|
||||||
$('#requestUris .controls', this.el).html(requestUriView.render().el);
|
$('#requestUris .controls', this.el).html(requestUriView.render().el);
|
||||||
this.listWidgetViews.push(requestUriView);
|
this.listWidgetViews.push(requestUriView);
|
||||||
|
|
|
@ -110,6 +110,7 @@
|
||||||
"registration-token-error": "There was a problem loading the registration access token for this client.",
|
"registration-token-error": "There was a problem loading the registration access token for this client.",
|
||||||
"request-object-signing-algorithm": "Request Object Signing Algorithm",
|
"request-object-signing-algorithm": "Request Object Signing Algorithm",
|
||||||
"request-uri": "Request URIs",
|
"request-uri": "Request URIs",
|
||||||
|
"request-uri-help": "URIs containing request objects used by this client",
|
||||||
"require-auth-time": "Require Authentication Time",
|
"require-auth-time": "Require Authentication Time",
|
||||||
"require-auth-time-label": "Always require that the auth_time claim be sent in the id token",
|
"require-auth-time-label": "Always require that the auth_time claim be sent in the id token",
|
||||||
"response-types": "Response Types",
|
"response-types": "Response Types",
|
||||||
|
|
|
@ -39,15 +39,22 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="tmpl-list-widget">
|
<script type="text/html" id="tmpl-list-widget">
|
||||||
|
<div class="control-group">
|
||||||
|
<table class="table table-condensed table-hover table-striped span4">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="control-group">
|
<th>
|
||||||
<input type="text" value="" placeholder="<%-(placeholder) ? placeholder : ''%>"></th>
|
<input type="text" value="" placeholder="<%-(placeholder) ? placeholder : ''%>"></th>
|
||||||
<th><a class="btn btn-small btn-add-list-item" href="#"><i class="icon-plus-sign"></i></a></th>
|
<th><a class="btn btn-small btn-add-list-item" href="#"><i class="icon-plus-sign"></i></a></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<% if (typeof(helpBlockText) !== 'undefined') { %>
|
||||||
|
<p class="help-block"><%-helpBlockText%></p>
|
||||||
|
<% } %>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue