writing the stub js to authenticate against the back end
This commit is contained in:
		@ -5,8 +5,8 @@ Login
 | 
			
		||||
{{ define "content" }}
 | 
			
		||||
<form action=""
 | 
			
		||||
      method="post"
 | 
			
		||||
      name=""
 | 
			
		||||
      id=""
 | 
			
		||||
      name="login-form"
 | 
			
		||||
      id="login-form"
 | 
			
		||||
      class="d-blick needs-validation"
 | 
			
		||||
      autocomplete="off"
 | 
			
		||||
      novalidate="">
 | 
			
		||||
@ -31,8 +31,14 @@ Login
 | 
			
		||||
               class="form-control">
 | 
			
		||||
    </div>
 | 
			
		||||
    <hr>
 | 
			
		||||
    <a href="javascript:void(0)" class="btn btn-primary">Login</a>
 | 
			
		||||
    <a href="javascript:void(0)" id="login-btn" class="btn btn-primary">Login</a>
 | 
			
		||||
</form>
 | 
			
		||||
{{ end }}
 | 
			
		||||
{{define "js"}}
 | 
			
		||||
<script type="module">
 | 
			
		||||
    import {val} from "/static/js/login.js"
 | 
			
		||||
    document.getElementById("login-btn").addEventListener("click", () => {
 | 
			
		||||
        val({{.API}});
 | 
			
		||||
    })
 | 
			
		||||
</script>
 | 
			
		||||
{{end}}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user