feat: separate descriptions from labels

This commit is contained in:
Teajey 2024-05-13 21:17:20 +12:00
parent 04647f3bcd
commit 78419357b5
Signed by: Teajey
GPG Key ID: 970E790FE834A713
2 changed files with 18 additions and 12 deletions

View File

@ -20,26 +20,29 @@
<label>
{{if .ClaimantId}}
{{if eq .ClaimantId $.CurrentUserId}}
<input type="checkbox" name="claimed" value="{{.Id}}" {{if .Sent}}disabled{{end}}>
<input type="checkbox" aria-describedby="wish_detail_{{.Id}}" name="claimed" value="{{.Id}}" {{if
.Sent}}disabled{{end}}>
{{else}}
<input type="checkbox" disabled>
<input type="checkbox" aria-describedby="wish_detail_{{.Id}}" disabled>
{{end}}
{{else}}
<input type="checkbox" name="unclaimed" value="{{.Id}}" {{if .Sent}}disabled{{end}}>
<input type="checkbox" aria-describedby="wish_detail_{{.Id}}" name="unclaimed" value="{{.Id}}" {{if
.Sent}}disabled{{end}}>
{{end}}
{{if .Sent}}
<s>{{.Name}}</s>
{{else}}
{{.Name}}
{{end}}
</label>
{{if .ClaimantId}}
{{if eq .ClaimantId $.CurrentUserId}}
<span style="color: blue;">{{if .Sent}}Completed{{else}}Claimed{{end}} by you</span>
<span id="wish_detail_{{.Id}}" style="color: blue;">{{if .Sent}}Completed{{else}}Claimed{{end}} by you</span>
{{else}}
<span style="color: red;">{{if .Sent}}Completed{{else}}Claimed{{end}} by {{.ClaimantName}}</span>
<span id="wish_detail_{{.Id}}" style="color: red;">{{if .Sent}}Completed{{else}}Claimed{{end}} by
{{.ClaimantName}}</span>
{{end}}
{{end}}
</label>
</li>
{{end}}
</ul>

View File

@ -47,7 +47,7 @@
<li>
<label>
{{if .Sent}}
<input type="checkbox" disabled>
<input aria-describedby="todo_detail_{{.Id}}" type="checkbox" disabled>
{{else}}
<input type="checkbox" name="gift" value="{{.Id}}">
{{end}}
@ -57,8 +57,11 @@
{{else}}
{{.Name}}
{{end}}
</em> for <a href="/{{.RecipientRef}}">{{.RecipientName}}</a>
</em>
</label>
<span id="todo_detail_{{.Id}}">
for <a href="/{{.RecipientRef}}">{{.RecipientName}}</a>
</span>
</li>
{{end}}
</ul>