@experium/findy-form 1.2.25 → 1.2.26
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.
|
@@ -82,7 +82,7 @@ var styles = {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
var getConstructorOpd = function getConstructorOpd(opdSettings, language) {
|
|
85
|
-
var opdConstructor =
|
|
85
|
+
var opdConstructor = (0, _ramda.pathOr)([], ['data', 'opdConstructor'], opdSettings);
|
|
86
86
|
var text = (opdConstructor || []).reduce(function (res, cur) {
|
|
87
87
|
switch (cur.type) {
|
|
88
88
|
case 'question':
|
|
@@ -92,7 +92,7 @@ var getConstructorOpd = function getConstructorOpd(opdSettings, language) {
|
|
|
92
92
|
return res + (cur.text || '');
|
|
93
93
|
|
|
94
94
|
case 'checkbox':
|
|
95
|
-
return "".concat(res, "<p>\n <input type=\"checkbox\" id=\"", "checkbox-".concat(cur.id), "\" ").concat(cur.required ? 'required="required"' : '', " />\n <label for=\"", "checkbox-".concat(cur.id), "\">").concat(cur.label || ''
|
|
95
|
+
return "".concat(res, "<p>\n <input type=\"checkbox\" id=\"", "checkbox-".concat(cur.id), "\" ").concat(cur.required ? 'required="required"' : '', " />\n <label for=\"", "checkbox-".concat(cur.id), "\">").concat(cur.label || '', "</label>\n </p>");
|
|
96
96
|
|
|
97
97
|
case 'opdCheckbox':
|
|
98
98
|
return "".concat(res, "<p>\n <input type=\"checkbox\" id=\"").concat(cur.opdType, "\" ").concat((0, _ramda.path)([cur.opdType, 'required'], opdSettings) ? 'required="required"' : '', " />\n <label for=\"").concat(cur.opdType, "\">").concat((0, _ramda.pathOr)('', [cur.opdType, 'label'], opdSettings), "</label>\n </p>");
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@ import { FormContext } from '../../context/FormContext';
|
|
|
14
14
|
import { getAttrs } from '../../utils/attrs';
|
|
15
15
|
|
|
16
16
|
const getConstructorOpd = (opdSettings, language) => {
|
|
17
|
-
const opdConstructor =
|
|
17
|
+
const opdConstructor = pathOr([], ['data', 'opdConstructor'], opdSettings);
|
|
18
18
|
|
|
19
19
|
const text = (opdConstructor || []).reduce((res, cur) => {
|
|
20
20
|
switch (cur.type) {
|
|
@@ -25,7 +25,7 @@ const getConstructorOpd = (opdSettings, language) => {
|
|
|
25
25
|
case 'checkbox':
|
|
26
26
|
return `${res}<p>
|
|
27
27
|
<input type="checkbox" id="${`checkbox-${cur.id}`}" ${cur.required ? 'required="required"' : ''} />
|
|
28
|
-
<label for="${`checkbox-${cur.id}`}">${cur.label || ''}
|
|
28
|
+
<label for="${`checkbox-${cur.id}`}">${cur.label || ''}</label>
|
|
29
29
|
</p>`;
|
|
30
30
|
case 'opdCheckbox':
|
|
31
31
|
return `${res}<p>
|