]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/static/js/login.js
Grammar change in the license declaration.
[citadel.git] / webcit-ng / static / js / login.js
index 122c7b23302579d3ef40d26efca3dec3c7ac1d25..11592ee62fd7febad0e1a554960f8c6ac5ef0f8f 100644 (file)
@@ -1,7 +1,7 @@
-// Copyright (c) 2016-2022 by the citadel.org team
+// Copyright (c) 2016-2023 by the citadel.org team
 //
 // This program is open source software.  Use, duplication, or
-// disclosure are subject to the GNU General Public License v3.
+// disclosure is subject to the GNU General Public License v3.
 
 
 // This is where the login screen (modal) is displayed.
@@ -9,30 +9,26 @@
 // If you want to change the look of the login dialog, this is where to change it.
 function display_login_screen(any_message) {
        document.getElementById("ctdl_big_modal").innerHTML = `
-               <div class="w3-modal-content w3-card-4 w3-animate-zoom" style="max-width:600px">
-       
-                       <div class="w3-center"><br>
-                               <span class="w3-button w3-xlarge w3-transparent w3-display-topright" title="Close Modal">×</span>
-                               <span class="w3-circle w3-margin-top"><i class="fa fa-user"></i></span>
-                       </div>
 
-                       <div class="w3-container">
-                               <div class="w3-section">
-                                       <span class="w3-center w3-red">${any_message}</span>
-                               </div>
-                               <div class="w3-section">
-                                       <label><b>${_("User name:")}</b></label>
-                                       <input class="w3-input w3-border w3-margin-bottom" type="text" id="username" required>
-                                       <label><b>${_("Password:")}</b></label>
-                                       <input class="w3-input w3-border" type="password" id="password" required>
-                                       <button class="w3-button w3-block w3-blue w3-section w3-padding" onClick="javascript:login_button()">${_("Log in")}</button>
-                                       <input class="w3-check w3-margin-top" type="checkbox" checked="checked"> Remember me
-                               </div>
-                       </div>
+               <div class="ctdl-modal-header">
+                               <span><i class="fa fa-user"></i></span>
+                               <span>${any_message}</span>
+               </div>
 
-                       <div class="w3-container w3-border-top w3-padding-16 w3-light-grey">
-                               <button type="button" class="w3-button w3-red">Cancel</button>
-                               <span class="w3-right w3-padding w3-hide-small">Forgot <a href="#">password?</a></span>
+               <div class="ctdl-login-screen-grid-container">
+                       <div class="ctdl-login-screen-grid-item"><label><b>${_("User name:")}</b></label></div>
+                       <div class="ctdl-login-screen-grid-item"><input type="text" id="username" required></div>
+                       <div class="ctdl-login-screen-grid-item"><label><b>${_("Password:")}</b></label></div>
+                       <div class="ctdl-login-screen-grid-item"><input type="password" id="password" required></div>
+                       <div class="ctdl-login-screen-grid-item"></div>
+                       <div class="ctdl-login-screen-grid-item">
+                               <input type="checkbox" checked="checked">
+                               Remember me
+                       </div>
+                       <div class="ctdl-login-screen-grid-item"></div>
+                       <div class="ctdl-login-screen-grid-item">
+                               <button onClick="javascript:login_button()">${_("Log in")}</button>
+                               <button type="button">Cancel</button>
                        </div>
                </div>
        `;
@@ -44,10 +40,10 @@ function display_login_screen(any_message) {
 // When the user elects to log out, we just call /ctdl/a/logout and let the system flush the session.
 // When we go back to ctdl_startup() it will detect that we are no longer logged in, and do the right thing.
 //function logout() {
-logout = async() => {
-       response = await fetch("/ctdl/a/logout");
-       ctdl_startup();                                 // let the regular startup code take care of everything else
-}
+//logout = async() => {
+       //response = await fetch("/ctdl/a/logout");
+       //ctdl_startup();                                       // let the regular startup code take care of everything else
+//}
 
 
 function login_button(username) {