Skip to content

Commit 4fab819

Browse files
committed
WIP for #533
1 parent 1086d71 commit 4fab819

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

client/src/policies/PolicyForm.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ export const PolicyForm = ({
212212
})}
213213
isMulti={true}/>
214214
</div>
215+
{(!initial && isEmpty(policy.data.serviceProviderIds)) &&
216+
<ErrorIndicator adjustMargin={true}
217+
msg={I18n.t("forms.required", {name: I18n.t("policies.serviceProviders")})}/>}
215218

216219
<span className="label standalone">{I18n.t("appAccess.filters")}</span>
217220
<div className="filters">
@@ -272,11 +275,9 @@ export const PolicyForm = ({
272275
{(!initial && policy.data.attributes.filter(attr => !isEmpty(attr.name) && !isEmpty(attr.value)).length === 0) &&
273276
<ErrorIndicator msg={I18n.t("policies.attributesRequired")}/>}
274277
<div className="add-attribute-container">
275-
<SelectField placeholder={I18n.t("appAccess.addAttributePlaceholder")}
276-
value={null}
277-
onChange={option => attributeAdded(option)}
278-
options={policy.data.denyRule ? allowedAttributes
279-
.filter(option => option.allowedInDenyRule) : allowedAttributes}/>
278+
<Button type={ButtonType.Secondary}
279+
onClick={() => attributeAdded({name: null})}
280+
txt={I18n.t("appAccess.addAttributePlaceholder")}/>
280281
</div>
281282

282283
</div>

0 commit comments

Comments
 (0)