You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
3.3 KiB
PHTML

6 years ago
@extends('layouts.app')
@section('site-name','Sistem Informasi SPP')
@section('page-name', (isset($periode) ? 'Ubah Periode' : 'Periode Baru'))
@section('content')
<div class="row">
<div class="col-8">
<form action="{{ (isset($periode) ? route('periode.update', $periode->id) : route('periode.create')) }}" method="post" class="card">
<div class="card-header">
<h3 class="card-title">@yield('page-name')</h3>
</div>
<div class="card-body">
@if($errors->any())
<div class="alert alert-danger">
@foreach($errors->all() as $error)
{{ $error }}<br>
@endforeach
</div>
@endif
<div class="row">
<div class="col-12">
@csrf
<div class="form-group">
<label class="form-label">Nama</label>
<input type="text" class="form-control" name="nama" placeholder="Nama" required>
</div>
<div class="form-group">
<label class="form-label">Tanggal Mulai s/d Selesai</label>
<div class="row gutters-xs">
<div class="col-6">
<input type="text" class="form-control" name="tgl_mulai" data-toggle="datepicker" placeholder="Tanggal Mulai" required autocomplete="off">
</div>
<div class="col-6">
<input type="text" class="form-control" name="tgl_selesai" data-toggle="datepicker" placeholder="Tanggal Selesai" required autocomplete="off">
</div>
</div>
</div>
<div class="form-group">
<div class="form-label">Status</div>
<label class="custom-switch">
<input type="checkbox" name="is_active" value="1" class="custom-switch-input">
<span class="custom-switch-indicator"></span>
<span class="custom-switch-description">Aktif</span>
</label>
</div>
</div>
</div>
</div>
<div class="card-footer text-right">
<div class="d-flex">
<a href="{{ url()->previous() }}" class="btn btn-link">Batal</a>
<button type="submit" class="btn btn-primary ml-auto">Simpan</button>
</div>
</div>
</form>
</div>
</div>
@endsection
@section('js')
<script>
require(['jquery', 'selectize','datepicker'], function ($, selectize) {
$(document).ready(function () {
$('[data-toggle="datepicker"]').datepicker({
format: 'yyyy/MM/dd'
});
});
});
</script>
@endsection