1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-01-31 19:39:09 +00:00
mycorrhiza/views/modal.qtpl
2022-06-16 14:19:42 +03:00

29 lines
912 B
Plaintext

{% import "fmt" %}
{% import "net/http" %}
{% import "github.com/bouncepaw/mycorrhiza/l18n" %}
{% func RemoveMediaAsk(rq *http.Request, hyphaName string) %}
{% code
lc := l18n.FromRequest(rq)
%}
<main class="main-width">
<form class="modal" action="/remove-media/{%s hyphaName %}" method="post">
<fieldset class="modal__fieldset">
<legend class="modal__title">
{%s= fmt.Sprintf(lc.Get("ui.ask_remove_media"), beautifulLink(hyphaName)) %}
</legend>
<p class="modal__confirmation-msg">
{%s= lc.Get("ui.ask_really", &l18n.Replacements{"verb": lc.Get("ui.ask_remove_media_verb"), "name": fmt.Sprintf("<em>%s</em>", hyphaName)}) %}
</p>
<button type="submit" value="Confirm" class="btn" autofocus>
{%s lc.Get("ui.confirm") %}
</button>
<a href="/hypha/{%s hyphaName %}" class="btn btn_weak">
{%s lc.Get("ui.cancel") %}
</a>
</fieldset>
</form>
</main>
{% endfunc %}