Find us on facebook

Oct 12, 2017

Update View

@extends('layouts.app')
@section('content')
<div class="row">
    <div class="col-lg-12">
        <h2 class="label-info"></h2>
    </div>
    <!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                Update Profile
            </div>
            <!-- /.panel-heading -->
            <div class="panel-body">
                <p>
                    <form role="form" action="{!! url('/user/updateprofile'); !!}" method="post" enctype="multipart/form-data">
                        <input type="hidden" name="_token" value="{{ csrf_token() }}">
                        <input type="hidden" id="uid" name="uid" value="{{($profile['id']) ? $profile['id'] : ""}}">
                        <table class="table table-bordered table-striped">
                            <tbody>
                                <tr>
                                    <td><label>Profile Picture</label></td>
                                    <td><input type='file' id="prof_pic" name="prof_pic" />
                                <img id="profPic"  alt="your image" style="width: 100px;" src="{{ URL::asset(($profile['profile_image']) ? '/images/profiles/'.$profile['profile_image'] : '/images/profiles/profile.jpg') }}" /></td>
                            </tr>
                        </tbody>
                    </table>
                    <table class="table table-bordered table-striped">
                        <tbody>
                            <tr>
                                <td><label>Name</label></td>
                                <td colspan="3"><input class="form-control"  id ="name" name ="name" value="{{($profile['name']) ? $profile['name'] : ""}}"></td>
                            </tr>
                            <tr>
                                <td><label>Username</label></td>
                                <td><input class="form-control" disabled id ="username" name ="username" value="{{($profile['username']) ? $profile['username'] : ""}}"></td>
                                <td><label>User level</label></td>
                                <td><input class="form-control"  disabled id ="user_level" name ="user_level" value="{{($profile['user_level']) ? \Config::get('config.userLevel') [$profile['user_level']]: ""}}"></td>
                            </tr>
                            <tr>
                                <td><label>Email</label></td>
                                <td colspan="3"><input class="form-control"  id ="email" name ="email" value="{{($profile['email']) ? $profile['email'] : ""}}"></td>
                            </tr>
                            <tr>
                                <td><label>Phone No 1.</label></td>
                                <td><input class="form-control"  id ="phone_no1" name ="phone_no1" value="{{($profile['phone_no_1']) ? $profile['phone_no_1'] : ""}}"></td>
                                <td><label>Phone No 2.</label></td>
                                <td><input class="form-control"  id ="phone_no2" name ="phone_no2" value="{{($profile['phone_no_2']) ? $profile['phone_no_2'] : ""}}"></td>
                            </tr>
                            <tr>
                                <td><label>Address</label></td>
                                <td><textarea class="form-control" rows="2" id="address" name="address" >{{($profile['address']) ? $profile['address'] : ""}}</textarea></td>
                                <td><label>Date Joined</label></td>
                                <td><input class="form-control" disabled id ="date_joined" name ="date_joined" value="{{($profile['date_joined']) ? $profile['date_joined'] : ""}}"></td>
                            </tr>
                            <tr>
                                <td><label>Report to</label></td>
                                <td colspan="3"><input class="form-control"  id ="report_to" name ="report_to" value="{{($profile['report_to']) ? $profile['report_to'] : ""}}"></td>
                            </tr>
                        </tbody>
                    </table>
                    <button type="submit" class="btn btn-default btn-primary" id="profile_submit" style="float: right;">Save </button>
                    <div style="clear: both;"></div>
                </form>
            </p>
        </div>
        <!-- /.panel-body -->
    </div>
    <!-- /.panel -->
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<script type="text/javascript" src="{{ URL::asset('/js/app/user/app.user.profile.js') }}"></script>
@endsection

No comments:

Post a Comment