ReLogin.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /**
  2. * 重新登录弹窗
  3. */
  4. Ext.define('saas.view.auth.ReLogin', {
  5. extend: 'Ext.window.Window',
  6. xtype: 'relogin',
  7. id: 'relogin',
  8. controller: 'relogin',
  9. title: '重新登录',
  10. cls: 'x-window-dbfind x-relogin-win',
  11. layout: 'fit',
  12. modal: true,
  13. width: 350,
  14. bodyPadding: 20,
  15. items: [{
  16. xtype: 'form',
  17. reference: 'reloginform',
  18. defaults: {
  19. anchor: '100%',
  20. labelWidth: 120
  21. },
  22. items: [{
  23. xtype: 'displayfield',
  24. height: 32,
  25. cls: 'infoLabel',
  26. value: '会话已过期,请重新登录',
  27. }, {
  28. xtype: 'textfield',
  29. name: 'username',
  30. emptyText: '请输入账号/邮箱/手机号',
  31. fieldLabel: '账号',
  32. bind: '{account.username}',
  33. readOnly: true,
  34. hideLabel: true,
  35. allowBlank: false
  36. }, {
  37. xtype: 'textfield',
  38. hideLabel: true,
  39. fieldLabel: '密码',
  40. emptyText: '密码',
  41. inputType: 'password',
  42. name: 'password',
  43. // bind: '{password}',
  44. allowBlank: false,
  45. enableKeyEvents: true,
  46. listeners: {
  47. keydown: {
  48. fn: function(th, e, eOpts) {
  49. if(e.keyCode == 13) {
  50. this.up('relogin').getController().onLogin();
  51. }
  52. }
  53. }
  54. }
  55. }, {
  56. xtype: 'container',
  57. layout: 'hbox',
  58. items: [{
  59. xtype: 'checkboxfield',
  60. flex: 1,
  61. cls: 'form-panel-font-color rememberMeCheckbox',
  62. height: 30,
  63. name: 'remember',
  64. bind: '{remember}',
  65. boxLabel: '记住密码'
  66. }, {
  67. xtype: 'box',
  68. // html: '<a href="#passwordreset" class="link-forgot-password"> 忘记密码 ?</a>'
  69. }]
  70. }, {
  71. xtype: 'container',
  72. layout: {
  73. type: 'hbox',
  74. pack: 'center'
  75. },
  76. items: [{
  77. xtype: 'button',
  78. text: '登录',
  79. formBind: true,
  80. width: 68,
  81. margin: '0 12 0 0',
  82. listeners: {
  83. click: 'onLogin'
  84. }
  85. }, {
  86. xtype: 'button',
  87. text: '取消',
  88. width: 68,
  89. margin: '0 0 0 12',
  90. listeners: {
  91. click: 'onCancel'
  92. }
  93. }]
  94. }]
  95. }],
  96. listeners: {
  97. afterrender: 'onAfterRender',
  98. }
  99. });