ifad / data-confirm-modal

Makes Rails' link_to confirm: 'foo' build a Bootstrap Modal instead of calling the browser's confirm() API.
MIT License
271 stars 115 forks source link

verifyLabel should create a label tag instead of paragraph #74

Open zeroedin opened 5 years ago

zeroedin commented 5 years ago

options.verifyLabel should create a <label> tag referencing the <input>. The input will need also need a id attribute as well.

var verification = $('<input/>', {"type": 'text', "id": "confirm", "class": settings.verifyClass}).on('keyup', function () {
  commit.prop('disabled', !isMatch($(this).val()));
});

...

if (options.verifyLabel)
        body.append($('<label>', {text: options.verifyLabel, for: 'confirm' }))