Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 17, 2025

Issue requested a confirmation dialog before saving blog posts, referencing Bootstrap modal documentation.

Changes

EditPost.cshtml

  • Converted Save buttons from direct form submission to Bootstrap modal triggers
  • Added confirmation modal: "Are you sure you want to save changes to this blog post?"

CreatePost.cshtml

  • Converted Create Post button from direct form submission to Bootstrap modal trigger
  • Added confirmation modal: "Are you sure you want to create this blog post?"

Implementation

Buttons changed from:

<input class="btn btn-primary" type="submit" name="submit" value="Save" />

To:

<button class="btn btn-primary" type="button" data-bs-toggle="modal" data-bs-target="#saveConfirmModal">Save</button>

Modal structure follows Bootstrap 5.3 standards with proper ARIA attributes. JavaScript handler injects hidden submit input before form submission to preserve controller routing logic. Other form actions (Upload Image, Add Category) unaffected.

Original prompt

This section details on the original issue you should resolve

<issue_title>Include a confirmation button for saving blog posts</issue_title>
<issue_description>https://getbootstrap.com/docs/5.3/components/modal/</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

- Added Bootstrap modal to EditPost.cshtml for save confirmation
- Added Bootstrap modal to CreatePost.cshtml for create confirmation
- Changed Save/Create buttons from submit inputs to modal trigger buttons
- Added JavaScript to handle form submission after confirmation

Co-authored-by: poppastring <8739371+poppastring@users.noreply.github.com>
Copilot AI changed the title [WIP] Add confirmation button for saving blog posts Add confirmation modal for blog post save/create actions Nov 17, 2025
Copilot AI requested a review from poppastring November 17, 2025 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include a confirmation button for saving blog posts

2 participants