mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-04-03 13:16:38 +00:00
fix: allow profile picture update even if "allow own account edit" enabled
This commit is contained in:
@@ -15,12 +15,14 @@
|
||||
callback,
|
||||
account,
|
||||
userId,
|
||||
isLdapUser = false
|
||||
isLdapUser = false,
|
||||
userInfoInputDisabled = false
|
||||
}: {
|
||||
account: UserCreate;
|
||||
userId: string;
|
||||
callback: (user: UserCreate) => Promise<boolean>;
|
||||
isLdapUser?: boolean;
|
||||
userInfoInputDisabled?: boolean;
|
||||
} = $props();
|
||||
|
||||
let isLoading = $state(false);
|
||||
@@ -78,26 +80,28 @@
|
||||
<hr class="border-border" />
|
||||
|
||||
<!-- User Information -->
|
||||
<div>
|
||||
<div class="flex flex-col gap-3 sm:flex-row">
|
||||
<div class="w-full">
|
||||
<FormInput label={m.first_name()} bind:input={$inputs.firstName} />
|
||||
<fieldset disabled={userInfoInputDisabled}>
|
||||
<div>
|
||||
<div class="flex flex-col gap-3 sm:flex-row">
|
||||
<div class="w-full">
|
||||
<FormInput label={m.first_name()} bind:input={$inputs.firstName} />
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<FormInput label={m.last_name()} bind:input={$inputs.lastName} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<FormInput label={m.last_name()} bind:input={$inputs.lastName} />
|
||||
<div class="mt-3 flex flex-col gap-3 sm:flex-row">
|
||||
<div class="w-full">
|
||||
<FormInput label={m.email()} bind:input={$inputs.email} />
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<FormInput label={m.username()} bind:input={$inputs.username} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3 flex flex-col gap-3 sm:flex-row">
|
||||
<div class="w-full">
|
||||
<FormInput label={m.email()} bind:input={$inputs.email} />
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<FormInput label={m.username()} bind:input={$inputs.username} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end pt-2">
|
||||
<Button {isLoading} type="submit">{m.save()}</Button>
|
||||
</div>
|
||||
<div class="flex justify-end pt-2">
|
||||
<Button {isLoading} type="submit">{m.save()}</Button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user