Skip to content

Commit

Permalink
Devlop Frontend #32
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrowunga committed Nov 24, 2024
1 parent 0f767f3 commit f681d0f
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 79 deletions.
18 changes: 7 additions & 11 deletions resources/views/profile/partials/delete-user-form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</p>
</header>

<<<<<<< HEAD

<x-danger-button x-data=""
x-on:click.prevent="$dispatch('open-modal', 'confirm-user-deletion')">{{ __('Delete Account') }}</x-danger-button>

Expand Down Expand Up @@ -46,16 +46,12 @@
</div>
</form>
</x-modal>
=======
<x-splade-form
method="delete"
:action="route('profile.destroy')"
:confirm="__('Are you sure you want to delete your account?')"
:confirm-text="__('Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.')"
:confirm-button="__('Delete Account')"
require-password
>

<x-splade-form method="delete" :action="route('profile.destroy')" :confirm="__('Are you sure you want to delete your account?')" :confirm-text="__(
'Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.',
)" :confirm-button="__('Delete Account')"
require-password>
<x-splade-submit danger :label="__('Delete Account')" />
</x-splade-form>
>>>>>>> aaef57a2b34cbccb6487ba81ce70214bd2356637

</section>
41 changes: 20 additions & 21 deletions resources/views/profile/partials/update-password-form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</p>
</header>

<<<<<<< HEAD

<form method="post" action="{{ route('password.update') }}" class="mt-6 space-y-6">
@csrf
@method('put')
Expand All @@ -34,24 +34,23 @@ class="mt-1 block w-full" autocomplete="current-password" />
class="mt-1 block w-full" autocomplete="new-password" />
<x-input-error :messages="$errors->updatePassword->get('password_confirmation')" class="mt-2" />
</div>
=======
<x-splade-form method="put" :action="route('password.update')" class="mt-6 space-y-6" preserve-scroll>
<x-splade-input id="current_password" name="current_password" type="password" :label="__('Current Password')" autocomplete="current-password" />
<x-splade-input id="password" name="password" type="password" :label="__('New Password')" autocomplete="new-password" />
<x-splade-input id="password_confirmation" name="password_confirmation" type="password" :label="__('Confirm Password')" autocomplete="new-password" />
>>>>>>> aaef57a2b34cbccb6487ba81ce70214bd2356637

<div class="flex items-center gap-4">
<x-splade-submit :label="__('Save')" />

@if (session('status') === 'password-updated')
<<<<<<< HEAD
<p x-data="{ show: true }" x-show="show" x-transition x-init="setTimeout(() => show = false, 2000)"
class="text-sm text-gray-600">{{ __('Saved.') }}</p>
=======
<p class="text-sm text-gray-600">{{ __('Saved.') }}</p>
>>>>>>> aaef57a2b34cbccb6487ba81ce70214bd2356637
@endif
</div>
</x-splade-form>
<x-splade-form method="put" :action="route('password.update')" class="mt-6 space-y-6" preserve-scroll>
<x-splade-input id="current_password" name="current_password" type="password" :label="__('Current Password')"
autocomplete="current-password" />
<x-splade-input id="password" name="password" type="password" :label="__('New Password')"
autocomplete="new-password" />
<x-splade-input id="password_confirmation" name="password_confirmation" type="password" :label="__('Confirm Password')"
autocomplete="new-password" />

<div class="flex items-center gap-4">
<x-splade-submit :label="__('Save')" />

@if (session('status') === 'password-updated')
<p x-data="{ show: true }" x-show="show" x-transition x-init="setTimeout(() => show = false, 2000)"
class="text-sm text-gray-600">{{ __('Saved.') }}</p>

<p class="text-sm text-gray-600">{{ __('Saved.') }}</p>
@endif
</div>
</x-splade-form>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -10,65 +10,66 @@
</header>

<x-splade-form method="patch" :action="route('profile.update')" :default="$user" class="mt-6 space-y-6" preserve-scroll>
<x-splade-input id="name" name="name" type="text" :label="__('Name')" required autofocus autocomplete="name" />
<x-splade-input id="name" name="name" type="text" :label="__('Name')" required autofocus
autocomplete="name" />
<x-splade-input id="email" name="email" type="email" :label="__('Email')" required autocomplete="email" />

