diff --git a/components/forms.pug b/components/forms.pug index 9634ef7..0768775 100644 --- a/components/forms.pug +++ b/components/forms.pug @@ -7,7 +7,7 @@ mixin input(type,id,placeholder,label,name) //- Simple form input control without a form-group mixin input-simple(type,id,placeholder) - input.form-control(type=type,id=id,placeholder=placeholder) + input.form-control(type=type,id=id,placeholder=placeholder,name=id) //- Input control with form-group wrapper mixin textarea(id,placeholder,label,name,rows) @@ -19,7 +19,7 @@ mixin textarea(id,placeholder,label,name,rows) //- Simple form input control without a form-group mixin textarea-simple(id,placeholder,rows) - rows = rows || 3 //- Default of 3 rows - textarea.form-control(id=id,placeholder=placeholder,rows=rows) + textarea.form-control(id=id,placeholder=placeholder,name=id,rows=rows) //- Checkbox - Block style mixin checkbox(text,name,id) diff --git a/test/forms.js b/test/forms.js index ddb15f3..371ebd6 100644 --- a/test/forms.js +++ b/test/forms.js @@ -10,7 +10,7 @@ describe("Forms", function() { it("should generate simple input control", function() { var fn = pug.compileFile(path.join(__dirname, "fixtures/forms","input-simple.pug")); - assert.equal('',fn({type: "text", id: "txtInput",placeholder:"Placeholder"})); + assert.equal('',fn({type: "text", id: "txtInput",placeholder:"Placeholder"})); }); it("should generate text area control", function() { @@ -20,7 +20,7 @@ describe("Forms", function() { it("should generate simple text area control", function() { var fn = pug.compileFile(path.join(__dirname, "fixtures/forms","textarea-simple.pug")); - assert.equal('',fn({id: "txtInput",placeholder:"Placeholder"})); + assert.equal('',fn({id: "txtInput",placeholder:"Placeholder"})); }); it("should generate a checkbox",function() { diff --git a/test/progress-bar.js b/test/progress-bar.js index d98eecf..24b1ea8 100644 --- a/test/progress-bar.js +++ b/test/progress-bar.js @@ -5,27 +5,27 @@ var path = require("path"); describe("Progress bars", function() { it("should generate a generic progress bar",function() { var fn = pug.compileFile(path.join(__dirname,"fixtures/progress-bar","progress-bar.pug")); - assert.equal('