Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @extends('layouts.app')
- @section('htmlheader_title')
- Home
- @endsection
- @section('extraStyle')
- <style>
- .spacing-top{
- margin-top:15px;
- }
- #upload-file-selector {
- display:none;
- }
- .margin-correction {
- margin-right: 10px;
- }
- </style>
- @endsection
- @section('main-content')
- {{-- <section class="content-header">
- <h1>
- Blank page
- <small>it all starts here</small>
- </h1>
- <ol class="breadcrumb">
- <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
- <li><a href="#">Examples</a></li>
- <li class="active">Blank page</li>
- </ol>
- </section> --}}
- <!-- Main content -->
- <section class="content">
- <!-- Default box -->
- <div class="box">
- <div class="box-header with-border">
- <h3 class="box-title">Tambah Data Pelanggan</h3>
- <div class="box-tools pull-right">
- <a href="{{ route('item.index') }}"<button type="button" class="btn btn-box-tool" style="color: #888; font-size:12pt;" title="tambahkan data item"><i class="fa fa-arrow-left" aria-hidden="true"></i></button></a>
- </div>
- </div>
- <div class="box-body">
- <div class="row">
- <div class="col-md-8 col-md-offset-1">
- <form method="POST">
- <input type="hidden" name="_token" value="{{ csrf_token() }}">
- <input type="hidden" name="m_id" id="m_id">
- <div class="form-group">
- <label for="m_username">Username:</label>
- <input type="text" class="form-control" id="m_username" name="m_username" value="{{ old('m_username') }}">
- @if ($errors->has('m_username'))
- <span class="help-block">
- <strong>{{ $errors->first('m_username') }}</strong>
- </span>
- @endif
- </div>
- <div class="form-group">
- <label for="m_passwd">Password :</label>
- <input type="password" class="form-control" id="m_passwd" name="m_passwd" value="{{ old('m_passwd') }}">
- @if ($errors->has('m_passwd'))
- <span class="help-block">
- <strong>{{ $errors->first('m_passwd') }}</strong>
- </span>
- @endif
- </div>
- <div class="form-group">
- <label for="m_name">Nama :</label>
- <input type="text" class="form-control" id="m_name" name="m_name" value="{{ old('m_name') }}">
- @if ($errors->has('m_name'))
- <span class="help-block">
- <strong>{{ $errors->first('m_name') }}</strong>
- </span>
- @endif
- </div>
- <div class="form-group">
- <label for="m_birth_tgl">Tanggal Lahir :</label>
- <input type="date" class="form-control" id="m_birth_tgl" name="m_birth_tgl" value="{{ old('m_birth_tgl') }}">
- @if ($errors->has('m_birth_tgl'))
- <span class="help-block">
- <strong>{{ $errors->first('m_birth_tgl') }}</strong>
- </span>
- @endif
- </div>
- <div class="form-group">
- <label for="mhp_hp">Nomer HP :</label>
- <input type="text" class="form-control" id="mhp_hp" name="mhp_hp" value="{{ old('mhp_hp') }}">
- @if ($errors->has('mhp_hp'))
- <span class="help-block">
- <strong>{{ $errors->first('mhp_hp') }}</strong>
- </span>
- @endif
- </div>
- <div class="form-group">
- <label for="me_email">Email :</label>
- <input type="email" class="form-control" id="me_email" name="me_email" value="{{ old('me_email') }}">
- @if ($errors->has('me_email'))
- <span class="help-block">
- <strong>{{ $errors->first('me_email') }}</strong>
- </span>
- @endif
- </div>
- <div class="form-group">
- <label for="a_alamat">Alamat :</label>
- <input type="text" class="form-control" id="a_alamat" name="a_alamat" value="{{ old('a_alamat') }}">
- @if ($errors->has('a_alamat'))
- <span class="help-block">
- <strong>{{ $errors->first('a_alamat') }}</strong>
- </span>
- @endif
- </div>
- <div class="form-group">
- <label for="hak" class="col-sm-2 control-label">Hak:</label>
- <div class="col-sm-5">
- <select class="form-control" id="hak" name="hak" id="hak">
- <option value="petugas">petugas</option>
- <option value="pelanggan">pelanggan</option>
- </select>
- </div>
- </div>
- <button type="submit" class="btn btn-default">Submit</button>
- <button type="reset" class="btn btn-default">Reset</button>
- </form>
- </div>
- </div>
- </div>
- <!-- /.box-body -->
- </div>
- <!-- /.box -->
- </section>
- <!-- /.content -->
- @endsection
- @section('extraScript')
- <script type="text/javascript">
- $(".uploadGambar").on('change', function () {
- //alert($(".uploadGambar").val());
- if (typeof (FileReader) != "undefined") {
- var image_holder = $(".image-holder");
- image_holder.empty();
- var reader = new FileReader();
- reader.onload = function (e) {
- image_holder.html('<img src="{{ asset('image / loading1.gif') }}" class="img-responsive" width="40px">');
- $('.save').attr('disabled', true);
- setTimeout(function () {
- image_holder.empty();
- $("<img />", {
- "src": e.target.result,
- "class": "thumb-image img-responsive",
- "height": "80px",
- }).appendTo(image_holder);
- $('.save').attr('disabled', false);
- }, 2000)
- }
- image_holder.show();
- reader.readAsDataURL($(this)[0].files[0]);
- } else {
- alert("This browser does not support FileReader.");
- }
- });
- function jenisSubGenerated() {
- $('.btnSubJenis').html('<i class="fa fa-spinner" aria-hidden="true"></i>');
- $('.jenisSubSelect').attr('disabled', true);
- $('.classSelect').attr('disabled', true);
- $('.subClassSelect').attr('disabled', true);
- $.ajax({
- url: '/getSpesificSubJenis/' + $('.i_jenis').val(),
- method: 'get',
- success: function (response) {
- $('.btnSubJenis').html('<i class="fa fa-plus" aria-hidden="true"></i>');
- $('.subJenisContent').html(response);
- classGenerated();
- //subClassGenerated();
- }
- });
- }
- function classGenerated() {
- if (!$('.classSelect').is(':disabled')) {
- $('.classSelect').attr('disabled', true);
- }
- $('.btnClass').html('<i class="fa fa-spinner" aria-hidden="true"></i>');
- $.ajax({
- url: '/getSpesificClass/' + $('.i_jenissub').val(),
- method: 'get',
- success: function (response) {
- $('.btnClass').html('<i class="fa fa-plus" aria-hidden="true"></i>');
- $('.classContent').html(response);
- subClassGenerated();
- }
- });
- }
- function subClassGenerated() {
- if (!$('.subClassSelect').is(':disabled')) {
- $('.subClassSelect').attr('disabled', true);
- }
- $('.btnSubClass').html('<i class="fa fa-spinner" aria-hidden="true"></i>');
- $.ajax({
- url: '/getSpesificSubClass/' + $('.classSelect').val(),
- method: 'get',
- success: function (response) {
- $('.btnSubClass').html('<i class="fa fa-plus" aria-hidden="true"></i>');
- $('.subClassContent').html(response);
- }
- });
- }
- function tambahJenisBaru() {
- var atributBefore = $('.jenisContent').html();
- $('.jenisWrapper').html('<div class="jenisContent"> <input type="text" class="form-control" name="i_jenis"/> </div> <span class="input-group-btn"> <button class="btn btn-default" onclick="pilihJenis()" type="button"><i class="fa fa-plus" aria-hidden="true"> </i> </button>< /span>');
- }
- </script>
- @endsection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement