Files
eatvio-infra/resources/views/livewire/profile/edit-detailz-form.blade.php
2023-10-04 17:57:09 +03:00

209 lines
13 KiB
PHP

<div class="mt-3">
<div class="" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-0" role="tabpanel" aria-labelledby="pills-0-tab">
{{-- <form class="form-signin" name='init_registration' method="post" action="/register"> --}}
<div class="progress mb-2 w-100" style="display:none;">
<div class="progress-bar" role="progressbar" style="width:25%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="Steps" id="registrationSteps">
<div>
<div class="row">
<div class="col-6">
<input type="text" id="inputFirstName" wire:model.blur="detailzForm.first_name" name="first_name" class="form-control" placeholder="{{ __('reg_form.first_name') }}" required="" />
</div>
<div class="col-6">
<input type="text" id="inputLastName" wire:model.blur="detailzForm.last_name" name="last_name" class="form-control" placeholder="{{ __('reg_form.last_name') }}" required="" />
</div>
</div>
<input type="email" wire:model.blur="detailzForm.email" autocomplete="email" id="inputEmail" name="email" autocomplete="email" class="form-control my-3" placeholder="{{ __('reg_form.login') }}" required="" />
<div class="text-center --f_bold">{{ __('reg_form.date_of_birth') }}</div>
<div class="--with_arr">
<!-- http://t1m0n.name/air-datepicker/docs/index-ru.html -->
<input type="text" id="birthdate" wire:model.blur="detailzForm.birthdate" name="birthdate" data-date-format="yyyy-mm-dd" class="form-control my-3 text-center --f_bold" required="" autocomplete="off" />
<span></span>
</div>
<div class="my-3 text-center --f_bold">{{ __('reg_form.gender') }}</div>
<div class="btn-group mb-3 d-flex justify-content-center --roundredRadioButtons">
<input type="radio" wire:model.blur="detailzForm.gender" class="btn-check" name="gender" id="genderM" autocomplete="off" @checked($detailzForm->gender == "male") value="male" />
<label class="btn btn-x btn-primary" for="genderM">{{ __('reg_form.male') }}</label>
<input type="radio" wire:model.blur="detailzForm.gender" class="btn-check" name="gender" id="genderF" autocomplete="off" @checked($detailzForm->gender == "female") value="female" />
<label class="btn btn-lg btn-primary" for="genderF">{{ __('reg_form.female') }}</label>
</div>
</div>
<div>
<div class="row mt-4">
<div class="col-6">
<div class="text-center --f_bold">{{ __('reg_form.country') }}</div>
<div class="--with_arr my-3">
<select wire:model.blur="detailzForm.country" class="form-select text-center" name="country">
<option @selected($detailzForm->country == __('reg_form.country_ru'))>{{ __('reg_form.country_ru') }}</option>
<option @selected($detailzForm->country == __('reg_form.country_ua'))>{{ __('reg_form.country_ua') }}</option>
</select>
<span></span>
</div>
</div>
<div class="col-6">
<div class="text-center --f_bold">{{ __('reg_form.city') }}</div>
<div class="--with_arr my-3">
<select wire:model.blur="detailzForm.city" class="form-select text-center" name="city">
<option @selected($detailzForm->city == __('reg_form.city_msk'))>{{ __('reg_form.city_msk') }}</option>
<option @selected($detailzForm->city == __('reg_form.city_kv'))>{{ __('reg_form.city_kv') }}</option>
</select>
<span></span>
</div>
</div>
</div>
<div class="text-center --f_bold">{{ __('reg_form.talk_lang') }}</div>
<div class="--with_arr my-3">
<select wire:model.blur="detailzForm.lang" class="form-select text-center" name="lang">
<option @selected($detailzForm->lang == __('reg_form.talk_lang_ru'))>{{ __('reg_form.talk_lang_ru') }}</option>
<option @selected($detailzForm->lang == __('reg_form.talk_lang_ua'))>{{ __('reg_form.talk_lang_ua') }}</option>
<option @selected($detailzForm->lang == __('reg_form.talk_lang_pl'))>{{ __('reg_form.talk_lang_pl') }}</option>
</select>
<span></span>
</div>
<div class="text-center --f_bold">{{ __('reg_form.your_weight') }}</div>
<input wire:model.blur="detailzForm.weight" type="number" id="inputWeight" name="weight" class="form-control my-3 text-center" />
<div class="text-center --f_bold">{{ __('reg_form.your_height') }}</div>
<input wire:model.blur="detailzForm.height" type="number" id="inputHeight" name="height" class="form-control my-3 text-center" />
</div>
<div>
<div class="my-3 text-center --f_bold">{{ __('reg_form.primary_measurements') }}</div>
<div class="row">
<div class="col-4">
<div class="text-center --f_bold">{{ __('reg_form.chest_circumference') }}</div>
<input wire:model.blur="detailzForm.chest_circumference" type="number" name="chest_circumference" class="form-control my-3 text-center" />
</div>
<div class="col-4">
<div class="text-center --f_bold">{{ __('reg_form.waist_circumference') }}</div>
<input wire:model.blur="detailzForm.waist_circumference" type="number" name="waist_circumference" class="form-control my-3 text-center" />
</div>
<div class="col-4">
<div class="text-center --f_bold">{{ __('reg_form.hip_circumference') }}</div>
<input wire:model.blur="detailzForm.hip_circumference" type="number" name="hip_circumference" class="form-control my-3 text-center" />
</div>
</div>
</div>
<div>
<div class="my-3 text-center --f_bold">{{ __('reg_form.your_blood_pressure') }}</div>
<div class="text-center --f_bold">{{ __('reg_form.average_pressure_readings') }}</div>
<div class="row">
<div class="col-6">
<div class="text-center --f_bold">{{ __('reg_form.pressure_up') }}</div>
<input wire:model.blur="detailzForm.blood_pressure_up" type="number" name="blood_pressure_up" class="form-control my-3 text-center" />
</div>
<div class="col-6">
<div class="text-center --f_bold">{{ __('reg_form.pressure_down') }}</div>
<input wire:model.blur="detailzForm.blood_pressure_down" type="number" name="blood_pressure_down" class="form-control my-3 text-center" />
</div>
</div>
<div class="text-center --f_bold">{{ __('reg_form.tendency_to_be_hypo') }}</div>
<div class="--with_arr my-3">
<select wire:model.blur="detailzForm.has_hypo" class="form-select text-center" name="has_hypo">
<option value="0" @selected($detailzForm->has_hypo == 0)>{{ __('reg_form.no') }}</option>
<option value="1" @selected($detailzForm->has_hypo == 1)>{{ __('reg_form.yes') }}</option>
</select>
<span></span>
</div>
<div class="text-center --f_bold">{{ __('reg_form.prone_to_hypertension') }}</div>
<div class="--with_arr my-3">
<select wire:model.blur="detailzForm.has_hyper" class="form-select text-center" name="has_hyper">
<option value="0" @selected($detailzForm->has_hyper == 0)>{{ __('reg_form.no') }}</option>
<option value="1" @selected($detailzForm->has_hyper == 1)>{{ __('reg_form.yes') }}</option>
</select>
<span></span>
</div>
</div>
<div>
<div class="my-3 text-center --f_bold">{{ __('reg_form.has_alergy') }}</div>
<textarea name="about_alergy" wire:model.blur="detailzForm.about_alergy" class="form-control my-3" placeholder="{{ __('reg_form.enter_info') }}" style="min-height">{{ $detailzForm->about_alergy }}</textarea>
</div>
<div>
<div class="my-3 text-center --f_bold">{{ __('reg_form.take_pils') }}</div>
<textarea name="about_taking_pils" wire:model.blur="detailzForm.about_taking_pils" class="form-control my-3" placeholder="{{ __('reg_form.enter_info') }}" style="min-height">{{ $detailzForm->about_taking_pils }}</textarea>
</div>
<div>
<div class="my-3 text-center --f_bold">{{ __('reg_form.sport_hobbies') }}</div>
<textarea name="about_sport_hobbies" wire:model.blur="detailzForm.about_sport_hobbies" class="form-control my-3" placeholder="{{ __('reg_form.enter_info') }}" style="min-height">{{ $detailzForm->about_sport_hobbies }}</textarea>
</div>
<div>
<div class="my-3 text-center --f_bold">{{ __('reg_form.favorite_foods_q') }}</div>
<div class="text-center"> {{ __('reg_form.favorite_foods') }} </div>
<textarea name="favorite_foods" wire:model.blur="detailzForm.favorite_foods" class="form-control" placeholder="{{ __('reg_form.favorite_foods') }}" style="min-height:140px">{{ $detailzForm->favorite_foods }}</textarea>
<div class="text-center"> {{ __('reg_form.unfavorite_foods') }} </div>
<textarea name="unfavorite_foods" wire:model.blur="detailzForm.unfavorite_foods" class="form-control my-3" placeholder="{{ __('reg_form.unfavorite_foods') }}" style="min-height:140px">{{ $detailzForm->unfavorite_foods }}</textarea>
</div>
<div>
<div class="my-3 text-center --f_bold">{{ __('reg_form.optional_info') }}</div>
<textarea name="additional_info" wire:model.blur="detailzForm.additional_info" class="form-control my-3" placeholder="{{ __('reg_form.any_additional_info') }}" style="min-height:140px">{{ $detailzForm->additional_info }}</textarea>
</div>
</div>
@if ($errors->any())
<div class="container p-0 --mw-130">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
@endif
<div class="container p-0 --mw-130">
<button wire:click.prevent="refineDetailz" class="btn btn-lg btn-primary btn-block w-100 --f_bolder disabled:opacity-50" type="button">
<span wire:loading="" wire:target="refineDetailz" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
<span>{{__('reg_form.save_changes')}}</span>
</button>
</div>
<hr>
<div class="row">
<div class="my-3 text-center --f_bold">{{ __('reg_form.update_password_head') }}</div>
<div class="col-3">
<input type="password" wire:model.blur="currentPassword" id="oldInputPassword" name="old-password" autocomplete="off" class="form-control my-3" placeholder="{{ __('reg_form.cur_password') }}" required="" />
@error('currentPassword')<label for="old-password" class="error_password">{{ $message }}</label>@enderror
</div>
<div class="col-3">
<input type="password" wire:model.blur="newPassword" id="inputPassword" name="password" autocomplete="off" class="form-control my-3" placeholder="{{ __('reg_form.password') }}" required="" />
@error('newPassword')<label for="password" class="error_password">{{ $message }}</label>@enderror
</div>
<div class="col-3">
<input type="password" wire:model.blur="newPasswordConfirm" id="inputPassword_confirmation" name="password_confirmation" autocomplete="off" class="form-control my-3" placeholder="{{ __('reg_form.password_confirmation') }}" required="" />
@error('newPasswordConfirm')<label for="password_confirmation" class="error_password">{{ $message }}</label>@enderror
</div>
<div class="col p-3 --mw-130">
<button wire:click.prevent="updatePassword" class="btn btn-lg btn-primary btn-block w-100 --f_bolder disabled:opacity-50" type="button">
<span wire:loading="" wire:target="updatePassword" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
<span>{{ __('reg_form.update_password') }} </span>
</button>
</div>
</div>
{{-- </form> --}}
</div>
</div>
</div>