holiday-api/templates/dialogs/add-webhook.gohtml

35 lines
1.5 KiB
Plaintext

<dialog class="card" id="create-card">
<h3 class="card-title">Create webhook</h3>
<form method="post" action="/admin/webhooks">
<section>
<label for="url">Url:</label>
<input required id="url" name="url" type="url">
</section>
<section>
<label for="country">Country:</label>
<select id="country" required name="country">
{{range $entry := .Countries}}
<option value="{{$entry.IsoName}}">{{$entry.Name}}</option>
{{end}}
</select>
</section>
<section>
<label for="retry_count">Retry count:</label>
<input required id="retry_count" name="retry_count" type="number" min="0" max="10">
</section>
<section>
<label class="checkbox"><span>On created</span><input id="on_created" value="true" name="on_created" type="checkbox"></label>
</section>
<section>
<label class="checkbox"><span>On edited</span><input id="on_edited" value="true" name="on_edited" type="checkbox"></label>
</section>
<section>
<label class="checkbox"><span>On deleted</span><input id="on_deleted" value="true" name="on_deleted" type="checkbox"></label>
</section>
<section class="actions">
<button type="submit">Create</button>
<button type="button" onclick="closeDialog('#create-card')">Cancel</button>
</section>
</form>
</dialog>