@extends('lamis.layout.main')
@section('content')


 <!--Contents-->
    <main>
      
        <div class="inner_header">
            <div class="container">
                <h2>{{__('site.add_project')}}</h2>
            </div>
            <img src="{{url('')}}/assets/lamis/images/home-topr.png" alt="" class="slider_shape">
        </div>


        <section class="registeration">
             @if(Session::has('message'))
<p class="alert {{ Session::get('alert-class', 'alert-danger') }}">{{ Session::get('message') }}</p>
@endif
               @if ($errors->any())
      <div class="alert alert-danger">
          <ul>
              @foreach ($errors->all() as $error)
                  <li>{{ $error }}</li>
              @endforeach
          </ul>
      </div>
  @endif
            <div class="container">
                <div class="text-content text-center">
                    <h4>{{__('site.add_project')}}</h4>
                </div>
                    <div class="form-container">
                       <form method="post" action="{{url(getCurrentLocale().'/add/project/')}}">
                        @CSRF
                            <div class="row">
                                
                                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                                    <label>{{__('site.project_name')}}</label>
                                    <input type="text" name="project_name" class="form-control" placeholder="{{__('site.project_name')}}  ..." value="{{old('project_name')}}">
            
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                                    
                                        <label>{{__('site.idea_project')}}</label>
                                        <input name="idea" placeholder="{{__('site.idea_project')}} " class="form-control">
                                    
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                                    <div class="select-container">
                                         <label>{{__('site.field')}}</label>
                                        <select id="inputState" name="field_id" class="form-control">
                                            @foreach($fields as $row)
                                            <option value="{{$row->id}}">{{$row->name}}</option>
                                            @endforeach
                                          </select>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                                     <div class="select-container">
                                    <label>{{__('site.type_idea')}} </label>
                                      <select name="idea_id" class="form-control">
                                            
                                          @foreach($ideas as $row)
                                            <option  value="{{$row->id}}">{{$row->name}}</option>
                                            @endforeach
                                          </select>
                                    
                                </div>
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                                    <div class="select-container">
                                         <label>{{__('site.level')}}</label>
                                        <select id="inputState" name="level_id" class="form-control">
                                            @foreach($levels as $row)
                                            <option value="{{$row->id}}">{{$row->name}}</option>
                                            @endforeach
                                          </select>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pt-4">
                                    <label>{{__('site.team_work')}}</label>
                                    <div class="present-radios">
                                        <div class="form-check">
                                            <label class="form-check-label" for="yes">
                                                <input type="radio"  class="form-check-input" name="team_work"  id="yes" value="yes">
                                                 <span class="checkmark"></span>
                                                 <span class="text">{{__('site.yes')}}</span>
                                              
                                            </label>
                                        </div>
                                        <div class="form-check">
                                            <label class="form-check-label" for="no">
                                                <input class="form-check-input" type="radio" name="team_work" id="no" value="no">
                                                <span class="checkmark"></span>
                                                <span class="text">{{__('site.no')}}</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                
                                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pt-4">
                                    <label>{{__('site.license')}}</label>
                                    <div class="present-radios">
                                        <div class="form-check">
                                            <label class="form-check-label" for="yes-licence">
                                                <input type="radio" class="form-check-input" name="license"  id="yes-licence" value="yes">
                                                 <span class="checkmark"></span>
                                                 <span class="text">{{__('site.yes')}}</span>
                                              
                                            </label>
                                        </div>
                                        <div class="form-check">
                                            <label class="form-check-label" for="no-licence">
                                                <input class="form-check-input" type="radio" name="license"  id="no-licence" value="no">
                                                <span class="checkmark"></span>
                                                <span class="text">{{__('site.no')}}</span>
                                            </label>
                                        </div>
                                        <div class="form-check">
                                            <label class="form-check-label" for="other">
                                                <input class="form-check-input" type="radio" name="license"  id="other" value="other">
                                                <span class="checkmark"></span>
                                                <span class="text">{{__('site.other')}}</span>
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                
                                <div class="col-12">
                                     <label>{{__('site.descriptionser')}} </label>
                                    <textarea class="form-control" name="description" placeholder="{{__('site.descriptionser')}}  ..."></textarea>
                                </div>
                                <div class="packages col-12">
                                    <label class="text-center w-100"> {{__('site.packages')}} </label>
                                    <div class="row">
                                        @foreach($packages as $row)
                                        <div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
                                        <label class="select-package w-100">
                                            <input type="radio" name="package_id" class="card-input-element" value="{{$row->id}}" />
                                            <div class="card card-input">
                                                <div class="card-header text-center">
                                                    <div class="image-content">
                                                        <img src="{{asset('/lamis/images/packages/'.$row->img)}}">
                                                    </div>
                                                    <h5 class="main-color">{{packagename($row->id)}}</h5>
                                                </div>
                                                <div class="card-body">
                                                    <div class="text-content text-center background-gray">
                                                        <p>{{packagedescription($row->id)}}</p>
                                                    </div>
                                                   
                                                    
                                                  
                                                <div class="card-footer text-center background-gray">
                                                    <p class="main-color">
                                                        <span>{{$row->cost}}</span>
                                                        {{__('site.SAR')}}.
                                                    </p>
                                                   
                                                </div>
                                            </div>
                                        </label>
                                    </div>
                                        </label>
                                      
                                    </div>
                                     @endforeach
                                </div>
                                </div>
                                    <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                                     <label>{{__('site.pay_type')}}</label>
                                    <select name="pay_type" class="form-control">
                                        @foreach($ways as $row)
                                        <option value="{{$row['PaymentMethodId']}}">@if(getCurrentLocale() == 'ar') {{$row['PaymentMethodAr']}} @else {{$row['PaymentMethodEn']}} @endif</option>
                                        @endforeach
                                    </select>
                                </div>
                                
                                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                                     <label>{{__('site.credit_number')}}</label>
                      <input type="number" name="credit_number" class="form-control" placeholder="{{__('site.credit_number')}}" value="{{old('credit_number')}}">

                                </div>
                                <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
                                     <label>{{__('site.month')}}</label>
                      <input type="number" min="0" max="12" name="month" class="form-control" placeholder="{{__('site.month')}}" value="{{old('month')}}">
                      </div>
                                <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
                                     <label>{{__('site.year')}}</label>
<input type="number" name="year"min="0" max="99" class="form-control" placeholder="{{__('site.year')}}" value="{{old('year')}}">
                                </div>
                                     <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                                     <label>{{__('site.code')}}</label>
                      <input type="number" name="code" class="form-control" placeholder="{{__('site.code')}}" value="{{old('code')}}">

                                </div>
                               
                                
                                
                                <div class="col-12 m-auto">
                                    <button type="submit" class="btn register-btn">{{__('site.send')}}</button>
                                </div>
                            </div>
                       </form>
                </div>
            </div>
            <img src="{{url('')}}/assets/lamis/images/home-topr.png" alt="" class="r-top wow fadeInRight slow">
            <div class="polygan c-bottom"></div>
        </section>
    </main>
    <!--End-Contents-->





@stop