Skip to content

Modal Generator v1.0.0

Latest

Choose a tag to compare

@werlen-nevio werlen-nevio released this 03 Dec 07:52

Release Notes: Modal Generator v1.0.0

Release Date: December 3, 2024


Overview

This release introduces the Modal Generator, a dynamic, jQuery-powered implementation for creating Bootstrap 5 modals with customizable parameters. This tool simplifies the generation of modals by allowing users to define content, buttons, and forms directly through JSON configurations.


Key Features

1. Dynamic Modal Creation

  • Automatically generates Bootstrap modals based on JSON-defined parameters.
  • Adds the modal HTML directly to the DOM for seamless integration.

2. Customizable Content

  • Support for input fields, forms, and custom HTML content.
  • Dynamic form generation with configurable input types, labels, and placeholders.

3. Flexible Button Configuration

  • Save, Delete, and Close buttons with custom:
    • Labels
    • Styles (Bootstrap classes)
    • Callbacks for button actions.

4. Error Handling

  • Logs invalid JSON parsing errors to the console.
  • Provides clear debugging output for malformed modalParams.

5. Bootstrap 5 Compatibility

  • Fully responsive and designed to integrate with Bootstrap 5's modal component.

Enhancements in v1.0.0

Core Features:

  • getHTMLContent: Generates the modal structure, including header, body, and footer.
  • getFooter: Dynamically adds buttons with customizable actions.
  • getModalContent: Supports form inputs or additional static HTML content.

Form & Input Handling:

  • getInputs: Simplifies the creation of multiple input fields.
  • getForm: Dynamically generates forms with HTTP methods and action attributes.

Button Handling:

  • Save Button:
    • submit support for form submission.
    • Configurable callback actions.
  • Close/Delete Buttons:
    • Generic button creation with dismiss capabilities.

JSON Debugging:

  • Graceful fallback for invalid JSON with detailed console logs.

Full Changelog: https://github.com/werlen-nevio/ModalGenerator/commits/1.0


Thank you for using Modal Generator! 🚀