Skip to content

Errors in "Modify Protocol Parameters" Should Be Shown in HTML Instead of JavaScript Popup #340

@saramonzon

Description

@saramonzon

Description

Currently, when no "Used" or "Order" is selected in Modify Protocol Parameters, an error message is displayed using a JavaScript popup at the top of the page. This behavior is not user-friendly and should be replaced with an error message displayed directly in the page, inside a div or another appropriate HTML element.

Steps to Reproduce

  1. Navigate to Modify Protocol Parameters.
  2. Try to submit the form without selecting a Used or Order value.
  3. Observe that an error appears as a JavaScript alert popup at the top of the page.

Expected Behavior

  • The error should be displayed inline, inside the form, in a dedicated div or another appropriate HTML element.
  • The error message should clearly indicate what is missing (e.g., "Please select a value for Used/Order").
  • The form should not submit until the issue is resolved.

Actual Behavior

  • The error is currently displayed as a JavaScript alert popup, which can be disruptive and not user-friendly.

Suggested Fix

  • Replace the JavaScript popup with an error message inside the form.
  • Use Django messages framework or an inline validation mechanism (e.g., div with error text next to the fields).
  • Example implementation in Django templates:
    <div class="error-message">Please select a value for Used/Order.</div>
  • If using JavaScript for validation, update the DOM instead of triggering an alert().

Environment

  • Django Version: [Add version]
  • Python Version: [Add version]
  • Affected Page: Modify Protocol Parameters

Additional Context

Improving the error message display will enhance user experience and make the form more intuitive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions