From f92b193a78aa94c4c0627a9afbc64af824ca8290 Mon Sep 17 00:00:00 2001 From: Icebob Date: Mon, 26 Sep 2016 22:27:21 +0200 Subject: [PATCH] Implement #78 Add `name` attr to input, select and textarea fields --- dev/schema.js | 4 +++- src/fields/fieldCheckbox.vue | 2 +- src/fields/fieldCleave.vue | 2 +- src/fields/fieldColor.vue | 2 +- src/fields/fieldDateTimePicker.vue | 2 +- src/fields/fieldEmail.vue | 2 +- src/fields/fieldGoogleAddress.vue | 2 +- src/fields/fieldImage.vue | 2 +- src/fields/fieldInput.vue | 1 + src/fields/fieldMasked.vue | 2 +- src/fields/fieldNumber.vue | 2 +- src/fields/fieldPassword.vue | 2 +- src/fields/fieldPikaday.vue | 2 +- src/fields/fieldRange.vue | 2 +- src/fields/fieldRangeSlider.vue | 2 +- src/fields/fieldSelect.vue | 2 +- src/fields/fieldSelectEx.vue | 2 +- src/fields/fieldSpectrum.vue | 2 +- src/fields/fieldSubmit.vue | 2 +- src/fields/fieldSwitch.vue | 2 +- src/fields/fieldText.vue | 2 +- src/fields/fieldTextArea.vue | 2 +- test/unit/specs/fields/fieldCheckbox.spec.js | 5 ++--- test/unit/specs/fields/fieldCleave.spec.js | 2 +- test/unit/specs/fields/fieldColor.spec.js | 2 +- .../specs/fields/fieldDateTimePicker.spec.js | 2 +- test/unit/specs/fields/fieldEmail.spec.js | 2 +- .../unit/specs/fields/fieldGoogleAddress.spec.js | 2 +- test/unit/specs/fields/fieldInput.spec.js | 16 ++++++++-------- test/unit/specs/fields/fieldMasked.spec.js | 2 +- test/unit/specs/fields/fieldNumber.spec.js | 2 +- test/unit/specs/fields/fieldPassword.spec.js | 2 +- test/unit/specs/fields/fieldPikaday.spec.js | 2 +- test/unit/specs/fields/fieldRange.spec.js | 2 +- test/unit/specs/fields/fieldRangeSlider.spec.js | 2 +- test/unit/specs/fields/fieldSelect.spec.js | 2 +- test/unit/specs/fields/fieldSelectEx.spec.js | 2 +- test/unit/specs/fields/fieldSpectrum.spec.js | 2 +- test/unit/specs/fields/fieldText.spec.js | 2 +- test/unit/specs/fields/fieldTextArea.spec.js | 2 +- test/unit/specs/util.js | 9 +++++---- 41 files changed, 55 insertions(+), 52 deletions(-) diff --git a/dev/schema.js b/dev/schema.js index 06a6924d..a44a799d 100644 --- a/dev/schema.js +++ b/dev/schema.js @@ -20,7 +20,8 @@ module.exports = { type: "input", inputType: "hidden", label: "Hidden", - model: "id" + model: "id", + inputName: "hiddenField" }, { type: "input", @@ -57,6 +58,7 @@ module.exports = { label: "URL", model: "website", placeholder: "Enter your website", + inputName: "website", validator: validators.url }, { diff --git a/src/fields/fieldCheckbox.vue b/src/fields/fieldCheckbox.vue index 5ae030da..cb678e03 100644 --- a/src/fields/fieldCheckbox.vue +++ b/src/fields/fieldCheckbox.vue @@ -1,5 +1,5 @@