pug-bootstrap / PUG-Bootstrap

Bootstrap framework written completely using mixins in Pug
http://pug-bootstrap.github.io/PUG-Bootstrap/
MIT License
227 stars 72 forks source link

Setting name for inputs #2

Closed thomas15v closed 8 years ago

thomas15v commented 8 years ago
+modal("Modal title","addDaemon")
        form(action='/admin/add_daemon', method="post")
            input(type='hidden', name="id", id="editid")
            +input('text','name', 'A nice name for the daemon', "Name")
            +input('text','ip', 'The http address from the daemon.', "Address")
            +input('text','key', 'The Key for the daemon', "Key")
            +input('text','group', 'The group for the daemon', "Group")
            +submit-primary('Add')

I have this code. Only my posts don't send data because the name tag is missing. And I can't figure out a way to bruteforce that in their :worried:.

rajasegar commented 8 years ago

Fixed in the latest commit , now you can add name as a parameter to the mixin just like you mentioned, so now the syntax will be +input(type,id,placeholder,label, name)

hagabaka commented 8 years ago

The checkbox and radio mixins still don't allow specifying names.

rajasegar commented 8 years ago

@hagabaka Fixed in the latest commit https://github.com/rajasegar/JADE-Bootstrap/commit/8480a5c2601092a0968abd7374423cc0f3e78a49 Now you can use

+checkbox(text,name,id)
+checkbox-inline(text,name,id)
+radio(text,name,id)
+radio-inline(text,name,id)