ugisugihartono

form.blade.php

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