JSFiddle - React, Tailwind, and code Playground
HTML
<form id="createEventForm" action="http://10.10.15.30:8000/attendee/edit" style="display:none" method="POST">
<label for="first_name">First_name:</label>
<input name="first_name" value="Chris" id="first_name" type="text" />
<label for="last_name">Last_name:</label>
<input name="last_name" value="Griffin" id="last_name" type="text" />
<input type="submit" />
</form>
JavaScript
/* global define */
/* ================================================
* Make use of Bootstrap's modal more monkey-friendly.
*
* For Bootstrap 3.
*
* [email protected]
*
* https://github.com/nakupanda/bootstrap3-dialog
*
* Licensed under The MIT License.
* ================================================ */ (function (root, factory) {
"use strict";
// CommonJS module is defined
if (typeof module !== 'undefined' && module.exports) {
module.exports = factory(require('jquery')(root));
}
// AMD module is defined
else if (typeof define === "function" && define.amd) {
define("bootstrap-dialog", ["jquery"], function ($) {
return factory($);
});
} else {
// planted over the root!
root.BootstrapDialog = factory(root.jQuery);
}
}(this, function ($) {
"use strict";
/* ================================================
* Definition of BootstrapDialogModal.
* Extend Bootstrap Modal and override some functions.
* BootstrapDialogModal === Modified Modal.
* ================================================ */
var Modal = $.fn.modal.Constructor;
var BootstrapDialogModal = function (element, options) {
Modal.call(this, element, options);
};
BootstrapDialogModal.getModalVersion = function () {
var version = null;
if (typeof $.fn.modal.Constructor.VERSION === 'undefined') {
version = 'v3.1';
} else if (/3\.2\.\d+/.test($.fn.modal.Constructor.VERSION)) {
version = 'v3.2';
} else {
version = 'v3.3'; // v3.3+
}
return version;
};
BootstrapDialogModal.ORIGINAL_BODY_PADDING = $('body').css('padding-right') || 0;
BootstrapDialogModal.METHODS_TO_OVERRIDE = {};
BootstrapDialogModal.METHODS_TO_OVERRIDE['v3.1'] = {};
BootstrapDialogModal.METHODS_TO_OVERRIDE['v3.2'] = {
hide: function (e) {
if (e) {
...