Skip to content

Commit

Permalink
Merge pull request #1069 from hpehl/HAL-1969
Browse files Browse the repository at this point in the history
HAL-1969: Mark name as required
  • Loading branch information
hpehl authored Feb 2, 2024
2 parents 9f1bdad + b81b402 commit 74bd9c6
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
*/
package org.jboss.hal.client.configuration.subsystem.microprofile;

import java.util.LinkedHashMap;
import java.util.Map;

import elemental2.dom.HTMLDivElement;
import elemental2.dom.HTMLElement;
import org.jboss.elemento.HtmlContentBuilder;
import org.jboss.hal.ballroom.LabelBuilder;
import org.jboss.hal.ballroom.form.Form;
Expand All @@ -39,11 +38,10 @@
import org.jboss.hal.resources.Names;
import org.jboss.hal.resources.Resources;

import elemental2.dom.HTMLDivElement;
import elemental2.dom.HTMLElement;
import java.util.LinkedHashMap;
import java.util.Map;

import static java.util.Arrays.asList;

import static org.jboss.elemento.Elements.div;
import static org.jboss.elemento.Elements.p;
import static org.jboss.elemento.Elements.setVisible;
Expand Down Expand Up @@ -182,6 +180,7 @@ class SourceStep extends WizardStep<Context, State> {
String id = Ids.build(Ids.MICRO_PROFILE_CONFIG_SOURCE, SOURCE, Ids.FORM);
Metadata emptyMetadata = Metadata.empty();
nameItem = new NameItem();
nameItem.setRequired(false);
sourceItem = new RadioItem(SOURCE, resources.constants().source(),
asList(new String[] { CLASS, DIR, PROPERTIES }), false);
sourceItem.setName(SOURCE);
Expand Down Expand Up @@ -209,6 +208,7 @@ public HTMLElement element() {

@Override
protected void onShow(Context context) {
nameItem.setRequired(true);
nameItem.setValue(context.name);
sourceItem.setValue(context.source);
form.edit(context.modelNode);
Expand Down

0 comments on commit 74bd9c6

Please sign in to comment.