Skip to content

Commit

Permalink
Error container now detected correctly for small field holders
Browse files Browse the repository at this point in the history
  • Loading branch information
colintucker committed Jun 17, 2017
1 parent 06e4917 commit 0fc68c1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/parsley.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion client/src/parsley/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ $(function() {
return el.$element;
},
errorsContainer: function(el) {
return el.$element.closest('.field');
var $holder = $('#' + el.$element.attr('id') + '_Holder');
return $holder.hasClass('fieldholder-small') ? $holder : el.$element.closest('.field');
},
errorClass: $form.data('field-error-class'),
successClass: $form.data('field-success-class'),
Expand Down
22 changes: 16 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ ajv@^4.7.0, ajv@^4.9.1:
json-stable-stringify "^1.0.1"

ajv@^5.0.0:
version "5.1.5"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.1.5.tgz#8734931b601f00d4feef7c65738d77d1b65d1f68"
version "5.2.0"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.0.tgz#c1735024c5da2ef75cc190713073d44f098bf486"
dependencies:
co "^4.6.0"
fast-deep-equal "^0.1.0"
json-schema-traverse "^0.3.0"
json-stable-stringify "^1.0.1"

align-text@^0.1.1, align-text@^0.1.3:
Expand Down Expand Up @@ -746,8 +748,8 @@ caniuse-api@^1.5.2:
lodash.uniq "^4.5.0"

caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
version "1.0.30000684"
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000684.tgz#99acb0118b8fd1fdd601a15e0c0f2dfc15a81680"
version "1.0.30000686"
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000686.tgz#d55b479ed6e6402c1fd3f1fd8f46e694d86ea464"

caseless@~0.12.0:
version "0.12.0"
Expand Down Expand Up @@ -1241,6 +1243,10 @@ extsprintf@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550"

fast-deep-equal@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-0.1.0.tgz#5c6f4599aba6b333ee3342e2ed978672f1001f8d"

fastparse@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8"
Expand Down Expand Up @@ -1743,6 +1749,10 @@ json-loader@^0.5.4:
version "0.5.4"
resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.4.tgz#8baa1365a632f58a3c46d20175fc6002c96e37de"

json-schema-traverse@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.0.tgz#0016c0b1ca1efe46d44d37541bcdfc19dcfae0db"

json-schema@0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
Expand Down Expand Up @@ -3229,8 +3239,8 @@ util@0.10.3, util@^0.10.3:
inherits "2.0.1"

uuid@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1"
version "3.1.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04"

validate-npm-package-license@^3.0.1:
version "3.0.1"
Expand Down

0 comments on commit 0fc68c1

Please sign in to comment.