hof 20.2.1 → 20.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -265,6 +265,7 @@ module.exports = function (options) {
265
265
  let toggle;
266
266
  let child;
267
267
  let optionHint;
268
+ let useHintText;
268
269
 
269
270
  if (typeof obj === 'string') {
270
271
  value = obj;
@@ -275,6 +276,7 @@ module.exports = function (options) {
275
276
  label = obj.label || 'fields.' + key + '.options.' + obj.value + '.label';
276
277
  toggle = obj.toggle;
277
278
  child = obj.child;
279
+ useHintText = obj.useHintText;
278
280
  optionHint = obj.hint || 'fields.' + key + '.options.' + obj.value + '.hint';
279
281
  }
280
282
 
@@ -293,7 +295,7 @@ module.exports = function (options) {
293
295
  radioOption: opts.type === 'radio',
294
296
  toggle: toggle,
295
297
  child: child,
296
- optionHint: conditionalTranslate(optionHint) || ''
298
+ optionHint: useHintText ? optionHint : conditionalTranslate(optionHint) || ''
297
299
  };
298
300
  }, this),
299
301
  className: classNames(field),
@@ -53,7 +53,11 @@ function setup(summary) {
53
53
  }
54
54
 
55
55
  function validation() {
56
- var summaries = helpers.getElementsByClass(document.getElementById('content'), 'div', 'validation-summary');
56
+ var summaries = [];
57
+
58
+ if (document.getElementById('content')) {
59
+ summaries = helpers.getElementsByClass(document.getElementById('content'), 'div', 'validation-summary');
60
+ }
57
61
 
58
62
  if (summaries.length) {
59
63
  summary = summaries[0];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "20.2.1",
4
+ "version": "20.2.3",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",