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


 <!--Contents-->
    <main>
         <div class="inner_header">
            <div class="container">
                <h2>{{__('site.edit')}}</h2>
            </div>
            <img src="{{url('')}}/assets/lamis/images/home-topr.png" alt="" class="slider_shape">
        </div>
      
        <section class="registeration">
               @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.edit')}}</h4>
                </div>
                    <div class="form-container">
                       <form method="post" action="{{url(getCurrentLocale().'/update/project/'.$project->id)}}">
                        @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="{{$project->project_name}}">
            
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                                   
                                        <label>{{__('site.idea')}}</label>
                                         <input type="text" name="idea" class="form-control" placeholder="{{__('site.idea')}}  ..." value="{{$project->idea}}">
            
                                    
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                                    <div class="select-container">
                                         <label>{{__('site.field')}}</label>
                                        <select name="field_id" class="form-control">
                                            @foreach($fields as $row)
                                            <option @if($project->field_id == $row->id) selected @endif 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 @if($project->idea_id == $row->id) selected @endif 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 @if($project->level_id == $row->id) selected @endif 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" @if($project->team_work == 'yes') checked="checked" @endif  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"  @if($project->team_work == 'no') checked="checked" @endif 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" @if($project->license == 'yes') checked="checked" @endif  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" @if($project->license == 'no') checked="checked" @endif 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" @if($project->license == 'other') checked="checked" @endif 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')}}  ...">{{$project->description}}</textarea>
                                </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