@extends('frontend3')

@section('content')
    <div id="siteContent" class="site-content">
        <div class="container mb-48">
            <div class="row">
                <div class="col-md-8 col-md-offset-2" style="margin-top: 15px">
                    <div class="panel panel-default">
                        <div class="panel-heading">Cập nhật lại mật khẩu</div>

                        <div class="panel-body">
                            <form class="form-horizontal" method="POST" action="{{ url('reset-password-phone') }}">
                                {{ csrf_field() }}

                                <input type="hidden" name="token" value="{{ $token }}">

                                <div class="form-group">
                                    <label for="email" class="col-md-4 control-label">SĐT</label>

                                    <div class="col-md-6">
                                        <input type="text" class="form-control" name="phone" value="{{ $phone }}"
                                               disabled>
                                    </div>
                                </div>
                                <input type="hidden" name="account_kit_token" value="{{ $token }}">

                                <div class="form-group">
                                    <label for="email" class="col-md-4 control-label">Loại người dùng</label>

                                    <div class="col-md-6">
                                        <select class="form-control" name="type_user" id="type_user2">
                                            @foreach($types as $type)
                                            <option value="{{ $type }}">{{ \App\User::TYPE_ARR[$type] }}</option>
                                                @endforeach
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
                                    <label for="password" class="col-md-4 control-label">Mật khẩu mới</label>

                                    <div class="col-md-6">
                                        <input type="password" class="form-control" name="password"
                                               required>

                                        @if ($errors->has('password'))
                                            <span class="help-block">
                                        <strong>{{ $errors->first('password') }}</strong>
                                    </span>
                                        @endif
                                    </div>
                                </div>

                                <div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
                                    <label for="password-confirm" class="col-md-4 control-label">Xác nhận lại mật
                                        khẩu</label>
                                    <div class="col-md-6">
                                        <input type="password" class="form-control"
                                               name="password_confirmation" required>

                                        @if ($errors->has('password_confirmation'))
                                            <span class="help-block">
                                        <strong>{{ $errors->first('password_confirmation') }}</strong>
                                    </span>
                                        @endif
                                    </div>
                                </div>

                                <div class="form-group">
                                    <div class="col-md-6 col-md-offset-4">
                                        <button type="submit" class="btn ht-btn-primary btn-block mt-12">
                                            Cập nhật mật khẩu
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
