Initialize the label and control className for select2 which was missing in the last commit.

pull/27/head
Nagesh Dhope 2020-02-18 10:58:30 +05:30 committed by Akshay Joshi
parent 3e10e2c978
commit 1964e824c8
1 changed files with 6 additions and 1 deletions

View File

@ -2108,6 +2108,11 @@ define([
preserveSelectionOrder: false, preserveSelectionOrder: false,
isDropdownParent: false, isDropdownParent: false,
}, },
// To accept the label and conrol classes while extending control if
// required(e.g. if we want to show label and control in 50-50% or in
//different width of dialog/form) otherwise default classes will be added
controlLabelClassName: Backform.controlLabelClassName,
controlsClassName: Backform.controlsClassName,
}), }),
events: function() { events: function() {
@ -2140,7 +2145,7 @@ define([
'<% if(label == false) {} else {%>', '<% if(label == false) {} else {%>',
' <label class="<%=controlLabelClassName%>" for="<%=cId%>"><%=label%></label>', ' <label class="<%=controlLabelClassName%>" for="<%=cId%>"><%=label%></label>',
'<% }%>', '<% }%>',
'<div class="<%=Backform.controlsClassName%>">', '<div class="<%=controlsClassName%>">',
' <select title="<%=name%>" id="<%=cId%>" class="<%=Backform.controlClassName%> <%=extraClasses.join(\' \')%>"', ' <select title="<%=name%>" id="<%=cId%>" class="<%=Backform.controlClassName%> <%=extraClasses.join(\' \')%>"',
' name="<%=name%>" value="<%-value%>" <%=disabled ? "disabled" : ""%> <%=readonly ? "disabled" : ""%>', ' name="<%=name%>" value="<%-value%>" <%=disabled ? "disabled" : ""%> <%=readonly ? "disabled" : ""%>',
' <%=required ? "required" : ""%><%= select2.multiple ? " multiple>" : ">" %>', ' <%=required ? "required" : ""%><%= select2.multiple ? " multiple>" : ">" %>',