Skip to content

Delete/Submit modes vary per mode #7

@andrewvanbreda

Description

@andrewvanbreda

After some investigation after an issue with NPMS, I discovered some problems with the elegance of the code that shows the Submit/Delete buttons on prebuilt forms

For instance, when I had the dynamic_sample_occurrence running in Wizard Mode it called getSubmitButtons (which is a method that appears in several prebuilt forms).
This always seemed to include a Delete button that appears before the Submit button, I will be committing a fix shortly that swaps the two button around (as this causes the Delete to fire when the Return key is pressed)
It also seems to have no way to remove the Delete button with configuration. Users are always able to delete their data even if we don't want them to (unless we use jQuery to hide).

I switched the screens to tabbed mode (with the "submit button below each tab" option on) and this seemed to call data_entry_helper::wizard_buttons, which doesn't display the delete button in the same situation.

It would be better if the same area of code was called to display the buttons no matter what the screen mode was. Currently very confusing. As I just mentioned, which buttons are displayed also seems to vary with the mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions