contact.blade.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. @extends('layouts.app', ['meta_description' => 'Contact Form'])
  2. @section('content')
  3. @include('partials.nav')
  4. <br>
  5. <div class="container">
  6. <div class="row">
  7. <div class="col-md-8 col-md-offset-2">
  8. <div class="panel panel-default background-colored">
  9. <div class="panel-heading background-colored text-center">Formulaire de contact</div>
  10. <div class="panel-body"></div>
  11. <form class="form-horizontal" role="form" method="POST" action="{{ url('/contact') }}">
  12. {!! csrf_field() !!}
  13. <div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
  14. <label class="col-md-4 control-label">Nom</label>
  15. <div class="col-md-6">
  16. @if (Auth::guest())
  17. <input type="text" class="form-control" name="name" value="{{old('name')}}">
  18. @else
  19. <input type="text" class="form-control" name="name" value="{{$name}}">
  20. @endif
  21. @if ($errors->has('name'))
  22. <span class="help-block">
  23. <strong>{{ $errors->first('name') }}</strong>
  24. </span>
  25. @endif
  26. </div>
  27. </div>
  28. <div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
  29. <label class="col-md-4 control-label">Adresse e-mail</label>
  30. <div class="col-md-6">
  31. @if (Auth::guest())
  32. <input type="email" class="form-control" name="email" value="{{old('email')}}">
  33. @else
  34. <input type="email" class="form-control" name="email" value="{{$email}}">
  35. @endif
  36. @if ($errors->has('email'))
  37. <span class="help-block">
  38. <strong>{{ $errors->first('email') }}</strong>
  39. </span>
  40. @endif
  41. </div>
  42. </div>
  43. <div class="form-group{{ $errors->has('message') ? ' has-error' : '' }}">
  44. <label class="col-md-4 control-label">Votre message</label>
  45. <div class="col-md-6">
  46. <textarea rows="8" class="form-control" id="message"
  47. accesskey="" name="message" placeholder="Un commentaire, une critique, une idée d'amélioration ?">{{ old('message') }}</textarea>
  48. @if ($errors->has('message'))
  49. <span class="help-block">
  50. <strong>{{ $errors->first('message') }}</strong>
  51. </span>
  52. @endif
  53. </div>
  54. </div>
  55. <div class="form-group">
  56. <div class="col-md-6 col-md-offset-8">
  57. <button type="submit" class="btn btn-primary">
  58. <i class="fa fa-btn fa-envelope-o"></i>Envoyer
  59. </button>
  60. </div>
  61. </div>
  62. </div>
  63. </form>
  64. </div>
  65. </div>
  66. </div>
  67. @endsection