%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/silvzytp/calling_code/resources/views/backend/super-admin/pages/profile/
Upload File :
Create Path :
Current File : //home/silvzytp/calling_code/resources/views/backend/super-admin/pages/profile/profile.blade.php

@extends('layouts.backend')
@section('title', $siteTitle)
@section('action')
    <button type="submit" class="btn btn-sm btn-primary submit-form-btn">Save Change</button>
@endsection
@push('styles')
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.17/css/intlTelInput.css" />
<style>
    input.phone_number {
        height: 38px;
        width: 100%;
        border: 1px solid #ccc !important;
        border-radius: 3px;
    }
    .iti.iti--allow-dropdown {
        width: 100%;
    }
</style>
@endpush

@section('content')

    <div class="row">
        <div class="col-12">
            <form action="{{ route(routeName().'.profile.update') }}" method="POST" id="form" enctype="multipart/form-data">
                @csrf
                <div class="row">
                    <div class="col-md-8">
                        <div class="card">
                            <div class="card-body">
                                <x-form.inputbox name="full_name" labelName="Full Name" required="required" placeholder="Enter name" value="{{ $user->name ?? old('full_name') }}" error="full_name"/>

                                <x-form.inputbox type="email" name="email" labelName="Email" required="required" placeholder="Enter Email" value="{{ $user->email ?? old('email') }}" error="email"/>

                                <div class="form-group">
                                    <input id="phone_number" class="phone_number" value="{{ Auth::user()->phone_no }}" type="tel" placeholder="Phone Number">
                                    <input id="dialing" type="hidden">
                                    <input id="phone_no" name="phone_no" value="{{ Auth::user()->phone_no }}" type="hidden">
                                    <input type="hidden" id="country_code_number" name="country_code" value="{{ Auth::user()->country_code ?? 'us' }}">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-4">
                        <div class="card">
                            <div class="card-body">

                                <x-form.inputbox type="file" name="profile" labelName="Profile" error="profile"/>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>

@endsection

@push('scripts')
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.17/js/intlTelInput.min.js"></script>
<script>
    var input = document.querySelector("#phone_number");
    window.intlTelInput(input,({
        separateDialCode: true
    }));

    $('.iti__flag-container').click(function() {
        var countryCode = $('.iti__selected-flag').attr('title');
        var countryCode = countryCode.replace(/[^0-9]/g,'')
        var countryName = $('.iti__selected-flag').attr('aria-activedescendant');
        var countryArray = countryName.split('-');

        $('#country_code_number').val("");
        $('#phone_number').val("");
        $('input#dialing').val('');
        $('#phone_number').val($('#phone_number').val());
        $('input#dialing').val(countryCode);
        $('input#country_code_number').val(countryArray[2]);
    });

    $('input#dialing').val('1');

    $(document).on('keyup keypress', 'input#phone_number', function(){
        let code = $('input#dialing').val();
        let phone = $(this).val();
        $('input#phone_no').val('+'+code+phone);
    });
</script>
@endpush

Zerion Mini Shell 1.0