form_registrasi.blade.php 12.5 KB
Newer Older
1
@extends('layouts.app')
Triyah Fatmawati committed
2
@section('title','Registrasi')
3 4 5
@section('content')
    <section class="section">
        <div class="section-header">
Triyah Fatmawati committed
6
        <h1>Registrasi</h1>
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 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
        <div class="section-header-breadcrumb">
        </div>
        </div>

        <form class="needs-validation" novalidate="" method="POST" action="{{ route('user.store')}}" enctype="multipart/form-data">
        <div class="section-body">
            @csrf
            <div class="row">
                <div class="col-12 col-md-8 col-lg-8">
                    <div class="card">
                        <div class="card-body">
                            <div class="row">
                                <div class="col-12 form-group" @if ($errors->has('nama')) has-error @endif>
                                    <label>Nama</label>
                                    <input type="text" id="nama" name="nama" class="form-control" required="" placeholder="" value="{{ old('nama')}}">
                                    @if ($errors->has('nama'))
                                        <label id="login-error" class="error" for="nama" style="color: red">{{$errors->first('nama')}}</label>
                                    @endif
                                </div>
                            </div>
                                <div class="row">
                                    <div class="col-6 form-group" @if ($errors->has('email')) has-error @endif>
                                        <label>E-mail</label>
                                        <div class="input-group">
                                            <div class="input-group-prepend">
                                                <div class="input-group-text">
                                                    <i class="fas fa-envelope"></i>
                                                </div>
                                            </div>
                                            <input type="email" id="email" name="email" class="form-control email" required="" placeholder="" value="{{ old('email')}}">
                                        </div>
                                        @if ($errors->has('email'))
                                            <label id="login-error" class="error" for="nama_depan" style="color: red">{{$errors->first('email')}}</label>
                                        @endif
                                    </div>
                                    <div class="col-6 form-group" @if ($errors->has('telepon')) has-error @endif>
                                        <label>Telepon</label>
                                        <div class="input-group">
                                            <div class="input-group-prepend">
                                                <div class="input-group-text">
                                                    <i class="fas fa-phone"></i>
                                                </div>
                                            </div>
                                            <input type="number" id="telepon" name="telepon" class="form-control number" required="true" placeholder="" value="{{ old('telepon')}}">
                                        </div>
                                        @if ($errors->has('telepon'))
                                            <label id="login-error" class="error" for="telepon" style="color: red">{{$errors->first('telepon')}}</label>
                                        @endif
                                    </div>
                            </div>
                            <div class="form-group" @if ($errors->has('instansi')) has-error @endif>
                                <label>Instansi</label>
                                    <div class="input-group">
                                        <input type="text" id="instansi" name="instansi" class="form-control number" required="true" placeholder="" value="{{ old('instansi')}}">
                                    </div>
                                    @if ($errors->has('instansi'))
                                        <label id="login-error" class="error" for="instansi" style="color: red">{{$errors->first('instansi')}}</label>
                                    @endif
                            </div>
                            <div class="form-group" @if ($errors->has('jabatan')) has-error @endif>
                                <label>Jabatan</label>
                                    <div class="input-group">
                                        <input type="text" id="jabatan" name="jabatan" class="form-control email" required="true" placeholder="" value="{{ old('jabatan')}}">
                                    </div>
                                    @if ($errors->has('jabatan'))
                                        <label id="login-error" class="error" for="jabatan" style="color: red">{{$errors->first('jabatan')}}</label>
                                    @endif
                            </div>
                            <div class="row">
                                <div class="col-8 form-group" @if ($errors->has('alamat')) has-error @endif>
                                    <label>Alamat</label>
                                    <div class="input-group">
                                        <input type="text" id="alamat" name="alamat" class="form-control" required="true" placeholder="" value="{{ old('alamat')}}">
                                        {{-- <div class="invalid-feedback">Mohon isikan alamat lengkap Anda</div> --}}
                                    </div>
                                    @if ($errors->has('alamat'))
                                        <label id="login-error" class="error" for="alamat" style="color: red">{{$errors->first('alamat')}}</label>
                                    @endif
                                </div>
                                <div class="form-group" @if ($errors->has('kodepos')) has-error @endif>
                                    <label>Kode Pos</label>
                                    <input type="number" id="kodepos" name="kodepos" class="form-control number" required="true" placeholder="" value="{{ old('kodepos')}}">
                                    @if ($errors->has('kodepos'))
                                        <label id="login-error" class="error" for="kodepos" style="color: red">{{$errors->first('kodepos')}}</label>
                                    @endif
                                    {{-- <div class="invalid-feedback">Isikan Kode Pos yg sesuai</div> --}}
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-12">
                                    <div class="form-group" @if ($errors->has('kota')) has-error @endif>
                                        <label>Kota</label>
                                        <input type="text" id="kota" name="kota" class="form-control" required="" placeholder="" value="{{ old('kota')}}">
                                        @if ($errors->has('kota'))
                                            <label id="login-error" class="error" for="kota" style="color: red">{{$errors->first('kota')}}</label>
                                        @endif
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
                <div class="col-12 col-md-4 col-lg-4">
                    <div class="card">
                        <div class="card-body">
