Add new widget to display layout Radio button with Image

Created on 14 July 2024, about 2 months ago
Updated 21 August 2024, 18 days ago

Problem/Motivation

The current Layout Library module does not support adding images in the add form, nor does it provide a custom widget to display radio buttons with images. This feature would enhance the usability and visual appeal of the module.

Proposed resolution

  1. Add Image in Add Form

    Implement a managed file field in the add form to allow users to upload an image when creating a new layout.

  2. Create an Edit Form

    Develop an edit form that includes the image field, allowing users to update the image associated with a layout.

  3. Custom Widget for Radio Buttons with Images

    Create a custom widget that displays radio buttons with images. This widget will enhance the user experience by providing a visual representation of the layout options.

Steps to reproduce

  1. Navigate to the Layout Library module's add form.
  2. Observe the absence of an image upload field.
  3. Edit an existing layout and note the lack of an image field.
  4. View the current radio button options without images.

Additional Information

  • 'layoutEditForm.php': Contains the code for edit forms.
  • 'RadioImageWidget.php': Contains the code for the custom widget displaying radio buttons with images.
Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇯🇴Jordan Rahaf Albawab

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024