Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[instruments] Fix properly disabling/enabling 'Delete instrument data' button display #8686

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/instruments/test/TestPlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ is correct.
5. If the instrument has multiple pages (on the left pane), move from page to page and check that the
saved data stays the same. The data that wasn't saved should be lost.
6. Make sure that the 'Delete instrument data' button on the left pane is only visible when the user
has the 'Send to DCC' permission.
has the 'Send to DCC' permission, and the configuration `InstrumentResetting` (_"Instrument Resetting"_) is set to
'Yes' in the Configuration module.
7. Click on the 'Delete instrument data' button and check if the instrument's data is cleared.
8. Select a candidate with a Date Of Death (DoD) or put one in for a candidate as needed, then select an
instrument for that candidate. Enter a date (same a step 4) posterior to the DoD. Refresh the page and check that the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class NDB_BVL_InstrumentStatus_ControlPanel extends NDB_BVL_InstrumentStatus
$this->tpl_data['access']['validity'] = $this->_displayValidity();
}

if ($config->getSetting('InstrumentResetting')
if ($config->settingEnabled('InstrumentResetting')
&& $this->getDataEntryStatus() != 'Complete'
) {
$user = User::singleton();
Expand Down