beginnings of the Edit Profile page, dialog field and rendering additions

This commit is contained in:
2025-10-10 21:26:01 -06:00
parent 6cdb0ffacf
commit 6eec9f77d9
8 changed files with 290 additions and 9 deletions
+34 -1
View File
@@ -100,7 +100,8 @@
<div class="flex items-center">
<div class="w-24 text-right pr-4">
<input type="checkbox" id="{{ .Name }}" name="{{ .Name }}"
value="Y" class="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500" />
value="Y" {{ if .Value != "" }}checked{{ end }}
class="w-4 h-4 text-blue-600 border-gray-300 rounded focus:ring-blue-500" />
</div>
<label for="{{ .Name }}" class="flex-1 text-black text-sm">
{{ .Caption }}{{ if .Subcaption != "" }} {{ .Subcaption }}{{ end }}
@@ -123,6 +124,28 @@
{{ end }}
</select>
</div>
{{ else if .Type == "localelist" }}
<div class="flex items-center">
<label for="{{ .Name }}" class="w-64 text-right pr-4 text-black text-sm">
{{ .Caption }}{{ if .Subcaption != "" }} {{ .Subcaption }}{{ end }}
{{ if .Required }}<span class="text-red-600">*</span>{{ end }}
</label>
<select id="{{ .Name }}" name="{{ .Name }}" {{ if .Required }}required{{ end }}
class="flex-1 max-w-md px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
<option value="XX">Unknown</option>{* TODO *}
</select>
</div>
{{ else if .Type == "tzlist" }}
<div class="flex items-center">
<label for="{{ .Name }}" class="w-64 text-right pr-4 text-black text-sm">
{{ .Caption }}{{ if .Subcaption != "" }} {{ .Subcaption }}{{ end }}
{{ if .Required }}<span class="text-red-600">*</span>{{ end }}
</label>
<select id="{{ .Name }}" name="{{ .Name }}" {{ if .Required }}required{{ end }}
class="flex-1 max-w-md px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
<option value="XX">Unknown</option>{* TODO *}
</select>
</div>
{{ else if .Type == "date" }}
{{ dv := .DateValues() }}
<div class="flex items-center">
@@ -152,6 +175,16 @@
</select>
</div>
</div>
{{ else if .Type == "userphoto" }}
<div class="flex items-start">
<label class="w-64 text-right pr-4 text-black text-sm pt-2">{{ .Caption }}
{{ if .Subcaption != "" }} {{ .Subcaption }}{{ end }} (click to change):</label>
<input type="hidden" name="{{ .Name }}_data" value="{{ .Value }}"/>
<a href="{{ .Param }}" class="border-2 border-gray-300 rounded hover:border-blue-500 transition-colors">
<img src="/img/builtin/no-user.png"
alt="Click to upload photo" class="w-25 h-25">
</a>
</div>
{{ else if .Type == "header" }}
<h2 class="text-lg font-bold text-black mb-4">{{ .Caption }}</h2>
{{ else if .Type != "hidden" && .Type != "button" }}
+1 -1
View File
@@ -70,7 +70,7 @@
<span class="mx-2">-</span>
<a href="/logout" class="text-yellow-300 hover:text-yellow-400">Log Out</a>
<span class="mx-2">|</span>
<a href="/TODO/profile" class="text-yellow-300 hover:text-yellow-400">Profile</a>
<a href="/profile" class="text-yellow-300 hover:text-yellow-400">Profile</a>
{{ end }}
{{ end }}
</span>