@extends('layouts.master')
@section('content')
<?php

if($biodata->is_bio_simpan == "1"){$disabled = "readonly";}else{$disabled = " ";}

?>

<h2>Formulir Pendaftaran</h2>
{{-- {!! Form::model($biodata, ['route' => ['formulir_mhs.update', $biodata->id_user], 'method'=>'patch', 'files' => true, 'class' => 'form-horizontal']) !!}
{!! csrf_field() !!} --}}
<div class="alert alert-info" role="alert">
    <strong>Informasi !</strong> Silahkan Anda isi data di bawah ini dengan benar dan valid.
    <br>
    <strong>Tanda *</strong> Data Wajib untuk diisi.
    <br>
    <strong>Untuk Proses Simpan Data</strong> Hanya Dapat Dilakukan 1 Kali. Mohon Diteliti dengan benar, sebelum menyimpan.
</div>
<div class="card">
    <div class="card-header">
        <h4 class="card-title">Biodata</h4>
    </div>
    <div class="card-body">
        <div class="card-text">
            <div class="row">
                <div class="panel panel-info">
                    <div class="panel-body">
                        <div class="col-md-12">
                            <label class="form-label">Prodi*</label>
                            {{ Form::text('namapeserta', isset($biodata->namapeserta) ? $biodata->namapeserta : null, ['class' => 'form-control', 'style' => 'color: black; text-transform: uppercase', 'maxlength' => 40, $disabled, 'oninput' => 'validateInput(this)']) }}
                            <p id="error-message" style="color: red;"></p>
                            @if ($errors->has('namapeserta'))
                                <span class="invalid-feedback">
                                    <strong style="color: red">{{ $errors->first('namapeserta') }}</strong>
                                </span>
                            @endif
                        </div>
                        <div class="form-group d-flex align-items-center">
                            <label class="col-md-3 col-form-label text-md-right fs-6">Prodi*</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    {{ Form::text('namapeserta', isset($biodata->namapeserta) ? $biodata->namapeserta : null, ['class' => 'form-control', 'style' => 'color: black; text-transform: uppercase', 'maxlength' => 40, $disabled, 'oninput' => 'validateInput(this)']) }}
                                </div>
                                <p id="error-message" style="color: red;"></p>
                                @if ($errors->has('namapeserta'))
                                    <span class="invalid-feedback">
                                        <strong style="color: red">{{ $errors->first('namapeserta') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>

                        <div class="form-group d-flex align-items-center">
                            <label class="col-md-3 col-form-label text-md-right fs-6">Nama Lengkap (tanpa gelar)*</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    {{ Form::text('namapeserta', isset($biodata->namapeserta) ? $biodata->namapeserta : null, ['class' => 'form-control', 'style' => 'color: black; text-transform: uppercase', 'maxlength' => 40, $disabled, 'oninput' => 'validateInput(this)']) }}
                                </div>
                                <p id="error-message" style="color: red;"></p>
                                @if ($errors->has('namapeserta'))
                                    <span class="invalid-feedback">
                                        <strong style="color: red">{{ $errors->first('namapeserta') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>

                        <div class="form-group d-flex align-items-center">
                            <label class="col-md-3 col-form-label text-md-right fs-6">Jenis Prestasi*</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    {{ Form::text('namapeserta', isset($biodata->namapeserta) ? $biodata->namapeserta : null, ['class' => 'form-control', 'style' => 'color: black; text-transform: uppercase', 'maxlength' => 40, $disabled, 'oninput' => 'validateInput(this)']) }}
                                </div>
                                <p id="error-message" style="color: red;"></p>
                                @if ($errors->has('namapeserta'))
                                    <span class="invalid-feedback">
                                        <strong style="color: red">{{ $errors->first('namapeserta') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>

                        <div class="form-group d-flex align-items-center">
                            <label class="col-md-3 col-form-label text-md-right fs-6">Kewarganegaraan*</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    {{ Form::text('namapeserta', isset($biodata->namapeserta) ? $biodata->namapeserta : null, ['class' => 'form-control', 'style' => 'color: black; text-transform: uppercase', 'maxlength' => 40, $disabled, 'oninput' => 'validateInput(this)']) }}
                                </div>
                                <p id="error-message" style="color: red;"></p>
                                @if ($errors->has('namapeserta'))
                                    <span class="invalid-feedback">
                                        <strong style="color: red">{{ $errors->first('namapeserta') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>

                        <div class="form-group d-flex align-items-center">
                            <label class="col-md-3 col-form-label text-md-right fs-6">NIK Siswa*</label>
                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    {{ Form::text('namapeserta', isset($biodata->namapeserta) ? $biodata->namapeserta : null, ['class' => 'form-control', 'style' => 'color: black; text-transform: uppercase', 'maxlength' => 40, $disabled, 'oninput' => 'validateInput(this)']) }}
                                </div>
                                <p id="error-message" style="color: red;"></p>
                                @if ($errors->has('namapeserta'))
                                    <span class="invalid-feedback">
                                        <strong style="color: red">{{ $errors->first('namapeserta') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>

                        <div class="form-group d-flex align-items-center">
                            <label class="col-md-3 col-form-label text-md-right fs-6">Tempat Lahir*</label>
                            <div class="col-md-3 col-xs-6">                                            
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    {{ Form::text('tempatlahir', isset($biodata->tempatlahir) ? $biodata->tempatlahir : null, array('class' => 'form-control', 'style' => 'color: black; text-transform: capitalize', 'id'=>'txtNumeric', 'required', $disabled)) }}
                                </div>  
                                @if ($errors->has('tempatlahir'))
                                <span class="invalid-feedback">
                                    <strong><font style="color: red">{{ $errors->first('tempatlahir') }}</font></strong>
                                </span>
                                @endif                                         
                            </div>
            
                            <label class="col-lg-3 ml-2 control-label">Tanggal Lahir *</label>
                            <div class="col-md-3 col-xs-6">                                            
                                <div class="input-group">
                                    {{ Form::date('tgllahir', isset($biodata->tgllahir) ? $biodata->tgllahir : null, array('class' => 'form-control','maxlength'=> '10','placeholder'=>'dd/mm/yyyy', 'style' => 'color: black;','id'=>'datePickerId',$disabled,'min'=>'1955-01-01','required')) }}
                                </div>  
                                @if ($errors->has('tgllahir'))
                                <span class="invalid-feedback">
                                    <strong><font style="color: red">{{ $errors->first('tgllahir') }}</font></strong>
                                </span>
                                @endif                                            
                            </div>
                        </div>
                        
@stop

