@legtech/dialog
v1.0.4
Published
Provides functionality for displaying page content in dialogs using ajax and bootstrap
Downloads
4
Keywords
Readme
Provides functionality for displaying page content in dialogs using ajax and bootstrap
Start with some html element that you want to open a pop up Put a data-dialog-url attribute in this, and set the value to the url which holds your pop up content
<a data-dialog-url="www.google.com">Google it!</a>
If you want to submit the contents of your pop up, just put a form in there.
Want to validate the contents of the form? Then just add validators - either client or server side. If the validation fails on the server, just return the view how you want it to display (with validation errors).
Want to update the page after your dialog saves? Just return the page element from your save method Set the id of the element and add a data-dialog-parent-id attribute (set to the id of the parent element)