diff options
Diffstat (limited to 'pkg/tpl/add.templ')
-rw-r--r-- | pkg/tpl/add.templ | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/pkg/tpl/add.templ b/pkg/tpl/add.templ index 0611d1b..14b57eb 100644 --- a/pkg/tpl/add.templ +++ b/pkg/tpl/add.templ @@ -14,27 +14,10 @@ templ AddQuotePage(form *AddQuoteForm, err string) { <form method="post"> <textarea rows="5" name="quote" placeholder="Текст цитаты">{ form.Quote }</textarea> <input type="hidden" name="captcha_id" value={ form.CaptchaID }/> - <div role="group"> - <img class="captcha" src={ fmt.Sprintf("/captcha/download/%s.png", form.CaptchaID) }/> - <audio id="audiocaptcha" src={ fmt.Sprintf("/captcha/download/%s.wav?lang=ru", form.CaptchaID) }></audio> - <a role="button" onclick="togglePlay()">Прослушать</a> - <input type="text" name="captcha_value" placeholder="Код с картинки"/> - </div> + <img class="captcha" src={ fmt.Sprintf("/captcha/download/%s.png", form.CaptchaID) }/> + <input type="text" name="captcha_value" placeholder="Код с картинки"/> <input type="submit" value="Отправить на модерацию"/> </form> - <script> - var myAudio = document.getElementById("audiocaptcha"); - var isPlaying = false; - function togglePlay() { - isPlaying ? myAudio.pause() : myAudio.play(); - }; - myAudio.onplaying = function() { - isPlaying = true; - }; - myAudio.onpause = function() { - isPlaying = false; - }; - </script> } } |