This commit is contained in:
Ludovic CANDELLIER
2022-12-22 18:16:25 +01:00
parent a03befbf44
commit fd1ab5cf04
9 changed files with 111 additions and 30 deletions

View File

@@ -0,0 +1,25 @@
@extends('Shop.layout.layout', [
'title' => __('Editer son profil'),
])
@section('content')
<div class="row">
<div class="col-6">
<x-card title="Mes coordonnées" class="gradient-green1">
@include('Shop.Customers.partials.registration')
</x-card>
</div>
<div class="col-6">
<x-card title="Mes adresses de livraison" class="gradient-green1 mb-3">
@include('Shop.Customers.partials.addresses')
</x-card>
<x-card title="Mon mot de passe" class="gradient-green1">
@include('Shop.auth.passwords.password_confirmation')
</x-card>
</div>
</div>
@endsection
@include('load.layout.modal')

View File

@@ -0,0 +1,21 @@
@foreach ($addresses ?? [] as $address)
<div class="row">
<div class="col-1">
<x-form.radios.icheck name="address_id" val="{{ $address['id'] }}" id="address_{{ $address['id'] }}"/>
</div>
<div class="col-11">
{{ $address['address'] }}<br/>
@if ($address['address2'])
{{ $address['address2'] }}<br/>
@endif
{{ $address['zipcode'] }} {{ $address['city'] }}
</div>
</div>
@endforeach
<div class="row">
<div class="col-12 text-right">
<x-form.button id="add_address" icon="fa-plus" txt="Ajouter une adresse" class="btn-warning btn-sm" />
</div>
</div>

View File

@@ -27,11 +27,14 @@
@push('js')
<script>
$('#profile_edit').click(function() {
window.location.assign("{{ route('Shop.Customers.edit') }}");
/*
openModal('Modification de vos coordonnées',
'profile-form',
"{{ route('Shop.Customers.modalProfile') }}/",
"{{ route('Shop.Customers.storeProfile') }}",
);
*/
});
</script>
@endpush

View File

@@ -13,28 +13,7 @@
<div class="row" style="padding: 10px 20px;">
<div class="col-xs-12 text-center" id="changePasswordMessage"></div>
</div>
<div class="row" style="padding: 10px 20px;">
<label for="new-password" class="col-md-6 control-label text-right">{{ __('current_password') }}</label>
<div class="col-md-6">
<input id="current-password" type="password" class="form-control" name="current-password" required>
</div>
</div>
<div class="row" style="padding: 10px 20px;">
<label for="new-password" class="col-md-6 control-label text-right">{{ __('new_password') }}</label>
<div class="col-md-6">
<input id="new-password" type="password" class="form-control" name="new-password" required>
</div>
</div>
<div class="row" style="padding: 10px 20px;">
<label for="new-password-confirm" class="col-md-6 control-label text-right">{{ __('confirm_new_password') }}</label>
<div class="col-md-6">
<input id="new-password-confirm" type="password" class="form-control" name="new-password_confirmation" required>
</div>
</div>
@include('Shop.auth.passwords.password_confirmation')
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="changePassword-submit">

View File

@@ -0,0 +1,22 @@
<div class="row mb-3">
<label for="new-password" class="col-md-6 control-label text-right">Mot de passe actuel</label>
<div class="col-md-6">
<input id="current-password" type="password" class="form-control" name="current-password" required>
</div>
</div>
<div class="row mb-3">
<label for="new-password" class="col-md-6 control-label text-right">Nouveau mot de passe</label>
<div class="col-md-6">
<input id="new-password" type="password" class="form-control" name="new-password" required>
</div>
</div>
<div class="row mb-3">
<label for="new-password-confirm" class="col-md-6 control-label text-right">Confirmez votre mot de passe</label>
<div class="col-md-6">
<input id="new-password-confirm" type="password" class="form-control" name="new-password_confirmation" required>
</div>
</div>

View File

@@ -1,7 +1,21 @@
<input type="{{ $type ?? 'text'}}" name="{{ $name }}" id="{{ $id_name ?? str_slug($name,'-') }}" class="form-control {{ $class ?? ''}}" value="{{ $value ?? ''}}"
@if (isset($required) && $required)required="required"@endif
@if (isset($disabled) && $disabled)disabled="disabled"@endif
@if (isset($mask))data-inputmask="'mask': '{{ $mask }}'"@endif
@if (isset($placeholder))placeholder="{{ $placeholder }}"@endif
{{ $meta ?? ''}}
>
@include('components.form.label')
@if (($disabled ?? false) || ($readonly ?? false))
@include('components.form.input', ['type' => 'hidden', 'label' => false, 'disabled' => false, 'readonly' => false])
@endif
<input type="{{ $type ?? 'text'}}" name="{{ $name }}" id="{{ $id_name ?? str_slug($name,'-') }}" class="form-control {{ $class ?? ''}}" value="{{ $value ?? null}}"
@if ($required ?? false) required @endif
@if ($disabled ?? false) disabled @endif
@if ($readonly ?? false) readonly @endif
@if ($autofocus ?? false) autofocus @endif
@if ($size ?? false) size="{{ $size }}" @endif
@if ($autocomplete ?? false) autocomplete="{{ $autocomplete }}" @endif
@if ($minlength ?? false) minlength={{ $minlength }} @endif
@if ($maxlength ?? false) maxlength={{ $maxlength }} @endif
@if ($formid ?? false) form="{{ $formid }}" @endif
@if ($mask ?? false) data-inputmask="'mask': '{{ $mask }}'" @endif
@if ($pattern ?? false) pattern="{{ $pattern }}" @endif
@if ($placeholder ?? false) placeholder="{{ $placeholder }}" @endif
@if ($step ?? false) step="{{ $step }}" @endif
{!! $meta ?? '' !!} >

View File

@@ -0,0 +1,6 @@
@if ($label ?? false)
{{ Form::label($name ?? '', ucfirst($label) . (($required ?? false) ? ' *' : ''), [
'class' => ($classlabel ?? '')
]) }}
@if (!($horizontal ?? false))<br/>@endif
@endif