Don't render labels for hidden inputs

This commit is contained in:
JC Brand 2018-07-02 20:22:16 +02:00
parent d335173fd7
commit a2fef1277c
2 changed files with 9 additions and 3 deletions

8
dist/converse.js vendored
View File

@ -85074,11 +85074,15 @@ var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./no
module.exports = function(o) {
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
__p += '<!-- src/templates/form_input.html -->\n<div class="form-group">\n <label for="' +
__p += '<!-- src/templates/form_input.html -->\n<div class="form-group">\n ';
if (o.type !== 'hidden') { ;
__p += '\n <label for="' +
__e(o.id) +
'">' +
__e(o.label) +
'</label>\n <input class="form-control" name="' +
'</label>\n ';
} ;
__p += '\n <input class="form-control" name="' +
__e(o.name) +
'" type="' +
__e(o.type) +

View File

@ -1,5 +1,7 @@
<div class="form-group">
<label for="{{{o.id}}}">{{{o.label}}}</label>
{[ if (o.type !== 'hidden') { ]}
<label for="{{{o.id}}}">{{{o.label}}}</label>
{[ } ]}
<input class="form-control" name="{{{o.name}}}" type="{{{o.type}}}" id="{{{o.id}}}"
{[ if (o.placeholder) { ]} placeholder="{{{o.placeholder}}}" {[ } ]}
{[ if (o.value) { ]} value="{{{o.value}}}" {[ } ]}