Skip to content

Commit fff74f2

Browse files
committed
show values on input
Signed-off-by: Crisciany <[email protected]>
1 parent 1e564f4 commit fff74f2

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

source/contributing.blade.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,24 @@
6767

6868
<div class="row">
6969
@foreach($page->donateValues as $option)
70-
@foreach($option['value'] as $item)
70+
@foreach($option['value'] as $item => $value)
7171

7272
<div class="col-12 col-sm-6 col-lg-4 mb-2" >
73-
<a class="ud-main-btn" style=" padding: 20px ;width:100" >{{ $item }}</a>
73+
<a class="ud-main-btn" style=" padding: 20px ;width:100" id="donateValue{{$item}}" onclick="getValue({{ $value }})">{{ $value }}</a>
7474
</div>
7575

7676
@endforeach
7777
@endforeach
7878
</div>
7979

8080
<div class="input-group mb-5 mt-5">
81-
<input type="text" class="form-control" aria-label="Text input with dropdown button">
81+
<input type="text" class="form-control" aria-label="Text input with dropdown button" id="showValue">
8282
<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">{{ current_path_locale($page) }}</button>
8383

8484
<ul class="dropdown-menu dropdown-menu-end">
8585
@foreach($page->donateCoin as $iten)
8686
@foreach($iten as $coin)
87-
<li><a class="dropdown-item" href="#">{{$coin}}</a></li>
87+
<li><a class="dropdown-item">{{$coin}}</a></li>
8888
@endforeach
8989
@endforeach
9090
</ul>
@@ -142,4 +142,12 @@
142142
</div>
143143
</div>
144144
</div>
145-
</section>
145+
</section>
146+
147+
<script>
148+
149+
function getValue(showValue){
150+
document.getElementById("showValue").value = showValue
151+
}
152+
153+
</script>

0 commit comments

Comments
 (0)