More template cleanup for HTML validation
This commit is contained in:
parent
079910ad68
commit
dcbec40d0c
|
@ -4,11 +4,11 @@
|
|||
<form method="post">
|
||||
<div class="email field">
|
||||
<%= label_for email => 'Email' %>
|
||||
<%= email_field 'email' %>
|
||||
<%= email_field email => (id => 'email') %>
|
||||
</div>
|
||||
<div class="password field">
|
||||
<%= label_for password => 'Password' %>
|
||||
<%= password_field 'password' %>
|
||||
<%= password_field password => (id => 'password') %>
|
||||
</div>
|
||||
<%= submit_button 'Reset' %>
|
||||
</form>
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
<form method="post">
|
||||
<div class="name field">
|
||||
<%= label_for name => 'Name' %>
|
||||
<%= text_field 'name' %>
|
||||
<%= text_field name => (id => 'name') %>
|
||||
</div>
|
||||
<div class="email field">
|
||||
<%= label_for email => 'Email' %>
|
||||
<%= email_field 'email' %>
|
||||
<%= email_field email => (id => 'email') %>
|
||||
</div>
|
||||
<div class="password field">
|
||||
<%= label_for password => 'Password' %>
|
||||
<%= password_field 'password' %>
|
||||
<%= password_field password => (id => 'password') %>
|
||||
</div>
|
||||
<%= submit_button 'Create' %>
|
||||
</form>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<form method="post">
|
||||
<div class="email field">
|
||||
<%= label_for email => 'Email' %>
|
||||
<%= email_field 'email' %>
|
||||
<%= email_field email => (id => 'email') %>
|
||||
</div>
|
||||
<%= submit_button 'Demote' %>
|
||||
</form>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<form method="post">
|
||||
<div class="email field">
|
||||
<%= label_for email => 'Email' %>
|
||||
<%= email_field 'email' %>
|
||||
<%= email_field email => (id => 'email') %>
|
||||
</div>
|
||||
<%= submit_button 'Lock' %>
|
||||
</form>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
<form method="post">
|
||||
<div class="email field">
|
||||
<%= label_for email => 'Email' %>
|
||||
<%= email_field 'email' %>
|
||||
<%= email_field email => (id => 'email') %>
|
||||
</div>
|
||||
<div class="password field">
|
||||
<%= label_for password => 'Password' %>
|
||||
<%= password_field 'password' %>
|
||||
<%= password_field password => (id => 'password') %>
|
||||
</div>
|
||||
<%= submit_button 'Login' %>
|
||||
</form>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<form method="post">
|
||||
<div class="password field">
|
||||
<%= label_for password => 'Password' %>
|
||||
<%= password_field 'password' %>
|
||||
<%= password_field password => (id => 'password') %>
|
||||
</div>
|
||||
<%= submit_button 'Reset' %>
|
||||
</form>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<form method="post">
|
||||
<div class="email field">
|
||||
<%= label_for email => 'Email' %>
|
||||
<%= email_field 'email' %>
|
||||
<%= email_field email => (id => 'email') %>
|
||||
</div>
|
||||
<%= submit_button 'Promote' %>
|
||||
</form>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<form method="post">
|
||||
<div class="email field">
|
||||
<%= label_for email => 'Email' %>
|
||||
<%= email_field 'email' %>
|
||||
<%= email_field email => (id => 'email') %>
|
||||
</div>
|
||||
<%= submit_button 'Unlock' %>
|
||||
</form>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<div class="author field">
|
||||
<%= label_for author => 'Author' %>
|
||||
<%= text_field author => session->{'author'}, (
|
||||
id => 'author',
|
||||
maxlength => 63,
|
||||
minlength => 1
|
||||
) %>
|
||||
|
@ -15,11 +16,12 @@
|
|||
<div class="text field">
|
||||
<%= label_for body => 'Text' %>
|
||||
<%= text_area body => (
|
||||
id => 'body',
|
||||
maxlength => 4000,
|
||||
minlength => 2,
|
||||
required => 'true',
|
||||
required => undef,
|
||||
rows => 6,
|
||||
autofocus => 'autofocus'
|
||||
autofocus => undef
|
||||
) %>
|
||||
<% if (my $error = validation->error('body')) { =%>
|
||||
<p class="field-with-error">Invalid text: Up to 4,000 characters only.</p>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<div class="author field">
|
||||
<%= label_for author => 'Author' %>
|
||||
<%= text_field author => session->{'author'}, (
|
||||
id => 'author',
|
||||
maxlength => 63,
|
||||
minlength => 1
|
||||
) %>
|
||||
|
@ -15,9 +16,10 @@
|
|||
<div class="title field">
|
||||
<%= label_for title => 'Title' %>
|
||||
<%= text_field title => (
|
||||
id => 'title',
|
||||
maxlength => 127,
|
||||
minlength => 1,
|
||||
autofocus => 'autofocus'
|
||||
autofocus => undef
|
||||
) %>
|
||||
<% if (my $error = validation->error('title')) { =%>
|
||||
<p class="field-with-error">Invalid title: 1 to 127 characters please.</p>
|
||||
|
@ -26,6 +28,7 @@
|
|||
<div class="text field">
|
||||
<%= label_for body => 'Text' %>
|
||||
<%= text_area body => (
|
||||
id => 'body',
|
||||
maxlength => 4000,
|
||||
minlength => 2,
|
||||
required => 'true',
|
||||
|
|
Loading…
Reference in New Issue
Block a user