-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
95 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,15 @@ | ||
{{- with .APIKeyDetail -}} | ||
<div class="modal-box"> | ||
<div class="flex justify-between items-center"> | ||
<h1 class="font-bold text-xl">Edit API Key</h1> | ||
<button onclick="edit_key_modal.close()" class="btn btn-sm btn-circle btn-ghost"> | ||
<h1 class="font-bold text-xl">API Key Details</h1> | ||
<button onclick="key_detail_modal.close()" class="btn btn-sm btn-circle btn-ghost"> | ||
<i class="fa-solid fa-x"></i> | ||
<span class="sr-only">Close modal</span> | ||
</button> | ||
</div> | ||
<form | ||
id="edit-key-form" | ||
hx-put="/v1/apikeys/{{ .ID }}" | ||
hx-target="#apikeys" | ||
hx-swap="outerHTML" | ||
hx-indicator="#loader" | ||
hx-ext="json-enc" | ||
method="dialog" | ||
> | ||
<input type="hidden" name="id" value="{{ .ID }}" /> | ||
<div class="my-4"> | ||
<label for="description" class="label-style pb-0.5">New API Key Description</label> | ||
<input type="text" id="description" name="description" class="input-style" value="{{ .Description }}" required /> | ||
</div> | ||
<div class="my-4 flex justify-center"> | ||
<button | ||
id="edit-key-btn" | ||
type="submit" | ||
class="submit-btn w-44 btn bg-primary font-semibold text-lg text-white hover:bg-primary/80" | ||
> | ||
<span class="submit-btn-text">Save</span> | ||
<span id="loader" class="htmx-indicator loading loading-spinner loading-md"></span> | ||
</button> | ||
</div> | ||
</form> | ||
<div> | ||
<p>{{ .ID }}</p> | ||
<p>{{ .Description }}</p> | ||
</div> | ||
</div> | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{{- with .APIKeyDetail -}} | ||
<div class="modal-box"> | ||
<div class="flex justify-between items-center"> | ||
<h1 class="font-bold text-xl">Edit API Key</h1> | ||
<button onclick="edit_key_modal.close()" class="btn btn-sm btn-circle btn-ghost"> | ||
<i class="fa-solid fa-x"></i> | ||
<span class="sr-only">Close modal</span> | ||
</button> | ||
</div> | ||
<form | ||
id="edit-key-form" | ||
hx-put="/v1/apikeys/{{ .ID }}" | ||
hx-target="#apikeys" | ||
hx-swap="outerHTML" | ||
hx-indicator="#loader" | ||
hx-ext="json-enc" | ||
method="dialog" | ||
> | ||
<input type="hidden" name="id" value="{{ .ID }}" /> | ||
<div class="my-4"> | ||
<label for="description" class="label-style pb-0.5">New API Key Description</label> | ||
<input type="text" id="description" name="description" class="input-style" value="{{ .Description }}" required /> | ||
</div> | ||
<div class="my-4 flex justify-center"> | ||
<button | ||
id="edit-key-btn" | ||
type="submit" | ||
class="submit-btn w-44 btn bg-primary font-semibold text-lg text-white hover:bg-primary/80" | ||
> | ||
<span class="submit-btn-text">Save</span> | ||
<span id="loader" class="htmx-indicator loading loading-spinner loading-md"></span> | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
{{- end }} |