create.blade.php 4.62 KB
Newer Older
1 2 3 4 5 6 7
@extends('webprofile.backend.layouts.master')

@section('title')
  {{ $title }}
@stop

@section('breadcrumbs')
8
<li><a href="{{ url('home') }}">@lang('label.dashboard')</a></li>
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
<li class="active">@lang('feature.create_file')</li>
@stop

@section('content')
{!! Form::open(array('url' => route('file.store'), 'method' => 'POST', 'id' => 'file', 'class' => 'form-horizontal', 'files' => true)) !!}
{!! csrf_field() !!}
<!-- page start-->
<div class="row">
	<div class="col-md-9">
	    <div class="panel panel-default">
	        <div class="panel-heading">
	            <h3 class="panel-title"><strong>@lang('label.create')</strong> @lang('feature.file')</h3>
	        </div>
	        <div class="panel-body">
	            <div class="row">
	                <div class="col-md-12">
						<div class="form-group @if ($errors->has('categories_file')) has-error @endif" style="margin-top: 5px;">
						 	<label class="col-md-2 control-label">@lang('feature.categoryfile')</label>
							<div class="col-md-10">
28
								{{ Form::select('categories_file', $categoriesFile, old('categories_file'), ['class' => 'form-control select2', 'style' => 'width: 100%; font-size: 12px; height: 30px;', 'id' => 'categories_file', 'placeholder' => trans('feature.categoryfile'), 'required']) }}
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
								@if ($errors->has('categories_file'))
								<label id="login-error" class="error" for="login">{{$errors->first('categories_file')}}</label>
								@endif
							</div>
						</div>
	                    <div class="form-group @if ($errors->has('title')) has-error @endif">
	                        <label class="col-md-2 control-label">@lang('label.name') @lang('feature.file')</label>
	                        <div class="col-md-10">
	                          {{ Form::text('title', old('title'), ['class' => 'form-control']) }}
		                        @if ($errors->has('title'))
		                        <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
		                        @endif
	                        </div>
	                    </div>
	                    <div class="form-group">
							<label class="col-md-2 control-label">File</label>
							<div class="col-md-10">
								{{ Form::file('file', array('class'=>'fileinput btn-danger', 'id'=>'uploadImage', 'data-filename-placement'=>'inside', 'title'=>'Upload', 'onchange'=>'ValidateFile(this); checkFileSizeFile(this);')) }}
								<label for="information" class="error">Ekstensi File yang diperbolehkan : ".jpg", ".jpeg", ".png", ".doc", ".docx", ".pdf", ".xls", ".xlsx", ".mp3", ".mp4", ".mkv", "mpeg"</label>
							</div>
						</div>
	                </div>
	            </div>
	        </div>
	    </div>
	</div>
	<div class="col-md-3">
	    <div class="panel panel-default">
	        <div class="panel-heading">
	            <h3 class="panel-title"><strong>@lang('label.publish')</strong></h3>
	            <ul class="panel-controls">
	                <li><a href="#" class="panel-collapse"><span class="fa fa-angle-down"></span></a></li>
	            </ul>
	        </div>
	        <div class="panel-body">
	            <div class="row">
	                <div class="col-md-12">
	                    <div class="form-group">
                            <label class="col-md-2 control-label">@lang('label.status')</label>
                            <div class="col-md-6">
                                <center>
									<label class="switch">
										{{ Form::checkbox('is_active', 1, true) }}
										<span></span>
									</label>
								</center>
                            </div>
                        </div>
	                </div>
	            </div>
	        </div>
	        <div class="panel-footer">
	        </div>
	    </div>
	</div>
	<div class="col-md-12">
	    <div class="panel panel-default">
	        <div class="panel-footer">
	            <button class="btn btn-info pull-right">@lang('label.save')</button>
	        </div>
	    </div>
	</div>
</div>
{!! Form::close() !!}
<!-- page end-->
@stop

@section('script')
<script src="{!!asset('backend/js/plugins/bootstrap/bootstrap-datepicker.js') !!}"></script>
<script src="{!!asset('backend/js/plugins/bootstrap/bootstrap-timepicker.min.js') !!}"></script>
<script src="{!!asset('backend/js/plugins/bootstrap/bootstrap-file-input.js') !!}"></script>
<script src="{!!asset('backend/js/plugins/summernote/summernote.js') !!}"></script>

<script type="text/javascript">
	function PreviewImage() {
		var oFReader = new FileReader();
		oFReader.readAsDataURL(document.getElementById("uploadImage").files[0]);

		oFReader.onload = function (oFREvent) {
			document.getElementById("uploadPreview").src = oFREvent.target.result;
		};
	};
</script>
@stop