Triyah Fatmawati committed
113
                            <div class="form-group" id = "list-kegiatan" @if ($errors->has('thematic_workshop')) has-error @endif>
114
                                <label>Kegiatan</label>
Triyah Fatmawati committed
115 116 117 118 119 120 121 122
                                @foreach ($kegiatan as $keg)
                                    <div class="form-check">
                                        <input class="form-check-input" type="radio" id="kegiatan" name="kegiatan" value="{{ $keg->id }}">
                                        <label class="form-check-label" for="{{ $keg->nama }}">{{ $keg->nama }}</label>
                                    </div>
                                @endforeach

                                {{-- <select class="form-control" id="kegiatan" name="kegiatan" required="true" placeholder="kegiatan">
123 124 125 126 127 128 129
                                    <option value="" selected>- pilih -</option>
                                    @foreach ($kegiatan as $keg)
                                        <option value="{{ $keg->id }}">{{ $keg->nama }}</option>
                                    @endforeach
                                </select>
                                @if ($errors->has('kegiatan'))
                                    <label id="login-error" class="error" for="kegiatan" style="color: red">{{$errors->first('kegiatan')}}</label>
Triyah Fatmawati committed
130 131 132 133 134 135 136 137 138 139 140 141
                                @endif --}}
                            </div>
                            <div class="form-group" id="grup-konferensi" @if ($errors->has('profil')) has-error @endif>
                                <label>Konferensi</label>
                                <select class="form-control" id="konferensi" name="konferensi" required="true" placeholder="">
                                    <option value="" selected>- Pilih -</option>
                                    @foreach ($konferensi as $kon)
                                        <option onchange="cek(this.value)" value="{{ $kon->id }}">{{ $kon->nama }}</option>
                                    @endforeach
                                </select>
                                @if ($errors->has('konferensi'))
                                    <label id="login-error" class="error" for="konferensi" style="color: red">{{$errors->first('konferensi')}}</label>
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
                                @endif
                            </div>
                        </div>
                    </div>
                    <div class="card">
                        <div class="card-body">
                            <div class="form-group" @if ($errors->has('kode_registrasi')) has-error @endif>
                                <label>Kode Registrasi</label>
                                <input type="text" id="kode_registrasi" name="kode_registrasi" class="form-control number" required="true" placeholder="" value="{{ $kode_registrasi }}">
                                @if ($errors->has('kode_registrasi'))
                                    <label id="login-error" class="error" for="kode_registrasi" style="color: red">{{$errors->first('kode_registrasi')}}</label>
                                @endif
                            </div>
                            <div class="form-group" @if ($errors->has('biaya')) has-error @endif>
                                <label>Biaya Pendaftaran</label>
                                <input type="text" id="biaya" name="biaya" class="form-control number" required="true" placeholder="" value="{{ old('biaya')}}" disabled>
                                @if ($errors->has('biaya'))
                                    <label id="login-error" class="error" for="biaya" style="color: red">{{$errors->first('biaya')}}</label>
                                @endif
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="card-footer text-right">
                <button class="btn btn-primary mr-1" type="submit">Daftar</button>
                <button class="btn btn-secondary" type="reset">Reset</button>
            </div>
        </div>
        </form>
    </section>
@endsection
Triyah Fatmawati committed
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197

@push('js')
    <script>
        function cekKegiatan(){
            console.log('masuk');
            if(document.getElementById('kegiatan').value == '498633a9-082c-4a4a-9dbd-e20b678ec15e'){
                document.getElementById('grup-konferensi').style.display = 'none';
            }
            else{
                document.getElementById('grup-konferensi').style.display = 'block';
            }
        }

        function cek(var){
            console.log('masuk', var);
            if(document.getElementById('kegiatan').value == '498633a9-082c-4a4a-9dbd-e20b678ec15e'){
                document.getElementById('grup-konferensi').style.display = 'none';
            }
            else{
                document.getElementById('grup-konferensi').style.display = 'block';
            }
        }
    </script>
@endpush