Admin certification page improvements

face-detect
Noah Petherbridge 2023-07-31 20:03:21 -07:00
parent 98c6a51951
commit 01317a7ff8
2 changed files with 40 additions and 0 deletions

View File

@ -75,6 +75,13 @@
<i class="fa-solid fa-certificate has-text-success"></i>
</span>
<strong class="has-text-success">Certified!</strong>
<!-- Admin link to see it -->
{{if .CurrentUser.IsAdmin}}
<a href="/admin/photo/certification?username={{.User.Username}}"
class="fa fa-image has-text-link ml-2 is-size-7"
title="Search for certification picture"></a>
{{end}}
</div>
</div>
{{else}}
@ -84,6 +91,13 @@
<i class="fa-solid fa-certificate has-text-danger"></i>
</span>
<strong class="has-text-danger">Not certified!</strong>
<!-- Admin link to see it -->
{{if .CurrentUser.IsAdmin}}
<a href="/admin/photo/certification?username={{.User.Username}}"
class="fa fa-image has-text-link ml-2 is-size-7"
title="Search for certification picture"></a>
{{end}}
</div>
</div>
{{end}}

View File

@ -75,11 +75,13 @@
<span>{{or $User.Username "[deleted]"}}</span>
</p>
</header>
{{if .Filename}}
<div class="card-image">
<figure class="image">
<img src="{{PhotoURL .Filename}}">
</figure>
</div>
{{end}}
<div class="card-content">
<div class="media block">
<div class="media-left">
@ -123,6 +125,18 @@
<textarea class="textarea" name="comment"
cols="60" rows="2"
placeholder="Admin comment (for rejection)">{{.AdminComment}}</textarea>
<div class="select is-fullwidth">
<select class="common-reasons">
<option value="">(Common Rejection Reasons)</option>
<option value="Your certification pic should depict you holding onto a sheet of paper with your username, site name, and current date written on it.">
Didn't follow directions
</option>
<option value="The sheet of paper must also include the website name: nonshy">Website name not visible</option>
<option value="Please take a clearer picture that shows your arm and hand holding onto the sheet of paper">Unclear picture (hand not visible enough)</option>
<option value="This is not an acceptable certification photo.">Not acceptable</option>
</select>
</div>
</div>
</div>
<footer class="card-footer">
@ -149,3 +163,15 @@
</div>
{{end}}
{{define "scripts"}}
<script>
window.addEventListener("DOMContentLoaded", (event) => {
document.querySelectorAll("select.common-reasons").forEach(elem => {
let textarea = elem.parentNode.parentNode.getElementsByTagName("textarea")[0];
elem.addEventListener("change", (e) => {
textarea.value = elem.value;
})
})
});
</script>
{{end}}