/[smecontribs]/rpms/smeserver-manager-AdminLTE/contribs10/smeserver-manager-AdminLTE-0.1.3-Update-login-panel-add-password-visibility.patch
ViewVC logotype

Contents of /rpms/smeserver-manager-AdminLTE/contribs10/smeserver-manager-AdminLTE-0.1.3-Update-login-panel-add-password-visibility.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Nov 29 16:14:02 2021 UTC (3 years ago) by brianr
Branch: MAIN
CVS Tags: smeserver-manager-AdminLTE-0_1_3-19_el7_sme, smeserver-manager-AdminLTE-0_1_3-13_el7_sme, smeserver-manager-AdminLTE-0_1_3-18_el7_sme, smeserver-manager-AdminLTE-0_1_3-12_el7_sme, smeserver-manager-AdminLTE-0_1_4-1_el7_sme, smeserver-manager-AdminLTE-0_1_3-11_el7_sme, smeserver-manager-AdminLTE-0_1_3-16_el7_sme, smeserver-manager-AdminLTE-0_1_3-10_el7_sme, smeserver-manager-AdminLTE-0_1_3-20_el7_sme, smeserver-manager-AdminLTE-0_1_3-9_el7_sme, smeserver-manager-AdminLTE-0_1_3-21_el7_sme, smeserver-manager-AdminLTE-0_1_3-6_el7_sme, smeserver-manager-AdminLTE-0_1_3-8_el7_sme, smeserver-manager-AdminLTE-0_1_3-7_el7_sme, smeserver-manager-AdminLTE-0_1_3-4_el7_sme, smeserver-manager-AdminLTE-0_1_3-15_el7_sme, smeserver-manager-AdminLTE-0_1_3-3_el7_sme, smeserver-manager-AdminLTE-0_1_3-5_el7_sme, HEAD
* Mon Nov 29 2021 Brian Read <brianr@bjsystems.co.uk> 0.1.3-3.sme
- Update-login-panel-add-password-visibility.patch [SME: 11781]

