Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
konaspi2024
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siti Aisah
konaspi2024
Commits
e018b413
Commit
e018b413
authored
a year ago
by
Siti Aisah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix form registrasi
parent
76735a02
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
app/Http/Controllers/RegistrasiController.php
+3
-1
resources/views/form_kegiatan.blade.php
+4
-2
resources/views/form_registrasi.blade.php
+16
-1
No files found.
app/Http/Controllers/RegistrasiController.php
View file @
e018b413
...
@@ -15,7 +15,8 @@
...
@@ -15,7 +15,8 @@
class
RegistrasiController
extends
Controller
class
RegistrasiController
extends
Controller
{
{
public
function
create
(){
public
function
create
(){
$kegiatan
=
Kegiatan
::
get
();
$kegiatan
=
Kegiatan
::
where
(
'is_foreach'
,
'1'
)
->
get
();
$konvensi
=
Kegiatan
::
whereNull
(
'is_foreach'
)
->
first
();
$konferensi
=
Konferensi
::
get
();
$konferensi
=
Konferensi
::
get
();
$jumlahPendaftar
=
Registrasi
::
count
();
$jumlahPendaftar
=
Registrasi
::
count
();
$nourut
=
sprintf
(
"%05s"
,
$jumlahPendaftar
+
1
);
$nourut
=
sprintf
(
"%05s"
,
$jumlahPendaftar
+
1
);
...
@@ -25,6 +26,7 @@ public function create(){
...
@@ -25,6 +26,7 @@ public function create(){
$data
=
[
$data
=
[
'kegiatan'
=>
$kegiatan
,
'kegiatan'
=>
$kegiatan
,
'konvensi'
=>
$konvensi
,
'konferensi'
=>
$konferensi
,
'konferensi'
=>
$konferensi
,
'kode_registrasi'
=>
$koderegistrasi
'kode_registrasi'
=>
$koderegistrasi
];
];
...
...
This diff is collapsed.
Click to expand it.
resources/views/form_kegiatan.blade.php
View file @
e018b413
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"card"
>
<div
class=
"card"
>
<div
class=
"card-body"
>
<div
class=
"card-body"
>
<div
class=
"form-group"
id =
"list-kegiatan"
@
if
($
errors-
>
has('thematic_workshop')) has-error @endif>
<div
class=
"form-group"
id =
"list-kegiatan"
@
if
($
errors-
>
has('thematic_workshop')) has-error @endif>
<label>
Kegiatan
</label>
<label>
Kegiatan
tambahan
</label>
@foreach ($kegiatan as $keg)
@foreach ($kegiatan as $keg)
<div
class=
"form-check"
>
<div
class=
"form-check"
>
<input
class=
"form-check-input"
type=
"radio"
id=
"kegiatan"
name=
"kegiatan{{ $i }}[]"
value=
"{{ $keg->id }}"
>
<input
class=
"form-check-input"
type=
"radio"
id=
"kegiatan"
name=
"kegiatan{{ $i }}[]"
value=
"{{ $keg->id }}"
>
...
@@ -22,7 +22,9 @@
...
@@ -22,7 +22,9 @@
<label
id=
"login-error"
class=
"error"
for=
"konferensi"
style=
"color: red"
>
{{$errors->first('konferensi')}}
</label>
<label
id=
"login-error"
class=
"error"
for=
"konferensi"
style=
"color: red"
>
{{$errors->first('konferensi')}}
</label>
@endif
@endif
</div>
</div>
<div
class=
"col-md-4 float-right"
>
<button
class=
"btn btn-danger"
type=
"button"
onclick=
"hapusKegiatan('kegiatan-{{ $i }}')"
>
Hapus
</button>
</div>
</div>
</div>
<button
class=
"btn btn-danger"
type=
"button"
onclick=
"hapusKegiatan('kegiatan-{{ $i }}')"
>
hapus
</button>
</div>
</div>
</div>
</div>
This diff is collapsed.
Click to expand it.
resources/views/form_registrasi.blade.php
View file @
e018b413
...
@@ -108,6 +108,17 @@
...
@@ -108,6 +108,17 @@
</div>
</div>
</div>
</div>
<div class="
col
-
12
col
-
md
-
4
col
-
lg
-
4
">
<div class="
col
-
12
col
-
md
-
4
col
-
lg
-
4
">
<div class="
card
">
<div class="
card
-
body
">
<div class="
form
-
group
" id = "
konvensi
" @if (
$errors->has
('thematic_workshop')) has-error @endif>
<label>Kegiatan utama</label>
<div class="
form
-
check
">
<input class="
form
-
check
-
input
" type="
radio
" id="
kegiatan
-
utama
" name="
kegiatan
-
utama
" value="
{{
$konvensi
->
id
}}
">
<label class="
form
-
check
-
label
" for="
{{
$konvensi
->
nama
}}
">{{
$konvensi->nama
}}</label>
</div>
</div>
</div>
</div>
<div class="
row
" id="
parent
-
kegiatan
">
<div class="
row
" id="
parent
-
kegiatan
">
{{ view('form_kegiatan', [
{{ view('form_kegiatan', [
'kegiatan' =>
$kegiatan
,
'kegiatan' =>
$kegiatan
,
...
@@ -116,7 +127,7 @@
...
@@ -116,7 +127,7 @@
]) }}
]) }}
</div>
</div>
<div>
<div>
<button type="
button
" class="
btn
btn
-
primary
" onclick="
tambahKegiatan
()
">
Tambah kegiat
an</button>
<button type="
button
" class="
btn
btn
-
primary
" onclick="
tambahKegiatan
()
">
+ Kegiatan Tambah
an</button>
</div>
</div>
<div class="
card
">
<div class="
card
">
<div class="
card
-
body
">
<div class="
card
-
body
">
...
@@ -186,6 +197,10 @@ function tambahKegiatan(){
...
@@ -186,6 +197,10 @@ function tambahKegiatan(){
data: {_token:token, i:i},
data: {_token:token, i:i},
success: function (result) {
success: function (result) {
$('#parent-kegiatan').append(result);
$('#parent-kegiatan').append(result);
},
error: function(error) {
alert('periksa koneksi anda');
}
}
});
});
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment