PageSourceSearch

https://files.skoften.net/website/dist/assets/ProfileForm-C6E6CdtR.js

js skoften.net collected 2026-09-24 09:30:08 UTC 6,454 bytes, 7 lines download raw bytes

1import{a as _}from"./vendor-CGK3-ZBd.js";import{c as g,_ as b,L as y}from"./main-BTCL6hId.js";import{C as w,a as C}from"./circle-check-DhLVX7vr.js";import{q as c,a as p,m as v,e as s,s as d,E as N,F as I,D as M,y as T,f as m,v as f,C as S}from"./vue-C_5Xpcpw.js";/**
2 * @license @lucide/vue v1.33.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const U=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],x=g("save",U),F={components:{LoadingIndicator:y,CircleAlertIcon:C,CircleCheckIcon:w,SaveIcon:x},props:{genders:{type:Object,required:!0},currentUser:{type:Object,required:!0}},mounted(){},data(){return{overlay:!1,error:null,success:!1,loading:!1,message:null,selectedGender:this.currentUser.gender?.value??this.currentUser.gender??""}},computed:{csrfName(){return window.csrfTokenName},csrfToken(){return window.csrfTokenValue}},methods:{formatDate(r){const e=new Date(r),o=e.getFullYear().toString().slice(-2),n=(e.getMonth()+1).toString(),t=e.getDate().toString();return r=`${o}-${n}-${t}`},submitForm(r){var e=this,o=new FormData(r.target);e.overlay=!0,e.loading=!0,_({method:"post",url:"/actions/users/save-user",responseType:"json",data:o,headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}}).then(function(n){e.loading=!1;var t="",a=n.data.error,l=n.data.errors;if(a&&typeof a<"u")t=a;else if(l)for(const u of Object.entries(l))typeof u[1][0]<"u"&&(t+=u[1][0]+"<br>");a||l?(e.loading=!1,e.error=!0,e.message=t,setTimeout(function(){e.resetMessage()},5e3)):(e.success=!0,e.message="Gegevens bijgewerkt.",setTimeout(function(){e.resetMessage()},2e3),e.resetLoginName="")}).catch(function(n){var t=n.response?.data??{};e.loading=!1,e.error=!0,e.message=t.message?t.message:"Onbekende fout, probeer het opnieuw.",setTimeout(function(){e.resetMessage()},4e3)})},resetMessage:function(){var r=this;r.message=null,r.error=!1,r.overlay=!1,r.loading=!1}}},j={class:"uk-relative"},V=["name","value"],A=["value"],D={class:"uk-margin"},L={class:"uk-form-controls"},G=["value"],O={class:"uk-margin"},z={class:"uk-grid"},E={class:"uk-width-1-1 uk-width-1-2@s"},H={class:"uk-form-controls"},q=["value"],B={class:"uk-width-1-1 uk-width-1-2@s"},K={class:"uk-form-controls"},P=["value"],Y={class:"uk-margin"},J={class:"uk-grid"},Q={class:"uk-width-1-1 uk-width-1-2@s"},R={class:"uk-form-controls"},W=["value"],X={class:"uk-width-1-1 uk-width-1-2@s"},Z={class:"uk-form-controls"},$=["value"],ee={class:"uk-margin"},se={class:"uk-grid"},te={class:"uk-width-1-1 uk-width-1-2@s"},oe={class:"uk-form-controls"},re=["value"],ae={class:"settings-form__actions"},ne=["disabled"],ie={class:"overlay"},le={class:"uk-position-center"},de={class:"uk-text-center"},ue=["innerHTML"];function ce(r,e,o,n,t,a){const l=c("SaveIcon"),u=c("loading-indicator"),k=c("CircleAlertIcon"),h=c("CircleCheckIcon");return v(),p("div",j,[s("form",{onSubmit:e[1]||(e[1]=S((...i)=>a.submitForm&&a.submitForm(...i),["prevent"])),class:"uk-form-stacked settings-form",id:"profile-form",ref:"profileForm",enctype:"multipart/form-data","accept-charset":"UTF-8",autocomplete:"off"},[s("input",{type:"hidden",name:a.csrfName,value:a.csrfToken},null,8,V),e[12]||(e[12]=s("input",{type:"hidden",name:"action",value:"users/save-user"},null,-1)),s("input",{type:"hidden",name:"userId",value:o.currentUser.id},null,8,A),s("div",D,[e[2]||(e[2]=s("label",{class:"uk-form-label",for:"profile-email"},"E-mailadres",-1)),s("div",L,[s("input",{id:"profile-email",class:"uk-input",type:"email",name:"email",value:o.currentUser.email,placeholder:"E-mailadres",disabled:"",autocomplete:"off"},null,8,G)])]),s("div",O,[s("div",z,[s("div",E,[e[3]||(e[3]=s("label",{class:"uk-form-label",for:"profile-first-name"},"Voornaam",-1)),s("div",H,[s("input",{id:"profile-first-name",class:"uk-input",type:"text",name:"firstName",value:o.currentUser.firstName,placeholder:"Voornaam",autocomplete:"off"},null,8,q)])]),s("div",B,[e[4]||(e[4]=s("div",{class:"uk-margin-small uk-hidden@s"},null,-1)),e[5]||(e[5]=s("label",{class:"uk-form-label",for:"profile-last-name"},"Achternaam",-1)),s("div",K,[s("input",{id:"profile-last-name",class:"uk-input",type:"text",name:"lastName",value:o.currentUser.lastName,placeholder:"Achternaam",autocomplete:"off"},null,8,P)])])])]),s("div",Y,[s("div",J,[s("div",Q,[e[6]||(e[6]=s("label",{class:"uk-form-label",for:"profile-nickname"},"Naam bij reacties",-1)),s("div",R,[s("input",{id:"profile-nickname",class:"uk-input",type:"text",name:"fields[nickName]",value:o.currentUser.nickName,placeholder:"Nickname",autocomplete:"off"},null,8,W)])]),s("div",X,[e[8]||(e[8]=s("div",{class:"uk-margin-small uk-hidden@s"},null,-1)),e[9]||(e[9]=s("label",{class:"uk-form-label",for:"profile-gender"},"Geslacht",-1)),s("div",Z,[d(s("select",{id:"profile-gender",class:"uk-select",name:"fields[gender]","onUpdate:modelValue":e[0]||(e[0]=i=>t.selectedGender=i)},[e[7]||(e[7]=s("option",{value:""},"Kies een geslacht",-1)),(v(!0),p(I,null,M(o.genders,i=>(v(),p("option",{key:i.value,value:i.value},T(i.label),9,$))),128))],512),[[N,t.selectedGender]])])])])]),s("div",ee,[s("div",se,[s("div",te,[e[10]||(e[10]=s("label",{class:"uk-form-label",for:"profile-birthdate"},"Geboortedatum",-1)),s("div",oe,[s("input",{id:"profile-birthdate",class:"uk-input",n
6ame:"fields[birthdate]",type:"date",pattern:"^(0[1-9]|[1-2][0-9]|3[0-1])/(0[1-9]|1[0-2])/(19|20)\\d\\d$",value:o.currentUser.birthdate},null,8,re)])])])]),s("div",ae,[s("button",{class:"uk-button uk-button-primary profile-submit-button",type:"submit",disabled:t.loading},[m(l,{size:17,"stroke-width":2,"aria-hidden":"true"}),e[11]||(e[11]=s("span",null,"Opslaan",-1))],8,ne)]),d(s("div",ie,[s("div",le,[s("div",de,[d(s("span",null,[m(u)],512),[[f,t.loading]]),d(m(k,{class:"profile-status-icon profile-status-icon--error",size:28,"stroke-width":2,"aria-hidden":"true"},null,512),[[f,t.error]]),d(m(h,{class:"profile-status-icon profile-status-icon--success",size:28,"stroke-width":2,"aria-hidden":"true"},null,512),[[f,t.success]])]),s("p",{class:"uk-text-center",innerHTML:t.message},null,8,ue)])],512),[[f,t.overlay]])],544)])}const ke=b(F,[["render",ce]]);export{ke as default};
7//# sourceMappingURL=ProfileForm-C6E6CdtR.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.