[DE] Add "required' option for all forms except picture

This commit is contained in:
Julia Radzhabova 2021-05-20 12:47:12 +03:00
parent fa803d0f4a
commit 0068a7d225
2 changed files with 7 additions and 5 deletions

View file

@ -62,11 +62,6 @@
<div id="form-color-btn" style="display: inline-block; float: right;"></div> <div id="form-color-btn" style="display: inline-block; float: right;"></div>
</td> </td>
</tr> </tr>
<tr class="form-textfield">
<td class="padding-large">
<div id="form-chb-required"></div>
</td>
</tr>
<tr class="form-image"> <tr class="form-image">
<td class="padding-large"> <td class="padding-large">
<div id="form-button-replace" style="width:100%;"></div> <div id="form-button-replace" style="width:100%;"></div>
@ -99,6 +94,11 @@
</tr> </tr>
</table> </table>
<table cols="1"> <table cols="1">
<tr class="required">
<td class="padding-large">
<div id="form-chb-required"></div>
</td>
</tr>
<tr> <tr>
<td class="padding-small"> <td class="padding-small">
<div class="separator horizontal"></div> <div class="separator horizontal"></div>

View file

@ -98,6 +98,7 @@ define([
this.ListOnlySettings = el.find('.form-list'); this.ListOnlySettings = el.find('.form-list');
this.ImageOnlySettings = el.find('.form-image'); this.ImageOnlySettings = el.find('.form-image');
this.ConnectedSettings = el.find('.form-connected'); this.ConnectedSettings = el.find('.form-connected');
this.RequiredSettings = el.find('.required');
}, },
createDelayedElements: function() { createDelayedElements: function() {
@ -916,6 +917,7 @@ define([
var value = (checkboxOnly || radioboxOnly); var value = (checkboxOnly || radioboxOnly);
this.PlaceholderSettings.toggleClass('hidden', value); this.PlaceholderSettings.toggleClass('hidden', value);
this.CheckOnlySettings.toggleClass('hidden', !value); this.CheckOnlySettings.toggleClass('hidden', !value);
this.RequiredSettings.toggleClass('hidden', imageOnly);
}, },
onSelectItem: function(listView, itemView, record) { onSelectItem: function(listView, itemView, record) {