Add alt title for audio button.
This commit is contained in:
parent
aefc02d8a2
commit
b7d7b6e9ae
|
@ -3,3 +3,4 @@ en:
|
|||
invalid: "The captcha code is incorrect (if you can't read, you can click image to refresh it)"
|
||||
placeholder: please fill in the identifying code
|
||||
captcha: Captcha
|
||||
play_captcha_voice: "Play Captcha Voice"
|
|
@ -1,3 +1,4 @@
|
|||
'zh-CN':
|
||||
rucaptcha:
|
||||
invalid: "验证码不正确(如无法识别,可以点击刷新验证码)"
|
||||
play_captcha_voice: "播放验证码的语音"
|
|
@ -1,4 +1,5 @@
|
|||
zh_tw:
|
||||
rucaptcha:
|
||||
placeholder: 請填寫驗證碼
|
||||
captcha: 驗證碼
|
||||
captcha: 驗證碼
|
||||
play_captcha_voice: 播放驗證碼語音
|
|
@ -22,7 +22,7 @@ module RuCaptcha
|
|||
tag(:img, opts)
|
||||
end
|
||||
def rucaptcha_audio_tag()
|
||||
"<button type=\"button\" onclick=\"document.getElementById("captcha_audio").play();\" class=\"fas fa-volume-up\" style=\"font-size: 1.5em; color: #333; cursor: pointer; border: 2px solid #333; padding: 0.2em;\"></button><audio id=\"captcha_audio\" src=\"#{ru_captcha.root_path(:format=>:wav)}\"></audio>".html_safe
|
||||
"<button title=\"#{I18n.t('rucaptcha.play_captcha_voice')}\" type=\"button\" onclick=\"document.getElementById("captcha_audio").play();\" class=\"fas fa-volume-up\" style=\"font-size: 1.5em; color: #333; cursor: pointer; border: 2px solid #333; padding: 0.2em;\"></button><audio id=\"captcha_audio\" src=\"#{ru_captcha.root_path(:format=>:wav)}\"></audio>".html_safe
|
||||
end
|
||||
def gotcha(opts = {})
|
||||
if opts[:placeholder].blank?
|
||||
|
|
Loading…
Reference in New Issue