Skip to content

Commit

Permalink
update input type on stix forms.
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed Mar 13, 2024
1 parent eeb57ad commit c6b7f4f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ public class Input extends BaseFormComponent {
@Inject
@Getter
@Default(values = "text")
private String inputType;
public String inputType;

@Inject
@Getter
@Default(booleanValues = false)
private Boolean validationRequired;
public Boolean validationRequired;


@Inject
@Getter
private String validationInputMask;
public String validationInputMask;

@Override
@PostConstruct
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@ public class Select extends BaseFormComponent {
protected static final String DEFAULT_SELECT_CLASSES = "form-select mt-1";
protected static final String DEFAULT_PLACEHOLDER = "Select an item";

@Inject
@Getter
public String inputType;

@Inject
@Getter
@Default(booleanValues = false)
private Boolean validationRequired;
public Boolean validationRequired;

@Inject
@Getter
private List<SelectOptionItems> selectOptions;
public List<SelectOptionItems> selectOptions;

@Getter
@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/-->
<sly data-sly-use.model="ai.typerefinery.websight.models.components.forms.Input">
<div class="${model.componentClassNames}" id="${model.id}" component="stix-${model.componentName}">
<div class="${model.componentClassNames}" id="${model.id}" type="${model.inputType}" component="stix-${model.componentName}">
<sly data-sly-use.template="./variant.html" data-sly-call="${template.variant @ model=model}">
</sly>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
*/-->
<sly data-sly-use.model="ai.typerefinery.websight.models.components.forms.Select">
<div class="${model.componentClassNames}" id="${model.id}" component="stix-${model.componentName}">
<div class="${model.componentClassNames}" id="${model.id}" type="${model.inputType}" component="stix-${model.componentName}">
<sly data-sly-use.template="./variant.html" data-sly-call="${template.variant @ model=model}">
</sly>
</div>
Expand Down

0 comments on commit c6b7f4f

Please sign in to comment.