gd-sprest-bs 9.1.5 → 9.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -187,13 +187,10 @@ var Field = function (props) {
187
187
  case gd_sprest_1.SPTypes.FieldType.Boolean:
188
188
  // Set the type
189
189
  controlProps.type = core_1.Components.FormControlTypes.Checkbox;
190
- // Ensure the item is not read-only
191
- if (controlProps.isReadonly != true) {
192
- // Create the item
193
- controlProps.items = [{ label: controlProps.label }];
194
- // Clear the label
195
- controlProps.label = "";
196
- }
190
+ // Create the item
191
+ controlProps.items = [{ label: controlProps.label }];
192
+ // Clear the label
193
+ controlProps.label = "";
197
194
  break;
198
195
  // Choice
199
196
  case gd_sprest_1.SPTypes.FieldType.Choice:
@@ -177,6 +177,14 @@ exports.ListForm.renderDisplayForm = function (props) {
177
177
  control.el.innerHTML = control.props.data;
178
178
  };
179
179
  }
180
+ // Else, detect xml
181
+ else if (/</g.test(html)) {
182
+ // Update the value
183
+ mapper[fieldName].value = html.replace(/&lt;/g, '<')
184
+ .replace(/&gt;/g, '>')
185
+ .replace(/&amp;/g, '&')
186
+ .replace(/&quot;/g, '"');
187
+ }
180
188
  // Add the row
181
189
  rows.push({
182
190
  columns: [{
@@ -664,6 +672,12 @@ exports.ListForm.renderEditForm = function (props) {
664
672
  // See if this control is readonly
665
673
  if (control.isReadonly) {
666
674
  var html_1 = (props.info.fieldValuesAsHtml && props.info.fieldValuesAsHtml[field.InternalName]) || "";
675
+ // See if this is a checkbox and the label is not set
676
+ if (control.type == core_1.Components.FormControlTypes.Checkbox && (control.label || "").length == 0) {
677
+ // Update the label
678
+ var item = control.items[0];
679
+ control.label = item ? item.label : control.label;
680
+ }
667
681
  // Update the control properties
668
682
  control.type = core_1.Components.FormControlTypes.Readonly;
669
683
  // Detect html