1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

feat(settings): add UI for bulk associations

This commit is contained in:
Diptesh Choudhuri 2023-01-24 16:30:18 +00:00
parent 6855539315
commit fb02916b1e
3 changed files with 14 additions and 17 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -253,7 +253,7 @@
<div class="w-full md:w-2/3 inline-block"> <div class="w-full md:w-2/3 inline-block">
{{ if .Labels }} {{ if .Labels }}
<div class="mb-8"> <div class="mb-8">
<h3 class="inline-block font-semibold text-gray-300">Labels</h3> <h3 class="inline-block font-semibold text-gray-300">Your labels</h3>
{{ range $i, $label := .Labels }} {{ range $i, $label := .Labels }}
<div class="flex items-center"> <div class="flex items-center">
<div class="text-gray-500 border-1 w-full border-green-700 inline-block my-1 py-1 text-align text-sm" <div class="text-gray-500 border-1 w-full border-green-700 inline-block my-1 py-1 text-align text-sm"
@ -288,24 +288,21 @@
{{end}} {{end}}
{{ if .Projects }} {{ if .Projects }}
<h3 class="inline-block font-semibold text-gray-300">Add Label</h3> <h3 class="inline-block font-semibold text-gray-300">Bulk association</h3>
<p>Associate a label with multiple projects</p>
<form action="" method="post"> <form action="" method="post">
<input type="hidden" name="action" value="add_label"> <input type="hidden" name="action" value="add_label">
<div class="flex flex-col space-y-4"> <input type="hidden" name="num_projects" value="multiple">
<div class="flex items-center mt-2 w-full text-gray-500 text-sm space-x-4"> <div class="mt-2 w-1/2 space-y-4 text-gray-500 text-sm flex-col flex">
<select name="key" id="select-project" <input class="input-default block" name="value" placeholder="Label" required>
class="select-default grow" multiple> <select name="keys" class="block w-full p-2.5 select-default grow" multiple required>
{{ range $i, $p := .Projects }} {{ range $i, $p := .Projects }}
<option value="{{ $p }}">{{ $p }}</option> <option value="{{ $p }}">{{ $p }}</option>
{{ end }} {{ end }}
</select> </select>
<input class="input-default" <button type="submit" class="btn-primary">
type="text" id="label-value" Submit
name="value" placeholder="Label" minlength="1" required> </button>
<button type="submit" class="btn-primary">
Add
</button>
</div>
</div> </div>
</form> </form>
{{ else }} {{ else }}