All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.v2.admin.resources.assets.RoleForm-COK3IXcf.js Maven / Gradle / Ivy

There is a newer version: 26.0.7
Show newest version
import{jsxs as s,Fragment as d,jsx as a}from"react/jsx-runtime";import{a as h,aj as f,ab as p,P as v,y as g,O as b,A as x,h as F,i as L,L as N}from"./main-C7ps2lmX.js";import{F as j}from"./FormAccess-DyLNkc18.js";import{V as q}from"./ViewHeader-B7eeFzFA.js";const R=({form:{formState:i},onSubmit:n,cancelLink:l,role:o,editMode:r})=>{const{t:e}=h(),{control:m,handleSubmit:c}=f(),u=p({control:m,defaultValue:void 0,name:"name"});return s(d,{children:[!r&&a(q,{titleKey:e("createRole")}),a(v,{variant:"light",children:s(j,{isHorizontal:!0,onSubmit:c(n),role:o,className:"pf-v5-u-mt-lg",children:[a(g,{name:"name",label:e("roleName"),rules:{required:r?void 0:e("required"),validate(t){if(!t?.trim())return e("required")}},isDisabled:r}),a(b,{name:"description",label:e("description"),rules:{maxLength:{value:255,message:e("maxLength",{length:255})}},isDisabled:u?.includes("default-roles")??!1}),s(x,{children:[a(F,{formState:i,"data-testid":"save",allowInvalid:!0,allowNonDirty:!0,children:e("save")}),a(L,{"data-testid":"cancel",variant:"link",component:t=>a(N,{...t,to:l}),children:e("cancel")})]})]})})]})};export{R};
//# sourceMappingURL=RoleForm-COK3IXcf.js.map




© 2015 - 2025 Weber Informatics LLC | Privacy Policy