mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Hide OTP prompt on /adminon when irrelevant.
If the user doesn't have an OTP secret and an OTP isn't required for turning on admin mode, we'll just hide the prompt to avoid confusion.
This commit is contained in:
committed by
Keith Mitchell
parent
5d67249d60
commit
760acab7a4
@@ -43,6 +43,7 @@
|
||||
${error_field("WRONG_PASSWORD", "password")}
|
||||
</%utils:round_field>
|
||||
|
||||
% if not g.disable_require_admin_otp or c.user.otp_secret:
|
||||
<%utils:round_field title="${_('one-time password')}" description="${_('(required)')}" css_class="adminpasswordform">
|
||||
<input type="text" name="otp" maxlength="6" tabindex="1" required pattern="[0-9]{6}" autocomplete="off"
|
||||
% if c.otp_cached:
|
||||
@@ -61,6 +62,7 @@
|
||||
% endif
|
||||
> ${_("remember this computer")}</label>
|
||||
</%utils:round_field>
|
||||
% endif
|
||||
|
||||
<p><button type="submit" class="btn" tabindex="1">${_('turn admin on')}</button></p>
|
||||
<p class="status error"></p>
|
||||
|
||||
Reference in New Issue
Block a user