diff --git a/modules/create_timepoint/jsx/createTimepointIndex.js b/modules/create_timepoint/jsx/createTimepointIndex.js index 8e5ab357c26..2a6ec30b77e 100644 --- a/modules/create_timepoint/jsx/createTimepointIndex.js +++ b/modules/create_timepoint/jsx/createTimepointIndex.js @@ -401,6 +401,8 @@ class CreateTimepoint extends React.Component { /> ) : null; // Include languages select. + const emptyLangOption = + Object.keys(this.state.form.options.languages).length > 1; const languages = this.state.form.display.languages ? ( 1) { - $languages = [null] + $languages; - } - $values['languages'] = $languages; + $values['languages'] = \Utility::getLanguageList(); if (!empty($conflict)) { return new \LORIS\Http\Response\JSON\Conflict( diff --git a/modules/create_timepoint/test/TestPlan.md b/modules/create_timepoint/test/TestPlan.md index 5c2445d1834..2f551df6df6 100644 --- a/modules/create_timepoint/test/TestPlan.md +++ b/modules/create_timepoint/test/TestPlan.md @@ -40,6 +40,10 @@ visit label already exists for the candidate. successful form submission. Click on "Ok" button and ensure that it brings you back to timepoint list page for that candidate and confirm that the new timepoint appears in the list. [Manual Testing] -14. Check that page is inaccessible if either the user does not have data_entry +14. Ensure that there is no empty option in the language select element and a language is automatically selected when only one +language exists in the `language` table. +15. Ensure that there is an empty option in the language select element and the field is required when more than one +lagnuage exists in the `language` table +16. Check that page is inaccessible if either the user does not have data_entry permission or the user and candidate are not the same site. [Manual Testing]