<?php namespace App\Http\Controllers;?>
<!DOCTYPE html>
<html>
  <head>
    <title>Policy & Procedure | Admin |  Samuhik Saving & Co-Operative Society Ltd.</title>
    @include('Admin.Parts.MetaCSS')
    <style type="text/css">
    
    /* ================ Accordian section ================== */
    .panel-default > .panel-heading {
    background-color: #F4F7F7;
    border: none;
    }
    .panel-default {
    border: none;
    background: #F4F7F7;
    }
    .panel-heading {
    border-bottom: none;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    padding: 0px
    }
    .panel-title > a {
    background: #F4F7F7;
    display: block;
    padding: 10px 15px;
    color: #212121;
    font-size: 18px;
    position: relative;
    }
    .panel-title > a[aria-expanded=true]{
    background: #3452FF;
    color: #fff;
    }
    .panel-title > a[aria-expanded=true]:after{
    content: "-";
    background: #fff;
    color: #3452FF;
    }
    .panel-title > a:focus{
    text-decoration: none;
    }
    .panel-title > a:after{
    background: #3452ff none repeat scroll 0 0;
    border-radius: 2px;
    color: #fff;
    content: "+";
    height: 20px;
    line-height: 16px;
    position: absolute;
    right: 15px;
    text-align: center;
    top: 9px;
    width: 20px;
    font-weight: bold;
    }
    .panel-group .panel + .panel {
    margin-top: 6px;
    }
    .accordian-right-content h2{
    margin-bottom: 13px;
    }
    </style>
  </head>
  <body>
    <!--====================================================
    MAIN NAVBAR
    ======================================================-->
    @include('Admin.Parts.TopHeader')
    <!--====================================================
    PAGE CONTENT
    ======================================================-->
    <div class="page-content d-flex align-items-stretch">
      <!--***** SIDE NAVBAR *****-->
      @include('Admin.Parts.LeftNav')
      <div class="content-inner form-cont">
        <div class="row">
          <div class="col-md-12">
            <div class="row">
              <div class="col-md-6 col-lg-6">
                @if (session('info'))
                <div class="alert alert-success" style="text-transform: capitalize;">
                  {{session('info')}}
                </div>
                @endif
                @php
                  $pp=session('avisd');
                @endphp
                
                @if ($errors->any())
                <div class="alert alert-danger">
                  <ul>
                    @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                    @endforeach
                  </ul>
                </div>
                @endif
              </div>
            </div>
            <div class="card form " id="form1">
              
              
              <div class="col-lg-12 col-md-12">
                
                <div class="accorian-item">
                  
                  
                  <form action="admin_pp" method="post" enctype="multipart/form-data">
                    
                    @if(!$aa)
                    
                        <div class="form-group">
                      <label for="exampleTextarea">Policy<i style="color: red">*</i></label>
                      <textarea class="form-control ckeditor" id="exampleTextarea" rows="8" name="policy"></textarea>
                    </div>

                    <div class="form-group">
                      <label for="exampleTextarea">Policy in Nepali</label>
                      <a rel="nofollow" href="http://naya.com.np" title="Nepali Social Network" class="naya_convert" data-site="dark"></a>
                      <textarea class="form-control" id="exampleTextarea" rows="8" name="policy_nepali" placeholder="Enter Introduction here.."></textarea>
                    </div>

                
                    {{-- mission --}}

                    <div class="form-group">
                      <label for="exampleTextarea">Procedure<i style="color: red">*</i></label>
                      <textarea class="form-control ckeditor" id="exampleTextarea" rows="8" name="p_procedure"></textarea>
                    </div>

                    <div class="form-group">
                      <label for="exampleTextarea">Procedure in Nepali</label>
                      <a rel="nofollow" href="http://naya.com.np" title="Nepali Social Network" class="naya_convert" data-site="dark"></a>
                      <textarea class="form-control" id="exampleTextarea" rows="8" name="p_procedure_nepali" placeholder="Enter Mission here.."></textarea>
                    </div>

                    @else 
                    
                       <div class="form-group">
                      <label for="exampleTextarea">Policy<i style="color: red">*</i></label>
                      <textarea class="form-control ckeditor" id="exampleTextarea" rows="8" name="policy">{{$aa->policy}}</textarea>
                    </div>

                    <div class="form-group">
                      <label for="exampleTextarea">Policy in Nepali</label>
                      <a rel="nofollow" href="http://naya.com.np" title="Nepali Social Network" class="naya_convert" data-site="dark"></a>
                      <textarea class="form-control" id="exampleTextarea" rows="8" name="policy_nepali" placeholder="Enter Introduction here..">{{$aa->policy_nepali}}</textarea>
                    </div>

                    {{-- mission --}}

                    <div class="form-group">
                      <label for="exampleTextarea">Procedure<i style="color: red">*</i></label>
                      <textarea class="form-control ckeditor" id="exampleTextarea" rows="8" name="p_procedure">{{$aa->p_procedure}}</textarea>
                    </div>

                    <div class="form-group">
                      <label for="exampleTextarea">Procedure in Nepali</label>
                      <a rel="nofollow" href="http://naya.com.np" title="Nepali Social Network" class="naya_convert" data-site="dark"></a>
                      <textarea class="form-control" id="exampleTextarea" rows="8" name="p_procedure_nepali" placeholder="Enter Mission here..">{{$aa->p_procedure_nepali}}</textarea>
                    </div>

                 
                    
                    @endif
                    

                    <input type="hidden" name="_token" value="{{csrf_token()}}">
                            
                            <button type="reset" class="btn btn-general btn-white">Cancel</button>
                            <button type="submit" class="btn btn-general btn-blue mr-2">Save</button>

                  </form>
                </div>
              </div>
            </div>
            
          </div>
          
          
          
        </div>
      </div>
    </div>
  </div>
  @include('Admin.Parts.Js')
</body>
</html>