@extends('layouts.admin_master')
@section('page-title')
    Admin | {{ $page_title }}
@endsection

@section('page-css')
@endsection
@section('page-content')
<div class="row">
    <!-- <form action="{{ url('admin/organisation/store') }}" method="POST" > -->
    <form action="{{ route('admin.organisation.update', ['id' => $organisation->id]) }}" method="POST">
        <input type="hidden" name="_method" value="PUT">
        <input type="hidden" name="id" value="{{ $organisation->id }}">
        {{ csrf_field() }}
        
        <div class="col-md-6">
            <div class="hpanel">
                <div class="panel-heading">Main Organisation (Dealer) </div>
                <div class="panel-body">
                    <div class="col-md-12">
                        @include('commons.notifications')
                    </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="fulname">Fullname</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="name" value="{{ $organisation->name }}" id="fullname" placeholder="Full Name of Organisation (Dealer)" required>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="email">Email</label>
                    <div class="col-sm-10">
                        <input type="email" name="email" class="form-control" value="{{ $organisation->email }}" id="email" placeholder="Organisation's Email" required>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="phone">Phone</label>
                    <div class="col-sm-10">
                    <input type="text"  name="phone" class="form-control" value="{{ $organisation->phone }}" id="phone" placeholder="Organisation's Phone " required >
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label" for="status">Status</label>
                    <div class="col-sm-10">
                        <select class="form-control" name="status" id="status">
                            <option value="active" @if($organisation->status == 'active') {{ 'selected' }} @else {{ '' }} @endif>Active</option>
                            <option value="pending" @if($organisation->status == 'pending') {{ 'selected' }} @else {{ '' }} @endif>Pending</option>
                            <option value="inactive" @if($organisation->status == 'inactive') {{ 'selected' }} @else {{ '' }} @endif >Inactive</option>
                        </select>
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <div class="col-sm-12" style="padding-top: 10px;">
                        <button class="btn btn-success btn-block" type="submit">Submit</button>
                    </div>
                </div>
                </div>
            </div>
        </div>
    </form>
</div>
@endsection