mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-28 23:48:31 +00:00
Remove residual logic in captcha.ecr
This commit is contained in:
parent
832c341fde
commit
8a24dd0e0f
@ -9,56 +9,48 @@
|
|||||||
<div class="h-box">
|
<div class="h-box">
|
||||||
<form class="pure-form pure-form-stacked" action="/captcha?referer=<%= URI.encode_www_form(referer) %>&type=invidious" method="post">
|
<form class="pure-form pure-form-stacked" action="/captcha?referer=<%= URI.encode_www_form(referer) %>&type=invidious" method="post">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
||||||
<input name="email" type="hidden" value="<%= HTML.escape(email) %>">
|
<input name="email" type="hidden" value="<%= HTML.escape(email) %>">
|
||||||
<input name="password" type="hidden" value="<%= HTML.escape(password) %>">
|
<input name="password" type="hidden" value="<%= HTML.escape(password) %>">
|
||||||
|
|
||||||
<% if captcha %>
|
<% case captcha_type when %>
|
||||||
<% case captcha_type when %>
|
<% when "image" %>
|
||||||
<% when "image" %>
|
<% captcha = captcha.not_nil! %>
|
||||||
<% captcha = captcha.not_nil! %>
|
<img style="width:50%" src='<%= captcha[:question] %>'/>
|
||||||
<img style="width:50%" src='<%= captcha[:question] %>'/>
|
<% captcha[:tokens].each_with_index do |token, i| %>
|
||||||
<% captcha[:tokens].each_with_index do |token, i| %>
|
<input type="hidden" name="token[<%= i %>]" value="<%= HTML.escape(token) %>">
|
||||||
<input type="hidden" name="token[<%= i %>]" value="<%= HTML.escape(token) %>">
|
<% end %>
|
||||||
<% end %>
|
<input type="hidden" name="captcha_type" value="image">
|
||||||
<input type="hidden" name="captcha_type" value="image">
|
<label for="answer"><%= translate(locale, "Time (h:mm:ss):") %></label>
|
||||||
<label for="answer"><%= translate(locale, "Time (h:mm:ss):") %></label>
|
<input type="text" name="answer" type="text" placeholder="h:mm:ss">
|
||||||
<input type="text" name="answer" type="text" placeholder="h:mm:ss">
|
<% else # "text" %>
|
||||||
<% else # "text" %>
|
<% captcha = captcha.not_nil! %>
|
||||||
<% captcha = captcha.not_nil! %>
|
<% captcha[:tokens].each_with_index do |token, i| %>
|
||||||
<% captcha[:tokens].each_with_index do |token, i| %>
|
<input type="hidden" name="token[<%= i %>]" value="<%= HTML.escape(token) %>">
|
||||||
<input type="hidden" name="token[<%= i %>]" value="<%= HTML.escape(token) %>">
|
<% end %>
|
||||||
<% end %>
|
<input type="hidden" name="captcha_type" value="text">
|
||||||
<input type="hidden" name="captcha_type" value="text">
|
<label for="answer"><%= captcha[:question] %></label>
|
||||||
<label for="answer"><%= captcha[:question] %></label>
|
<input type="text" name="answer" type="text" placeholder="<%= translate(locale, "Answer") %>">
|
||||||
<input type="text" name="answer" type="text" placeholder="<%= translate(locale, "Answer") %>">
|
<% end %>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<button type="submit" name="action" value="signup" class="pure-button pure-button-primary">
|
<button type="submit" name="action" value="signup" class="pure-button pure-button-primary">
|
||||||
<%= translate(locale, "Sign Up") %>
|
<%= translate(locale, "Sign Up") %>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<% case captcha_type when %>
|
<% case captcha_type when %>
|
||||||
<% when "image" %>
|
<% when "image" %>
|
||||||
<label>
|
<label>
|
||||||
<button type="submit" name="change_type" class="pure-button pure-button-primary" value="text">
|
<button type="submit" name="change_type" class="pure-button pure-button-primary" value="text">
|
||||||
<%= translate(locale, "Text CAPTCHA") %>
|
<%= translate(locale, "Text CAPTCHA") %>
|
||||||
</button>
|
</button>
|
||||||
</label>
|
</label>
|
||||||
<% else # "text" %>
|
<% else # "text" %>
|
||||||
<label>
|
<label>
|
||||||
<button type="submit" name="change_type" class="pure-button pure-button-primary" value="image">
|
<button type="submit" name="change_type" class="pure-button pure-button-primary" value="image">
|
||||||
<%= translate(locale, "Image CAPTCHA") %>
|
<%= translate(locale, "Image CAPTCHA") %>
|
||||||
</button>
|
</button>
|
||||||
</label>
|
</label>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
|
||||||
<div class="account-page-action-bar">
|
|
||||||
<button type="submit" name="action" value="signup" class="pure-button pure-button-primary" id="signup-button">
|
|
||||||
<%= translate(locale, "Sign Up") %>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user