File tree Expand file tree Collapse file tree 2 files changed +51
-20
lines changed Expand file tree Collapse file tree 2 files changed +51
-20
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
3+ * @license GNU General Public License version 2 or later; see LICENSE.txt
4+ */
5+
6+ ( ( ) => {
7+ 'use strict' ;
8+
9+ const btn = document . getElementById ( 'btn-login-submit' ) ;
10+ if ( btn ) {
11+ btn . addEventListener ( 'click' , ( event ) => {
12+ event . preventDefault ( ) ;
13+ const form = document . getElementById ( 'form-login' ) ;
14+ if ( form && document . formvalidator . isValid ( form ) ) {
15+ Joomla . submitbutton ( 'login' ) ;
16+ }
17+ } ) ;
18+ }
19+
20+ const formTmp = document . querySelector ( '.login-initial' ) ;
21+ if ( formTmp ) {
22+ formTmp . style . display = 'block' ;
23+ if ( ! document . querySelector ( 'joomla-alert' ) ) {
24+ document . getElementById ( 'mod-login-username' ) . focus ( ) ;
25+ }
26+ }
27+ } ) ( ) ;
Original file line number Diff line number Diff line change 1+ /**
2+ * PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
3+ * OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
4+ **/
5+
16/**
27 * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
38 * @license GNU General Public License version 2 or later; see LICENSE.txt
49 */
510
6- ( function ( ) {
7- 'use strict' ;
8-
9- var btn = document . getElementById ( 'btn-login-submit' ) ;
10- if ( btn ) {
11- btn . addEventListener ( 'click' , function ( e ) {
12- e . preventDefault ( ) ;
13- var form = document . getElementById ( 'form-login' ) ;
14- if ( form && document . formvalidator . isValid ( form ) ) {
15- Joomla . submitbutton ( 'login' )
16- }
17- } ) ;
18- }
11+ ( function ( ) {
12+ 'use strict' ;
1913
20- var formTmp = document . querySelector ( '.login-initial' ) ;
21- if ( formTmp ) {
22- formTmp . style . display = 'block' ;
23- if ( ! document . querySelector ( 'joomla-alert' ) ) {
24- document . getElementById ( 'mod-login-username' ) . focus ( ) ;
25- }
26- }
14+ var btn = document . getElementById ( 'btn-login-submit' ) ;
15+ if ( btn ) {
16+ btn . addEventListener ( 'click' , function ( event ) {
17+ event . preventDefault ( ) ;
18+ var form = document . getElementById ( 'form-login' ) ;
19+ if ( form && document . formvalidator . isValid ( form ) ) {
20+ Joomla . submitbutton ( 'login' ) ;
21+ }
22+ } ) ;
23+ }
2724
25+ var formTmp = document . querySelector ( '.login-initial' ) ;
26+ if ( formTmp ) {
27+ formTmp . style . display = 'block' ;
28+ if ( ! document . querySelector ( 'joomla-alert' ) ) {
29+ document . getElementById ( 'mod-login-username' ) . focus ( ) ;
30+ }
31+ }
2832} ) ( ) ;
You can’t perform that action at this time.
0 commit comments