Skip to content

Commit

Permalink
feat(registrar): added "not-selected" option to the required selectio…
Browse files Browse the repository at this point in the history
…n boxes

* "Not-selected" option added to all types of drop down required items (Selectionbox, Combobox and
Timezone).
  • Loading branch information
HejdaJakub committed Sep 22, 2022
1 parent 3c97e42 commit e959ad9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ protected Widget initWidget() {
select.setShowTick(true);

select.clear();

if (!isRequired()) {
select.addItem(getTranslation().notSelected(), (String) null);
}
select.addItem(getTranslation().notSelected(), "");
select.addItem(getTranslation().customValue(), CUSTOM_ID);

Map<String, String> opts = parseItemOptions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ protected Widget initWidget() {
getSelect().setShowTick(true);

getSelect().clear();

if (!isRequired()) {
getSelect().addItem(translation.notSelected(), "");
}
getSelect().addItem(translation.notSelected(), "");

Map<String, String> opts = parseItemOptions();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ protected Widget initWidget() {
getSelect().setWidth("100%");
getSelect().setShowTick(true);

if (!isRequired()) {
getSelect().addItem(getTranslation().notSelected(), (String) null);
}
getSelect().clear();
getSelect().addItem(getTranslation().notSelected(), "");

for (String timezone : Utils.getTimezones()) {
getSelect().addItem(timezone, timezone);
Expand Down

0 comments on commit e959ad9

Please sign in to comment.