SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/tfa/totp_login.php

  1. <?php
  2. use Sprout\Helpers\Enc;
  3. use Sprout\Helpers\Form;
  4. ?>
  5.  
  6. <style>
  7. input.two-factor-code { text-align: center; font: 16px monospace; letter-spacing: 1em; padding-left: 1em; }
  8. </style>
  9.  
  10.  
  11. <form action="<?= Enc::html($action_url); ?>" method="post" autocomplete="off">
  12. <input type="hidden" name="redirect" value="<?= Enc::html(@$_GET['redirect']); ?>">
  13.  
  14. <?php
  15. Form::nextFieldDetails('Enter your two factor code', true);
  16. echo Form::text('code', ['class' => 'two-factor-code', 'size' => '7', 'autofocus' => 'autofocus'], []);
  17. ?>
  18.  
  19. <div class="text-align-right">
  20. <a href="admin/logout">Cancel</a>
  21. &nbsp;
  22. <button type="submit" class="login-button button button-regular button-green">Log in</button>
  23. </div>
  24. </form>
  25.