rizal245754733

form.blade.php

May 28th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.29 KB | None | 0 0
  1. @if(isset($karyawan))
  2. {!! Form::hidden('id', $karyawan->id) !!}
  3. @endif
  4.  
  5. @if($errors->any())
  6.   <div class="form-group {{ $errors->has('foto') ? 'has-error' : 'has-success'}}">
  7. @else
  8. < div class="form-group">
  9. @endif
  10.       {!! Form::label('foto', 'Foto', ['class'=>'control-label']) !!}
  11.       {!! Form::file('foto') !!}
  12.     @if(isset($karyawan))
  13.       {!! Form::hidden('foto_lama', $karyawan->foto) !!}
  14.     @endif
  15.     @if($errors->has('foto'))
  16.       <span class="help-block">{{ $errors->first('foto') }}</span>
  17.     @endif
  18.   </div>
  19.  
  20. @if($errors->any())
  21.   <div class="form-group {{ $errors->has('nip') ? 'has-error' : 'has-success' }}">
  22. @else
  23.   <div class="form-group">
  24. @endif
  25.   {!! Form::label('nip', 'NIP', ['class'=>'control-label']) !!}
  26.   {!! Form::text('nip', null, ['class'=> 'form-control']) !!}
  27.   @if($errors->any())
  28.   <span class="help-block">{{ $errors->first('nip') }}</span>
  29.   @endif
  30. </div>
  31.  
  32. @if($errors->any())
  33. <div class="form-group {{ $errors->has('nama') ? 'has-error' : 'has-success' }}">
  34. @else
  35. <div class="form-group">
  36. @endif
  37.   {!! Form::label('nama', 'Nama', ['class'=>'control-label']) !!}
  38.   {!! Form::text('nama', null, ['class'=> 'form-control']) !!}
  39.   @if($errors->any())
  40.   <span class="help-block">{{ $errors->first('nama') }}</span>
  41.   @endif
  42. </div>
  43.  
  44. @if($errors->any())
  45. <div class="form-group {{ $errors->has('tgl_lahir') ? 'has-error' : 'has-success' }}">
  46. @else
  47. <div class="form-group">
  48. @endif
  49.   {!! Form::label('tgl_lahir', 'Tanggal Lahir', ['class'=>'control-label']) !!}
  50.   {!! Form::date('tgl_lahir', null, ['class'=> 'form-control']) !!}
  51.   @if($errors->any())
  52.   <span class="help-block">{{ $errors->first('tgl_lahir') }}</span>
  53.   @endif
  54. </div>
  55.  
  56. @if($errors->any())
  57. <div class="form-group {{ $errors->has('gender') ? 'has-error' : 'has-success' }}">
  58. @else
  59. <div class="form-group">
  60. @endif
  61.   {!! Form::label('gender', 'Jenis Kelamin', ['class'=>'control-label']) !!}
  62.   <div class="radio">
  63.     <label>{!! Form::radio('gender','L') !!}Laki-Laki </label>
  64.     <label>{!! Form::radio('gender','P') !!}Perempuan </label>
  65.     @if($errors->any())
  66.     <span class="help-block">{{ $errors->first('gender') }}</span>
  67.     @endif
  68.   </div>
  69. </div>
  70.  
  71. <div class="form-group">
  72.   {!! Form::submit($submitButton, ['class' => 'btn btn-primary form-control']) !!}
  73. </div>
Advertisement
Add Comment
Please, Sign In to add comment