lwqzx_auth 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4413efd6d9a77135f2eccab4196b6ed2edcd61ce1aae003821dc19aeebe72588
|
4
|
+
data.tar.gz: f9c0c21a61e2b19314e4f3e6ecc1e39780c5dd32da24c40bdfbf7ed1920443ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e4addf6407cbadfc2a342779f8507cf578c912f96b91e6946de90e05497b69647906fe1c04b7f846929a7afb259818b854e10f31654b5f6cc9de72782ff814b
|
7
|
+
data.tar.gz: 6af0125425af9aa7bd72487ac08de3bc295f44a277f7c9f83d6a545eea3e9d700aaa5c6d2e95a02f95957709128b7745b7872cb6b4e02dea46b66a69c7d1d19b
|
@@ -3,7 +3,7 @@ br
|
|
3
3
|
.row
|
4
4
|
.col-sm-4
|
5
5
|
.col-sm-4
|
6
|
-
= form_tag auth_path, role: "form", class: "card form-horizontal" do
|
6
|
+
= form_tag auth_path, role: "form", class: "loginForm card form-horizontal" do
|
7
7
|
.card-body
|
8
8
|
strong 登录名
|
9
9
|
br
|
@@ -12,8 +12,28 @@ br
|
|
12
12
|
strong 密码:
|
13
13
|
br
|
14
14
|
= password_field_tag :password,nil, class: "form-control"
|
15
|
+
p.text-center
|
16
|
+
a.rucaptcha-image-box href="#" = rucaptcha_image_tag
|
17
|
+
p.text-center = rucaptcha_input_tag(class: 'form-control code',placeholder: "输入验证码")
|
15
18
|
|
16
19
|
.card-footer
|
17
20
|
= submit_tag '登录', class: "btn-block btn-primary btn"
|
18
21
|
|
19
22
|
.col-sm-4
|
23
|
+
|
24
|
+
javascript:
|
25
|
+
javascript:
|
26
|
+
$(".loginForm").submit(function(event){
|
27
|
+
if($("input.code").val()==""){alert("请填写验证码");return false;};
|
28
|
+
if($("input.login").val()==""){alert("登录名不能为空");return false;};
|
29
|
+
if($("input.password").val()==""){alert("密码不能为空");return false;};
|
30
|
+
});
|
31
|
+
|
32
|
+
$("a.rucaptcha-image-box").click(function(e){
|
33
|
+
e.preventDefault();
|
34
|
+
btn = $(e.currentTarget);
|
35
|
+
img = btn.find('img:first');
|
36
|
+
currentSrc = img.attr('src');
|
37
|
+
img.attr('src', currentSrc.split('?')[0] + '?' + (new Date()).getTime());
|
38
|
+
return false;
|
39
|
+
});
|
data/lib/lwqzx_auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lwqzx_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zxy
|
@@ -30,6 +30,7 @@ files:
|
|
30
30
|
- app/mailers/lwqzx_auth/application_mailer.rb
|
31
31
|
- app/models/lwqzx_auth/application_record.rb
|
32
32
|
- app/views/lwqzx_auth/auth/login.html.slim
|
33
|
+
- config/initializers/rucaptcha.rb
|
33
34
|
- config/routes.rb
|
34
35
|
- lib/lwqzx_auth.rb
|
35
36
|
- lib/lwqzx_auth/engine.rb
|