From bcb5a149977e79b6fa46ea3691c795ab5163a0fd Mon Sep 17 00:00:00 2001 From: Nafies Luthfi Date: Tue, 2 May 2017 21:05:33 +0700 Subject: [PATCH] Added unit lang file and fixed unit forms --- resources/lang/id/unit.php | 24 ++++++++++++++++++++++++ resources/views/units/partials/forms.blade.php | 8 ++++---- 2 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 resources/lang/id/unit.php diff --git a/resources/lang/id/unit.php b/resources/lang/id/unit.php new file mode 100644 index 0000000..e2ecf0f --- /dev/null +++ b/resources/lang/id/unit.php @@ -0,0 +1,24 @@ + 'Satuan', + 'list' => 'Daftar Satuan', + 'empty' => 'Belum ada Satuan', + 'back_to_index' => 'Kembali ke daftar Satuan', + + // Actions + 'create' => 'Input Satuan Baru', + 'created' => 'Input Satuan baru telah berhasil.', + 'edit' => 'Edit Satuan', + 'update' => 'Update Satuan', + 'updated' => 'Update data Satuan telah berhasil.', + 'delete' => 'Hapus Satuan', + 'delete_confirm' => 'Anda yakin akan menghapus Satuan ini?', + 'deleted' => 'Hapus data Satuan telah berhasil.', + 'undeleted' => 'Data Satuan gagal dihapus.', + 'undeleteable' => 'Data Satuan tidak dapat dihapus.', + + // Attributes + 'name' => 'Nama Satuan', +]; \ No newline at end of file diff --git a/resources/views/units/partials/forms.blade.php b/resources/views/units/partials/forms.blade.php index f4e2668..39c6fb1 100644 --- a/resources/views/units/partials/forms.blade.php +++ b/resources/views/units/partials/forms.blade.php @@ -3,14 +3,14 @@ @endif @if (Request::get('action') == 'create') {!! Form::open(['route' => 'units.store']) !!} - {!! FormField::text('name') !!} + {!! FormField::text('name', ['label' => trans('unit.name'), 'required' => true]) !!} {!! Form::submit(trans('unit.create'), ['class' => 'btn btn-success']) !!} {{ link_to_route('units.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) }} {!! Form::close() !!} @endif @if (Request::get('action') == 'edit' && $editableUnit) {!! Form::model($editableUnit, ['route' => ['units.update', $editableUnit->id],'method' => 'patch']) !!} - {!! FormField::text('name') !!} + {!! FormField::text('name', ['label' => trans('unit.name'), 'required' => true]) !!} {!! Form::submit(trans('unit.update'), ['class' => 'btn btn-success']) !!} {{ link_to_route('units.index', trans('app.cancel'), [], ['class' => 'btn btn-default']) }} {!! Form::close() !!} @@ -22,9 +22,9 @@

{{ $editableUnit->name }}

{!! $errors->first('unit_id', ':message') !!} +
+ {{ trans('unit.delete_confirm') }} -
-
{{ trans('app.delete_confirm') }}