Login.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /**
  2. * 登录页面
  3. */
  4. Ext.define('saas.view.auth.Login', {
  5. extend: 'Ext.container.Container',
  6. xtype: 'login',
  7. requires: [
  8. 'Ext.form.Label',
  9. 'Ext.form.field.Checkbox'
  10. ],
  11. controller: 'login',
  12. cls: 'auth-login',
  13. layout: {
  14. type: 'vbox',
  15. align: 'center',
  16. pack: 'center'
  17. },
  18. defaultFocus: 'authdialog',
  19. items: [{
  20. xtype: 'authdialog',
  21. reference: 'authdialog',
  22. defaultButton: 'loginButton',
  23. autoComplete: true,
  24. bodyPadding: '20 20',
  25. cls: 'auth-dialog-login',
  26. header: false,
  27. width: 415,
  28. layout: {
  29. type: 'vbox',
  30. align: 'stretch'
  31. },
  32. defaults: {
  33. margin: '5 0'
  34. },
  35. items: [{
  36. xtype: 'label',
  37. text: '账 户 登 录'
  38. },
  39. {
  40. xtype: 'textfield',
  41. cls: 'auth-textbox',
  42. name: 'username',
  43. bind: '{username}',
  44. height: 55,
  45. hideLabel: true,
  46. allowBlank: false,
  47. emptyText: '账号/邮箱/手机号',
  48. triggers: {
  49. glyphed: {
  50. cls: 'trigger-glyph-noop auth-email-trigger'
  51. }
  52. }
  53. },
  54. {
  55. xtype: 'textfield',
  56. cls: 'auth-textbox',
  57. height: 55,
  58. hideLabel: true,
  59. emptyText: '密码',
  60. inputType: 'password',
  61. name: 'password',
  62. bind: '{password}',
  63. allowBlank: false,
  64. triggers: {
  65. glyphed: {
  66. cls: 'trigger-glyph-noop auth-password-trigger'
  67. }
  68. }
  69. },
  70. {
  71. xtype: 'container',
  72. layout: 'hbox',
  73. items: [{
  74. xtype: 'checkboxfield',
  75. flex: 1,
  76. cls: 'form-panel-font-color rememberMeCheckbox',
  77. height: 30,
  78. bind: '{persist}',
  79. boxLabel: '记住账户'
  80. },
  81. {
  82. xtype: 'box',
  83. html: '<a href="#passwordreset" class="link-forgot-password"> 忘记密码 ?</a>'
  84. }
  85. ]
  86. },
  87. {
  88. xtype: 'button',
  89. reference: 'loginButton',
  90. scale: 'large',
  91. ui: 'soft-green',
  92. iconAlign: 'right',
  93. iconCls: 'x-fa fa-angle-right',
  94. text: '登录',
  95. formBind: true,
  96. listeners: {
  97. click: 'onLoginButton'
  98. }
  99. }
  100. ]
  101. }]
  102. });