Skip to content

Commit

Permalink
Merge pull request #38 from openzim/string_enum
Browse files Browse the repository at this point in the history
Propose the 'Not set' value only if flag is not required
  • Loading branch information
rgaudin authored Oct 6, 2023
2 parents 7934fc9 + 169730d commit b89ac79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/src/components/NewRequest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@
if (field.type == "string-enum") {
component = "b-form-select";
options = field.choices.map(function (option) { return {text: option, value: option}; });
options.push({text: "Not set", value: undefined});
if (field.required != true) {
options.push({text: "Not set", value: undefined});
}
}
if (field.type == "text") {
Expand Down

0 comments on commit b89ac79

Please sign in to comment.