login.html 6.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <div id="content-container" class="container">
  2. <div class="user-section login-section">
  3. <div class="logon-tab clearfix"><a class="active">{:__('Sign in')}</a> <a href="{:url('user/register')}?url={$url|urlencode|htmlentities}">{:__('Sign up')}</a></div>
  4. <div class="login-main">
  5. <form name="form" id="login-form" class="form-vertical" method="POST" action="">
  6. <!--@IndexLoginFormBegin-->
  7. <input type="hidden" name="url" value="{$url|htmlentities}"/>
  8. {:token()}
  9. <div class="form-group">
  10. <label class="control-label" for="account">{:__('Account')}</label>
  11. <div class="controls">
  12. <input class="form-control" id="account" type="text" name="account" value="" data-rule="required" placeholder="{:__('Email/Mobile/Username')}" autocomplete="off">
  13. <div class="help-block"></div>
  14. </div>
  15. </div>
  16. <div class="form-group">
  17. <label class="control-label" for="password">{:__('Password')}</label>
  18. <div class="controls">
  19. <input class="form-control" id="password" type="password" name="password" data-rule="required;password" placeholder="{:__('Password')}" autocomplete="off">
  20. </div>
  21. </div>
  22. <div class="form-group">
  23. <div class="controls">
  24. <div class="checkbox inline">
  25. <label>
  26. <input type="checkbox" name="keeplogin" checked="checked" value="1"> {:__('Keep login')}
  27. </label>
  28. </div>
  29. <div class="pull-right"><a href="javascript:;" class="btn-forgot">{:__('Forgot password')}</a></div>
  30. </div>
  31. </div>
  32. <div class="form-group">
  33. <button type="submit" class="btn btn-primary btn-lg btn-block">{:__('Sign in')}</button>
  34. <a href="{:url('user/register')}?url={$url|urlencode|htmlentities}" class="btn btn-default btn-lg btn-block mt-3 no-border">{:__("Don't have an account? Sign up")}</a>
  35. </div>
  36. <!--@IndexLoginFormEnd-->
  37. </form>
  38. </div>
  39. </div>
  40. </div>
  41. <script type="text/html" id="resetpwdtpl">
  42. <form id="resetpwd-form" class="form-horizontal form-layer" method="POST" action="{:url('api/user/resetpwd')}">
  43. <div class="form-body">
  44. <input type="hidden" name="action" value="resetpwd"/>
  45. <div class="form-group">
  46. <label class="control-label col-xs-12 col-sm-3">{:__('Type')}:</label>
  47. <div class="col-xs-12 col-sm-8">
  48. <div class="radio">
  49. <label for="type-email"><input id="type-email" checked="checked" name="type" data-send-url="{:url('api/ems/send')}" data-check-url="{:url('api/validate/check_ems_correct')}" type="radio" value="email"> {:__('Reset password by email')}</label>
  50. <label for="type-mobile"><input id="type-mobile" name="type" type="radio" data-send-url="{:url('api/sms/send')}" data-check-url="{:url('api/validate/check_sms_correct')}" value="mobile"> {:__('Reset password by mobile')}</label>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="form-group" data-type="email">
  55. <label for="email" class="control-label col-xs-12 col-sm-3">{:__('Email')}:</label>
  56. <div class="col-xs-12 col-sm-8">
  57. <input type="text" class="form-control" id="email" name="email" value="" data-rule="required(#type-email:checked);email;remote({:url('api/validate/check_email_exist')}, event=resetpwd, id=0)" placeholder="">
  58. <span class="msg-box"></span>
  59. </div>
  60. </div>
  61. <div class="form-group hide" data-type="mobile">
  62. <label for="mobile" class="control-label col-xs-12 col-sm-3">{:__('Mobile')}:</label>
  63. <div class="col-xs-12 col-sm-8">
  64. <input type="text" class="form-control" id="mobile" name="mobile" value="" data-rule="required(#type-mobile:checked);mobile;remote({:url('api/validate/check_mobile_exist')}, event=resetpwd, id=0)" placeholder="">
  65. <span class="msg-box"></span>
  66. </div>
  67. </div>
  68. <div class="form-group">
  69. <label for="captcha" class="control-label col-xs-12 col-sm-3">{:__('Captcha')}:</label>
  70. <div class="col-xs-12 col-sm-8">
  71. <div class="input-group">
  72. <input type="text" name="captcha" class="form-control" data-rule="required;length({$Think.config.captcha.length});digits;remote({:url('api/validate/check_ems_correct')}, event=resetpwd, email:#email)"/>
  73. <span class="input-group-btn" style="padding:0;border:none;">
  74. <a href="javascript:;" class="btn btn-primary btn-captcha" data-url="{:url('api/ems/send')}" data-type="email" data-event="resetpwd">{:__('Send verification code')}</a>
  75. </span>
  76. </div>
  77. <span class="msg-box"></span>
  78. </div>
  79. </div>
  80. <div class="form-group">
  81. <label for="newpassword" class="control-label col-xs-12 col-sm-3">{:__('New password')}:</label>
  82. <div class="col-xs-12 col-sm-8">
  83. <input type="password" class="form-control" id="newpassword" name="newpassword" value="" data-rule="required;password" placeholder="">
  84. <span class="msg-box"></span>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="form-group form-footer">
  89. <div class="col-xs-12 col-sm-8 col-sm-offset-3">
  90. <button type="submit" class="btn btn-md btn-primary">{:__('Ok')}</button>
  91. </div>
  92. </div>
  93. </form>
  94. </script>