1 diff -urN smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/public/css/server-manager2.css smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/public/css/server-manager2.css
2 --- smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/public/css/server-manager2.css 2021-04-28 07:12:00.000000000 +0100
3 +++ smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/public/css/server-manager2.css 2021-11-29 14:27:00.000000000 +0000
4 @@ -196,3 +196,10 @@
5 margin : 0;
6 }
7
8 +.login-box {
9 + margin: 0 auto;
10 +}
11 +
12 +.table-striped>tr:nth-child(odd){
13 + background-color:#c2e8a8;
14 +}
15 diff -urN smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/templates/layouts/default.html.ep smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/templates/layouts/default.html.ep
16 --- smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/templates/layouts/default.html.ep 2021-11-29 15:58:29.650602949 +0000
17 +++ smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/templates/layouts/default.html.ep 2021-11-29 15:07:00.000000000 +0000
18 @@ -243,6 +243,9 @@
19
20 <!-- jQuery -->
21 %= javascript "/plugins/jquery/jquery.min.js"
22 + <!-- Show hide password
23 + %= javascript "/plugins/hideShowPassword.min.js"
24 + -->
25 <!-- Bootstrap 4 -->
26 %= javascript "/plugins/bootstrap/js/bootstrap.bundle.min.js"
27 <!-- AdminLTE App -->
28 @@ -281,6 +284,8 @@
29 $(".sme-success").addClass("card card-success card-body");
30 $("table.sme-border").addClass("table table-striped");
31 $("#footer").addClass("card card-info card-body");
32 + $(".module").addClass("card card-info card-body");
33 + $(".central").addClass("card card-info card-body");
34 /*$("#container").addClass("nav")*/
35 $(".menu-cell").addClass("nav-item");
36 $(".item").addClass("nav-link");
37 @@ -324,6 +329,8 @@
38 breadcrumb.push('Level');
39 breadcrumb.pop();
40 */
41 + //alert("Hello world");
42 + $("#login_password").togglePasswordVisibility();
43
44
45 });
46 @@ -345,6 +352,26 @@
47 $('ul.treeview-menu a').filter(function() {
48 return this.href == url;
49 }).parentsUntil(".sidebar-menu > .treeview-menu").addClass('active');
50 +
51 + //Setup passord visibility toggle
52 + (function ($) {
53 + $.fn.togglePasswordVisibility = function() {
54 + togglePassword.addEventListener('click', function (e) {
55 + // toggle the type attribute
56 + const togglePassword = document.getElementById('togglePassword');
57 + const password = document.getElementById('login-password');
58 + const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
59 + password.setAttribute('type', type);
60 + // toggle the eye slash icon
61 + this.classList.toggle('fa-eye-slash');
62 + });
63 + };
64 + }(jQuery));
65 +
66 +
67 +
68 +
69 +
70
71 </script>
72
73 diff -urN smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/templates/login.html.ep smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/templates/login.html.ep
74 --- smeserver-manager-AdminLTE-0.1.3.old/root/usr/share/smanager/themes/AdminLTE/templates/login.html.ep 1970-01-01 01:00:00.000000000 +0100
75 +++ smeserver-manager-AdminLTE-0.1.3/root/usr/share/smanager/themes/AdminLTE/templates/login.html.ep 2021-11-29 09:59:00.000000000 +0000
76 @@ -0,0 +1,83 @@
77 +% layout 'default', title => "Sme server 2 - login";
78 +
79 +% content_for 'module' => begin
80 +
81 +<div id="module" class="content-login hold-transition login-box" >
82 +
83 + %if ($config->{debug} == 1) {
84 + <p>
85 + %= dumper $c->current_route
86 + %if ( stash 'trt' ) {
87 + %= dumper stash 'trt'
88 + %}
89 + </p>
90 + %}
91 +
92 +% if ( stash 'error' ) {
93 + <br><div class=sme-error>
94 + %= $c->render_to_string(inline => stash 'error')
95 + </div>
96 +%}
97 +
98 + <div class="card">
99 + <div class="card-body login-card-body">
100 + <p class="login-box-msg"><%=l 'use_TITLE' %></p>
101 +
102 + % my $btn = l('use_SIGNIN');
103 +
104 + <!------
105 + <h1>
106 + %=l 'use_TITLE'
107 + </h1>
108 + ---->
109 +
110 + %= form_for '/login' => (method => 'POST') => begin
111 +
112 + <!---
113 + <p><span class=label>
114 + %=l 'USER_NAME'
115 + </span><span class=input>
116 + %= text_field 'Username'
117 + </span></p>
118 +
119 + <p><span class=label>
120 + %=l 'PASSWORD'
121 + </span><span class=input>
122 + %= password_field 'Password'
123 + </span></p>
124 + --->
125 +
126 +
127 + <div class="input-group mb-3">
128 + <input type="text" name='Username' class="form-control" placeholder="<%=l 'USER_NAME'%>">
129 + <div class="input-group-append">
130 + <div class="input-group-text">
131 + <span class="fas fa-user"></span>
132 + </div>
133 + </div>
134 + </div>
135 + <div class="input-group mb-3">
136 + <input type="password" name='Password' id='login-password' class="form-control" placeholder="<%=l 'PASSWORD'%>">
137 + <div class="input-group-append">
138 + <div class="input-group-text">
139 + <i class="far fa-eye" id="togglePassword"></i>
140 + <!---<span class="fas fa-lock"></span>-->
141 + </div>
142 + </div>
143 + </div>
144 +
145 +
146 + %= hidden_field 'From' => $c->tx->req->url
147 + %= hidden_field 'Trt' => stash 'trt'
148 +
149 + <br>
150 + <div class='center'>
151 + %= submit_button "$btn", class => 'action'
152 + </div>
153 +
154 +
155 + % end
156 + </div></div>
157 +
158 +</div>
159 +%end

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed