nyros_form2 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/nyros_form2_manifest.js +1 -0
- data/app/assets/javascripts/nyros_form2/application.js +7 -0
- data/app/assets/javascripts/nyros_form2/users.js +31 -1
- data/app/assets/stylesheets/nyros_form2/{application.css → application.scss} +3 -1
- data/app/assets/stylesheets/nyros_form2/users.css +154 -0
- data/app/controllers/nyros_form2/users_controller.rb +1 -1
- data/app/views/layouts/nyros_form2/application.html.erb +5 -7
- data/app/views/nyros_form2/users/edit.html.erb +40 -258
- data/app/views/nyros_form2/users/index.html.erb +34 -31
- data/app/views/nyros_form2/users/new.html.erb +41 -247
- data/lib/nyros_form2/version.rb +1 -1
- metadata +2 -3
- data/app/assets/javascripts/nyros_form2/failures.js +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54d3b5862b0ed39ca9ca14e86981e8c9661f0ef7a8d072f2d657a3c23740a548
|
4
|
+
data.tar.gz: f2a869bd758d232614cbc43004b8dfd3787a9dae66b0a5cdf807d7fe4a80ecb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b35f611bea308abec27bea109508018a0fed81bdf7f046f09c1bc38e5ae781b95f57931d3ee5ed766886df2c34357ffb0e720066f3065fe3dde775851b5834a4
|
7
|
+
data.tar.gz: a5b30349030270603a674e29b52753d4e9c3b06a6b01b00ad32b9475bf3deb7f15639f46cfa2a1b948e3db5a925de165365e15d9df2094386d7532c30f1205b9
|
@@ -10,6 +10,13 @@
|
|
10
10
|
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
11
|
// about supported directives.
|
12
12
|
//
|
13
|
+
|
13
14
|
//= require rails-ujs
|
14
15
|
//= require activestorage
|
16
|
+
//= require jquery
|
17
|
+
//= require jquery_ujs
|
18
|
+
//= require bootstrap
|
15
19
|
//= require_tree .
|
20
|
+
|
21
|
+
|
22
|
+
|
@@ -2,4 +2,34 @@
|
|
2
2
|
// All this logic will automatically be available in application.js.
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
// On change form validations
|
6
|
+
$(function() {
|
7
|
+
$("form[name='myForm']").validate({
|
8
|
+
rules: {
|
9
|
+
name: "required",
|
10
|
+
email: {
|
11
|
+
required: true,
|
12
|
+
email: true
|
13
|
+
},
|
14
|
+
mobile: {
|
15
|
+
required: true,
|
16
|
+
digits: true,
|
17
|
+
minlength: 10,
|
18
|
+
maxlength: 10,
|
19
|
+
}
|
20
|
+
},
|
21
|
+
// Specify validation error messages
|
22
|
+
messages: {
|
23
|
+
name: "Please enter your firstname",
|
24
|
+
mobile: {
|
25
|
+
required: "Please Enter mobile number",
|
26
|
+
minlength: "Your Mobile must be at least 10 numbers long"
|
27
|
+
},
|
28
|
+
email: "Please enter a valid email address"
|
29
|
+
},
|
30
|
+
// in the "action" attribute of the form when valid
|
31
|
+
submitHandler: function(form) {
|
32
|
+
form.submit();
|
33
|
+
}
|
34
|
+
});
|
35
|
+
});
|
@@ -10,6 +10,8 @@
|
|
10
10
|
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
11
|
* It is generally better to create a new file per style scope.
|
12
12
|
*
|
13
|
-
|
13
|
+
*= require_tree .
|
14
14
|
*= require_self
|
15
15
|
*/
|
16
|
+
|
17
|
+
@import "bootstrap";
|
@@ -2,3 +2,157 @@
|
|
2
2
|
Place all the styles related to the matching controller here.
|
3
3
|
They will automatically be included in application.css.
|
4
4
|
*/
|
5
|
+
.form-group{
|
6
|
+
width:356px;
|
7
|
+
margin-bottom: 30px;
|
8
|
+
|
9
|
+
}
|
10
|
+
|
11
|
+
.form{
|
12
|
+
padding-top: 30px;
|
13
|
+
padding-bottom: 50px;
|
14
|
+
}
|
15
|
+
.col-sm-12{
|
16
|
+
padding-left: 0px;
|
17
|
+
padding-right: 0px;
|
18
|
+
}
|
19
|
+
|
20
|
+
#user_remember_me{
|
21
|
+
margin-right:0px;
|
22
|
+
}
|
23
|
+
.forgot_pwd{
|
24
|
+
padding-left: 90px;
|
25
|
+
}
|
26
|
+
|
27
|
+
a:hover{
|
28
|
+
text-decoration-line: none;
|
29
|
+
}
|
30
|
+
|
31
|
+
#flash_alert{
|
32
|
+
color: red;
|
33
|
+
}
|
34
|
+
|
35
|
+
#form_email{
|
36
|
+
margin-left: 23px;
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
#sign_in_from{
|
42
|
+
margin-left: 400px;
|
43
|
+
}
|
44
|
+
|
45
|
+
.form1 {
|
46
|
+
margin: 0 auto;
|
47
|
+
width: 470px;
|
48
|
+
background-color: white;
|
49
|
+
padding-left: 0px;
|
50
|
+
}
|
51
|
+
|
52
|
+
.form label {
|
53
|
+
display: inline-block;
|
54
|
+
text-align: right;
|
55
|
+
float: left;
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
.modal_form{
|
60
|
+
margin-top: 0px;
|
61
|
+
}
|
62
|
+
|
63
|
+
.homepage_dish{
|
64
|
+
height: 100%;
|
65
|
+
width: 50%;
|
66
|
+
position:fixed;
|
67
|
+
}
|
68
|
+
|
69
|
+
.login{
|
70
|
+
padding-right: 20px;
|
71
|
+
color:#0066ff;
|
72
|
+
font-size: 20.3px;
|
73
|
+
line-height: 1.44359;
|
74
|
+
border: 0px;
|
75
|
+
font-weight:700;
|
76
|
+
|
77
|
+
|
78
|
+
}
|
79
|
+
|
80
|
+
.login a:hover{
|
81
|
+
|
82
|
+
}
|
83
|
+
|
84
|
+
.signup{
|
85
|
+
padding-right: 100px;
|
86
|
+
color:#0066ff;
|
87
|
+
|
88
|
+
font-size: 20.3px;
|
89
|
+
line-height: 1.44359;
|
90
|
+
border: 0px;
|
91
|
+
font-weight:700;
|
92
|
+
|
93
|
+
|
94
|
+
}
|
95
|
+
|
96
|
+
.top-left {
|
97
|
+
position: absolute;
|
98
|
+
top:450px;
|
99
|
+
left:10px;
|
100
|
+
color: #f79b9b;
|
101
|
+
font-size: 50px;
|
102
|
+
font-weight: 900;
|
103
|
+
|
104
|
+
}
|
105
|
+
|
106
|
+
.top-left:hover{
|
107
|
+
color: #f79b9b;
|
108
|
+
}
|
109
|
+
|
110
|
+
.bottom-right {
|
111
|
+
|
112
|
+
}
|
113
|
+
.bottom_img{
|
114
|
+
width: 300px;
|
115
|
+
height: 300px;
|
116
|
+
}
|
117
|
+
.main_header{
|
118
|
+
font-weight: 800;
|
119
|
+
font-size:40px;
|
120
|
+
color: black;
|
121
|
+
}
|
122
|
+
|
123
|
+
a:hover{
|
124
|
+
text-decoration-line: none;
|
125
|
+
|
126
|
+
}
|
127
|
+
|
128
|
+
.u-dimension-2 {
|
129
|
+
box-shadow: 0 0 0 1px rgba(67,41,163,.1), 0 1px 8px 0 rgba(67,41,163,.1);
|
130
|
+
}
|
131
|
+
|
132
|
+
.form {
|
133
|
+
margin: 0 auto;
|
134
|
+
width: 470px;
|
135
|
+
background-color: white;
|
136
|
+
padding-left: 0px;
|
137
|
+
}
|
138
|
+
|
139
|
+
|
140
|
+
.form input{
|
141
|
+
margin-right: 180px;
|
142
|
+
}
|
143
|
+
|
144
|
+
.err {
|
145
|
+
color: red;
|
146
|
+
font-size: 14px;
|
147
|
+
}
|
148
|
+
|
149
|
+
.error {
|
150
|
+
color: red;
|
151
|
+
font-size: 14px;
|
152
|
+
}
|
153
|
+
|
154
|
+
|
155
|
+
#flash_alert{
|
156
|
+
color: red;
|
157
|
+
font-size: 14px;
|
158
|
+
}
|
@@ -6,14 +6,12 @@
|
|
6
6
|
<%= csp_meta_tag %>
|
7
7
|
<%= stylesheet_link_tag "nyros_form2/application", media: "all" %>
|
8
8
|
<%= javascript_include_tag "nyros_form2/application" %>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
13
|
-
<script src="https://cdn.jsdelivr.net/jquery.validation/1.15.1/jquery.validate.min.js"></script>
|
14
|
-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
|
15
|
-
|
9
|
+
|
10
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.0/jquery.validate.min.js">
|
11
|
+
</script>
|
16
12
|
|
13
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
14
|
+
<script src="https://cdn.jsdelivr.net/jquery.validation/1.15.1/jquery.validate.min.js"></script>
|
17
15
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
|
18
16
|
|
19
17
|
|
@@ -1,258 +1,40 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
</div>
|
42
|
-
</body>
|
43
|
-
|
44
|
-
<script type="text/javascript">
|
45
|
-
$(function() {
|
46
|
-
$("form[name='myForm']").validate({
|
47
|
-
rules: {
|
48
|
-
name: "required",
|
49
|
-
email: {
|
50
|
-
required: true,
|
51
|
-
email: true
|
52
|
-
},
|
53
|
-
mobile: {
|
54
|
-
required: true,
|
55
|
-
digits: true,
|
56
|
-
minlength: 10,
|
57
|
-
maxlength: 10,
|
58
|
-
}
|
59
|
-
},
|
60
|
-
// Specify validation error messages
|
61
|
-
messages: {
|
62
|
-
name: "Please enter your firstname",
|
63
|
-
mobile: {
|
64
|
-
required: "Please Enter mobile number",
|
65
|
-
minlength: "Your Mobile must be at least 10 numbers long"
|
66
|
-
},
|
67
|
-
email: "Please enter a valid email address"
|
68
|
-
},
|
69
|
-
// in the "action" attribute of the form when valid
|
70
|
-
submitHandler: function(form) {
|
71
|
-
form.submit();
|
72
|
-
}
|
73
|
-
});
|
74
|
-
});
|
75
|
-
</script>
|
76
|
-
|
77
|
-
<style type="text/css">
|
78
|
-
.form-group{
|
79
|
-
width:356px;
|
80
|
-
margin-bottom: 30px;
|
81
|
-
}
|
82
|
-
|
83
|
-
.form{
|
84
|
-
padding-top: 30px;
|
85
|
-
padding-bottom: 50px;
|
86
|
-
}
|
87
|
-
.col-sm-12{
|
88
|
-
padding-left: 0px;
|
89
|
-
padding-right: 0px;
|
90
|
-
}
|
91
|
-
|
92
|
-
#user_remember_me{
|
93
|
-
margin-right:0px;
|
94
|
-
}
|
95
|
-
.forgot_pwd{
|
96
|
-
padding-left: 90px;
|
97
|
-
}
|
98
|
-
|
99
|
-
a:hover{
|
100
|
-
text-decoration-line: none;
|
101
|
-
}
|
102
|
-
|
103
|
-
#flash_alert{
|
104
|
-
color: red;
|
105
|
-
}
|
106
|
-
|
107
|
-
#form_email{
|
108
|
-
margin-left: 23px;
|
109
|
-
}
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
#sign_in_from{
|
114
|
-
margin-left: 400px;
|
115
|
-
}
|
116
|
-
|
117
|
-
/*.new_user{
|
118
|
-
margin-top: 100px;
|
119
|
-
}*/
|
120
|
-
|
121
|
-
.form1 {
|
122
|
-
margin: 0 auto;
|
123
|
-
width: 470px;
|
124
|
-
background-color: white;
|
125
|
-
padding-left: 0px;
|
126
|
-
}
|
127
|
-
|
128
|
-
.form label {
|
129
|
-
display: inline-block;
|
130
|
-
text-align: right;
|
131
|
-
float: left;
|
132
|
-
|
133
|
-
}
|
134
|
-
|
135
|
-
.modal_form{
|
136
|
-
margin-top: 0px;
|
137
|
-
}
|
138
|
-
|
139
|
-
.homepage_dish{
|
140
|
-
height: 100%;
|
141
|
-
width: 50%;
|
142
|
-
position:fixed;
|
143
|
-
}
|
144
|
-
|
145
|
-
.login{
|
146
|
-
padding-right: 20px;
|
147
|
-
color:#0066ff;
|
148
|
-
font-size: 20.3px;
|
149
|
-
line-height: 1.44359;
|
150
|
-
border: 0px;
|
151
|
-
font-weight:700;
|
152
|
-
|
153
|
-
|
154
|
-
}
|
155
|
-
|
156
|
-
.login a:hover{
|
157
|
-
|
158
|
-
}
|
159
|
-
|
160
|
-
.signup{
|
161
|
-
padding-right: 100px;
|
162
|
-
color:#0066ff;
|
163
|
-
|
164
|
-
font-size: 20.3px;
|
165
|
-
line-height: 1.44359;
|
166
|
-
border: 0px;
|
167
|
-
font-weight:700;
|
168
|
-
|
169
|
-
|
170
|
-
}
|
171
|
-
|
172
|
-
.top-left {
|
173
|
-
position: absolute;
|
174
|
-
top:450px;
|
175
|
-
left:10px;
|
176
|
-
color: #f79b9b;
|
177
|
-
font-size: 50px;
|
178
|
-
font-weight: 900;
|
179
|
-
|
180
|
-
}
|
181
|
-
|
182
|
-
.top-left:hover{
|
183
|
-
color: #f79b9b;
|
184
|
-
}
|
185
|
-
|
186
|
-
.bottom-right {
|
187
|
-
|
188
|
-
}
|
189
|
-
.bottom_img{
|
190
|
-
width: 300px;
|
191
|
-
height: 300px;
|
192
|
-
}
|
193
|
-
.main_header{
|
194
|
-
font-weight: 800;
|
195
|
-
font-size:40px;
|
196
|
-
color: black;
|
197
|
-
}
|
198
|
-
|
199
|
-
a:hover{
|
200
|
-
text-decoration-line: none;
|
201
|
-
|
202
|
-
}
|
203
|
-
|
204
|
-
.u-dimension-2 {
|
205
|
-
box-shadow: 0 0 0 1px rgba(67,41,163,.1), 0 1px 8px 0 rgba(67,41,163,.1);
|
206
|
-
}
|
207
|
-
|
208
|
-
.form {
|
209
|
-
margin: 0 auto;
|
210
|
-
width: 470px;
|
211
|
-
background-color: white;
|
212
|
-
padding-left: 0px;
|
213
|
-
}
|
214
|
-
|
215
|
-
|
216
|
-
.form input{
|
217
|
-
margin-right: 180px;
|
218
|
-
}
|
219
|
-
|
220
|
-
.err {
|
221
|
-
color: red;
|
222
|
-
font-size: 14px;
|
223
|
-
}
|
224
|
-
|
225
|
-
.error {
|
226
|
-
color: red;
|
227
|
-
font-size: 13px;
|
228
|
-
}
|
229
|
-
|
230
|
-
|
231
|
-
#flash_alert{
|
232
|
-
color: red;
|
233
|
-
font-size: 14px;
|
234
|
-
}
|
235
|
-
|
236
|
-
/*label{
|
237
|
-
margin-bottom: 5px;
|
238
|
-
}*/
|
239
|
-
|
240
|
-
|
241
|
-
</style>
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
1
|
+
<div class="container" >
|
2
|
+
<div class="form-horizontal no-border form u-dimension-2"
|
3
|
+
style ="margin-top: 100px; width: 450px;"align="center" >
|
4
|
+
|
5
|
+
<%= form_for @user, :user => {}, :html => { :name =>"myForm"} do |f| %>
|
6
|
+
<h2 align="center">Update User</h2>
|
7
|
+
<div class="form-group" style="margin-bottom: 2rem;">
|
8
|
+
<div class="col-sm-12">
|
9
|
+
<%= f.label :name %>
|
10
|
+
<%= f.text_field :name, autocomplete: "current-name",name: "name", class: 'form-control'%>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="form-group" style="margin-bottom: 2rem;">
|
15
|
+
<div class="col-sm-12">
|
16
|
+
<%= f.label :email %>
|
17
|
+
<span class="err"><%= @user.errors[:email].join('. ') %></span><br/>
|
18
|
+
<%= f.email_field :email, name: "email", autocomplete: "email",class: 'form-control'%>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="form-group" style="margin-bottom: 2rem;">
|
23
|
+
<div class="col-sm-12">
|
24
|
+
<%= f.label :mobile %>
|
25
|
+
<%= f.text_field :mobile,name: "mobile", autocomplete: "current-name",class: 'form-control'%>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="form-group" style="margin-bottom: 2rem;">
|
30
|
+
<div class="col-sm-12">
|
31
|
+
<%= f.submit "Submit", class: 'submitBtn btn btn-block btn-success btn modal_btn', id: 'modal-submit' %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
<div>
|
37
|
+
<%= link_to "Back", users_path %>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
</div>
|
@@ -1,29 +1,31 @@
|
|
1
|
-
<br><br>
|
1
|
+
<br><br><br>
|
2
2
|
<div class="container">
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
<div>
|
4
|
+
<h2 style="float: left">Users</h2>
|
5
|
+
<%= link_to "Create New User", new_user_path, :class => 'btn btn-sm btn-success', :style => 'float:right'%>
|
6
|
+
</div><br><br><br>
|
7
|
+
|
8
|
+
<table class="table table-bordered">
|
9
|
+
<thead>
|
10
|
+
<tr>
|
11
|
+
<th>Id</th>
|
12
|
+
<th>Name</th>
|
13
|
+
<th>Email</th>
|
14
|
+
<th>Mobile</th>
|
15
|
+
<th>Actions</th>
|
16
|
+
</tr>
|
17
|
+
</thead>
|
6
18
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<tbody>
|
18
|
-
<% @users.each do |u| %>
|
19
|
-
<tr>
|
20
|
-
<td><%= u.id %> </td>
|
21
|
-
<td><%= u.name %></td>
|
22
|
-
<td><%= u.email %></td>
|
23
|
-
<td><%= u.mobile %></td>
|
24
|
-
<td>
|
25
|
-
<%= link_to "Edit", edit_user_path(u.id), class: 'btn btn-sm btn-info' %>
|
26
|
-
<%= link_to 'Delete', '#',{:class=>"btn btn-danger btn-sm", "data-toggle"=>"modal", "data-target" => "#delete-#{u.id}"} %>
|
19
|
+
<tbody>
|
20
|
+
<% @users.each do |u| %>
|
21
|
+
<tr>
|
22
|
+
<td><%= u.id %> </td>
|
23
|
+
<td><%= u.name %></td>
|
24
|
+
<td><%= u.email %></td>
|
25
|
+
<td><%= u.mobile %></td>
|
26
|
+
<td>
|
27
|
+
<%= link_to "Edit", edit_user_path(u.id), class: 'btn btn-sm btn-info' %>
|
28
|
+
<%= link_to 'Delete', '#',{:class=>"btn btn-danger btn-sm", "data-toggle"=>"modal", "data-target" => "#delete-#{u.id}"} %>
|
27
29
|
<div class="modal fade " id="delete-<%= u.id %>">
|
28
30
|
<div class="modal-dialog ">
|
29
31
|
<div class="modal-content">
|
@@ -39,16 +41,17 @@
|
|
39
41
|
</div>
|
40
42
|
</div>
|
41
43
|
</div>
|
42
|
-
</div>
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
</div>
|
45
|
+
</td>
|
46
|
+
</tr>
|
47
|
+
<% end %>
|
48
|
+
</tbody>
|
47
49
|
</table>
|
50
|
+
<div style="float:right">
|
51
|
+
<%= will_paginate @users %>
|
52
|
+
</div>
|
48
53
|
</div>
|
49
54
|
|
50
|
-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
51
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
|
52
55
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
|
53
56
|
|
54
57
|
|
@@ -1,250 +1,44 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
</body>
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<script type="text/javascript">
|
48
|
-
$(function() {
|
49
|
-
$("form[name='myForm']").validate({
|
50
|
-
rules: {
|
51
|
-
name: "required",
|
52
|
-
email: {
|
53
|
-
required: true,
|
54
|
-
email: true
|
55
|
-
},
|
56
|
-
mobile: {
|
57
|
-
required: true,
|
58
|
-
digits: true,
|
59
|
-
minlength: 10,
|
60
|
-
maxlength: 10,
|
61
|
-
}
|
62
|
-
},
|
63
|
-
// Specify validation error messages
|
64
|
-
messages: {
|
65
|
-
name: "Please enter your firstname",
|
66
|
-
mobile: {
|
67
|
-
required: "Please Enter mobile number",
|
68
|
-
minlength: "Your Mobile must be at least 10 numbers long"
|
69
|
-
},
|
70
|
-
email: "Please enter a valid email address"
|
71
|
-
},
|
72
|
-
// in the "action" attribute of the form when valid
|
73
|
-
submitHandler: function(form) {
|
74
|
-
form.submit();
|
75
|
-
}
|
76
|
-
});
|
77
|
-
});
|
78
|
-
|
79
|
-
|
80
|
-
</script>
|
81
|
-
|
82
|
-
|
83
|
-
<style type="text/css">
|
84
|
-
.form-group{
|
85
|
-
width:356px;
|
86
|
-
margin-bottom: 30px;
|
87
|
-
}
|
88
|
-
|
89
|
-
.form{
|
90
|
-
padding-top: 30px;
|
91
|
-
padding-bottom: 50px;
|
92
|
-
}
|
93
|
-
.col-sm-12{
|
94
|
-
padding-left: 0px;
|
95
|
-
padding-right: 0px;
|
96
|
-
}
|
97
|
-
|
98
|
-
#user_remember_me{
|
99
|
-
margin-right:0px;
|
100
|
-
}
|
101
|
-
.forgot_pwd{
|
102
|
-
padding-left: 90px;
|
103
|
-
}
|
104
|
-
|
105
|
-
a:hover{
|
106
|
-
text-decoration-line: none;
|
107
|
-
}
|
108
|
-
|
109
|
-
#flash_alert{
|
110
|
-
color: red;
|
111
|
-
}
|
112
|
-
|
113
|
-
#form_email{
|
114
|
-
margin-left: 23px;
|
115
|
-
}
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
#sign_in_from{
|
120
|
-
margin-left: 400px;
|
121
|
-
}
|
122
|
-
|
123
|
-
/*.new_user{
|
124
|
-
margin-top: 100px;
|
125
|
-
}*/
|
126
|
-
|
127
|
-
.form1 {
|
128
|
-
margin: 0 auto;
|
129
|
-
width: 470px;
|
130
|
-
background-color: white;
|
131
|
-
padding-left: 0px;
|
132
|
-
}
|
133
|
-
|
134
|
-
.form label {
|
135
|
-
display: inline-block;
|
136
|
-
text-align: right;
|
137
|
-
float: left;
|
138
|
-
|
139
|
-
}
|
140
|
-
|
141
|
-
.modal_form{
|
142
|
-
margin-top: 0px;
|
143
|
-
}
|
144
|
-
|
145
|
-
.homepage_dish{
|
146
|
-
height: 100%;
|
147
|
-
width: 50%;
|
148
|
-
position:fixed;
|
149
|
-
}
|
150
|
-
|
151
|
-
.login{
|
152
|
-
padding-right: 20px;
|
153
|
-
color:#0066ff;
|
154
|
-
font-size: 20.3px;
|
155
|
-
line-height: 1.44359;
|
156
|
-
border: 0px;
|
157
|
-
font-weight:700;
|
158
|
-
|
159
|
-
|
160
|
-
}
|
161
|
-
|
162
|
-
.login a:hover{
|
163
|
-
|
164
|
-
}
|
165
|
-
|
166
|
-
.signup{
|
167
|
-
padding-right: 100px;
|
168
|
-
color:#0066ff;
|
169
|
-
|
170
|
-
font-size: 20.3px;
|
171
|
-
line-height: 1.44359;
|
172
|
-
border: 0px;
|
173
|
-
font-weight:700;
|
174
|
-
|
175
|
-
|
176
|
-
}
|
177
|
-
|
178
|
-
.top-left {
|
179
|
-
position: absolute;
|
180
|
-
top:450px;
|
181
|
-
left:10px;
|
182
|
-
color: #f79b9b;
|
183
|
-
font-size: 50px;
|
184
|
-
font-weight: 900;
|
185
|
-
|
186
|
-
}
|
187
|
-
|
188
|
-
.top-left:hover{
|
189
|
-
color: #f79b9b;
|
190
|
-
}
|
191
|
-
|
192
|
-
.bottom-right {
|
193
|
-
|
194
|
-
}
|
195
|
-
.bottom_img{
|
196
|
-
width: 300px;
|
197
|
-
height: 300px;
|
198
|
-
}
|
199
|
-
.main_header{
|
200
|
-
font-weight: 800;
|
201
|
-
font-size:40px;
|
202
|
-
color: black;
|
203
|
-
}
|
204
|
-
|
205
|
-
a:hover{
|
206
|
-
text-decoration-line: none;
|
207
|
-
|
208
|
-
}
|
209
|
-
|
210
|
-
.u-dimension-2 {
|
211
|
-
box-shadow: 0 0 0 1px rgba(67,41,163,.1), 0 1px 8px 0 rgba(67,41,163,.1);
|
212
|
-
}
|
213
|
-
|
214
|
-
.form {
|
215
|
-
margin: 0 auto;
|
216
|
-
width: 470px;
|
217
|
-
background-color: white;
|
218
|
-
padding-left: 0px;
|
219
|
-
}
|
220
|
-
|
221
|
-
|
222
|
-
.form input{
|
223
|
-
margin-right: 180px;
|
224
|
-
}
|
225
|
-
|
226
|
-
.err {
|
227
|
-
color: red;
|
228
|
-
font-size: 14px;
|
229
|
-
}
|
230
|
-
|
231
|
-
.error {
|
232
|
-
color: red;
|
233
|
-
font-size: 13px;
|
234
|
-
}
|
235
|
-
|
236
|
-
|
237
|
-
#flash_alert{
|
238
|
-
color: red;
|
239
|
-
font-size: 14px;
|
240
|
-
}
|
241
|
-
|
242
|
-
/*label{
|
243
|
-
margin-bottom: 5px;
|
244
|
-
}*/
|
245
|
-
|
246
|
-
|
247
|
-
</style>
|
1
|
+
<div class="container" >
|
2
|
+
<div class="form-horizontal no-border form u-dimension-2"
|
3
|
+
style ="margin-top: 100px; width: 450px;"align="center" >
|
4
|
+
|
5
|
+
<%= form_for @user, :user => {}, :html => { :name =>"myForm"} do |f| %>
|
6
|
+
<h2 align="center">User Form </h2>
|
7
|
+
<div class="form-group" style="margin-bottom: 2rem;">
|
8
|
+
<div class="col-sm-12">
|
9
|
+
<%= f.label :name %>
|
10
|
+
<%= f.text_field :name, autocomplete: "current-name",name: "name", class: 'form-control'%>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="form-group" style="margin-bottom: 2rem;">
|
15
|
+
<div class="col-sm-12">
|
16
|
+
<%= f.label :email %>
|
17
|
+
<span class="err"><%= @user.errors[:email].join('. ') %></span><br/>
|
18
|
+
<%= f.email_field :email, name: "email", autocomplete: "email",class: 'form-control'%>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="form-group" style="margin-bottom: 2rem;">
|
23
|
+
<div class="col-sm-12">
|
24
|
+
<%= f.label :mobile %>
|
25
|
+
<%= f.text_field :mobile,name: "mobile", autocomplete: "current-name",class: 'form-control'%>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="form-group" style="margin-bottom: 2rem;">
|
30
|
+
<div class="col-sm-12">
|
31
|
+
<%= f.submit "Submit", class: 'submitBtn btn btn-block btn-success btn modal_btn', id: 'modal-submit' %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
<div>
|
37
|
+
<%= link_to "Back", users_path%>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
</div>
|
41
|
+
</div>
|
248
42
|
|
249
43
|
|
250
44
|
|
data/lib/nyros_form2/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nyros_form2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- raju rekadi
|
@@ -50,9 +50,8 @@ files:
|
|
50
50
|
- Rakefile
|
51
51
|
- app/assets/config/nyros_form2_manifest.js
|
52
52
|
- app/assets/javascripts/nyros_form2/application.js
|
53
|
-
- app/assets/javascripts/nyros_form2/failures.js
|
54
53
|
- app/assets/javascripts/nyros_form2/users.js
|
55
|
-
- app/assets/stylesheets/nyros_form2/application.
|
54
|
+
- app/assets/stylesheets/nyros_form2/application.scss
|
56
55
|
- app/assets/stylesheets/nyros_form2/users.css
|
57
56
|
- app/controllers/nyros_form2/application_controller.rb
|
58
57
|
- app/controllers/nyros_form2/users_controller.rb
|