Update the Widget page to use data passed to the template
This commit is contained in:
		@ -3,6 +3,7 @@
 | 
			
		||||
Buy one widget
 | 
			
		||||
{{ end }}
 | 
			
		||||
{{ define "content" }}
 | 
			
		||||
{{$widget := index .Data "widget"}}
 | 
			
		||||
<h2 class="mt-3 text-center">Buy One Widget</h2>
 | 
			
		||||
<hr>
 | 
			
		||||
<img src="/static/img/widget.jpeg"
 | 
			
		||||
@ -17,15 +18,12 @@ Buy one widget
 | 
			
		||||
      class="d-blick needs-validation charge-form"
 | 
			
		||||
      autocomplete="off"
 | 
			
		||||
      novalidate="">
 | 
			
		||||
    <div class="mb-3">
 | 
			
		||||
        <label for="amount" class="form-label">Amount</label>
 | 
			
		||||
        <input type="text"
 | 
			
		||||
               id="amount"
 | 
			
		||||
               name="amount"
 | 
			
		||||
               autocomplete="amount-new"
 | 
			
		||||
               required=""
 | 
			
		||||
               class="form-control">
 | 
			
		||||
    </div>
 | 
			
		||||
    <input type="hidden" name="product_id" value="{{$widget.ID}}">
 | 
			
		||||
    <input type="hidden" name="amount" value="{{$widget.Price}}">
 | 
			
		||||
    <h3 class="mt-2 mb-3 text-center">{{$widget.Name}}: {{$widget.Price}}</h3>
 | 
			
		||||
    <p class="mt-2 mb-3 text-center">{{$widget.Description}}</p>
 | 
			
		||||
    <hr>
 | 
			
		||||
 | 
			
		||||
    <div class="mb-3">
 | 
			
		||||
        <label for="cardholder-name" class="form-label">Cardholder Name</label>
 | 
			
		||||
        <input type="text"
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user