@if ($user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail && ! $user->hasVerifiedEmail())
@if ($user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail && !$user->hasVerifiedEmail())
<div>
<p class="text-sm mt-2 text-gray-800">
{{ __('Your email address is unverified.') }}

<<<<<<< HEAD
<div>
<x-input-label for="name" :value="__('Name')" />
<x-text-input id="name" name="name" type="text" class="mt-1 block w-full" :value="old('name', $user->name)"
required autofocus autocomplete="name" />
<x-input-error class="mt-2" :messages="$errors->get('name')" />
</div>

<div>
<x-input-label for="email" :value="__('Email')" />
<x-text-input id="email" name="email" type="email" class="mt-1 block w-full" :value="old('email', $user->email)"
required autocomplete="username" />
<x-input-error class="mt-2" :messages="$errors->get('email')" />
<div>
<x-input-label for="name" :value="__('Name')" />
<x-text-input id="name" name="name" type="text" class="mt-1 block w-full"
:value="old('name', $user->name)" required autofocus autocomplete="name" />
<x-input-error class="mt-2" :messages="$errors->get('name')" />
</div>

@if ($user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail && !$user->hasVerifiedEmail())
<div>
<p class="text-sm mt-2 text-gray-800">
{{ __('Your email address is unverified.') }}
<x-input-label for="email" :value="__('Email')" />
<x-text-input id="email" name="email" type="email" class="mt-1 block w-full"
:value="old('email', $user->email)" required autocomplete="username" />
<x-input-error class="mt-2" :messages="$errors->get('email')" />

@if ($user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail && !$user->hasVerifiedEmail())
<div>
<p class="text-sm mt-2 text-gray-800">
{{ __('Your email address is unverified.') }}

<button form="send-verification"
class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
{{ __('Click here to re-send the verification email.') }}
</button>

<Link method="post" href="{{ route('verification.send') }}"
class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
{{ __('Click here to re-send the verification email.') }}
</Link>
</p>

<button form="send-verification"
class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
{{ __('Click here to re-send the verification email.') }}
</button>
=======
<Link method="post" href="{{ route('verification.send') }}" class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
{{ __('Click here to re-send the verification email.') }}
</Link>
</p>
@if (session('status') === 'verification-link-sent')
<p class="mt-2 font-medium text-sm text-green-600">
{{ __('A new verification link has been sent to your email address.') }}

@if (session('status') === 'verification-link-sent')
<p class="mt-2 font-medium text-sm text-green-600">
{{ __('A new verification link has been sent to your email address.') }}
>>>>>>> aaef57a2b34cbccb6487ba81ce70214bd2356637
</p>
@endif
</div>
@endif
</p>
@endif
</div>
@endif

<div class="flex items-center gap-4">
<x-splade-submit :label="__('Save')" />
<div class="flex items-center gap-4">
<x-splade-submit :label="__('Save')" />

@if (session('status') === 'profile-updated')
<<<<<<< HEAD
<p x-data="{ show: true }" x-show="show" x-transition x-init="setTimeout(() => show = false, 2000)"
class="text-sm text-gray-600">{{ __('Saved.') }}</p>
=======
<p class="text-sm text-gray-600">
{{ __('Saved.') }}
</p>
>>>>>>> aaef57a2b34cbccb6487ba81ce70214bd2356637
@endif
</div>
@if (session('status') === 'profile-updated')
<<<<<<< HEAD <p x-data="{ show: true }" x-show="show" x-transition x-init="setTimeout(() => show = false, 2000)"
class="text-sm text-gray-600">{{ __('Saved.') }}</p>
=======
<p class="text-sm text-gray-600">
{{ __('Saved.') }}
</p>
>>>>>>> aaef57a2b34cbccb6487ba81ce70214bd2356637
@endif
</div>
</x-splade-form>
</section>

0 comments on commit f681d0f

Please sign in to comment.