Add support for inline fieldsets.

This commit is contained in:
Murtuza Zabuawala
2016-03-18 16:54:43 +00:00
committed by Dave Page
parent 8a99282e07
commit 530f58e66b
2 changed files with 33 additions and 0 deletions

View File

@@ -1721,6 +1721,30 @@
template: Backform.Dialog.prototype.template
});
// Backform Tab Control (in bootstrap tabbular)
// A collection of field models.
var PlainFieldsetControl = Backform.PlainFieldsetControl = Backform.FieldsetControl.extend({
initialize: function(opts) {
Backform.FieldsetControl.prototype.initialize.apply(
this, arguments
);
},
template: {
'header': _.template([
'<fieldset class="<%=fieldsetClass%>" <%=disabled ? "disabled" : ""%>>',
' <% if (legend != false) { %>',
' <legend class="<%=legendClass%>" <%=collapse ? "data-toggle=\'collapse\'" : ""%> data-target="#<%=cId%>"><%=collapse ? "<span class=\'caret\'></span>" : "" %></legend>',
' <% } %>',
'</fieldset>'
].join("\n")),
'content': _.template(
' <div id="<%= cId %>" class="<%=contentClass%>"></div>'
)},
fieldsetClass: 'inline-fieldset-without-border',
legend: false,
});
/*
* Control For Code Mirror SQL text area.
*/