Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Basic form client side validation

  • Loading branch information...
commit b0eb4c1bbb16900cdf0dad5f6d29bc5abf432d83 1 parent 93da4d3
@brunocavalcante authored
View
6 app/views/admin/academic_periods/_form.html.haml
@@ -4,14 +4,14 @@
.clearfix
= f.label :name, nil, :class => 'required'
.input
- = f.text_field :name
+ = f.text_field :name, :required => 'required'
.clearfix
= f.label :start, nil, :class => 'required'
.input
- = f.date_select :start, {}, {:class => 'span2'}
+ = f.date_select :start, {}, {:class => 'span2', :required => 'required'}
= t 'until'
- = f.date_select :end, {}, {:class => 'span2'}
+ = f.date_select :end, {}, {:class => 'span2', :required => 'required'}
.clearfix
= f.label :registration_start
View
4 app/views/admin/administrators/_form.html.haml
@@ -4,12 +4,12 @@
.clearfix
= f.label :name, nil, :class => :required
.input
- = f.text_field :name, :class => :input_xlarge
+ = f.text_field :name, :class => :input_xlarge, :required => 'required'
.clearfix
= f.label :email, nil, :class => :required
.input
- = f.text_field :email, :class => :input_xlarge
+ = f.text_field :email, :class => :input_xlarge, :required => 'required'
.actions
= submit_tag nil, :class => 'btn primary'
View
2  app/views/admin/course_categories/_form.html.haml
@@ -4,7 +4,7 @@
.clearfix
= f.label :name, nil, :class => 'required'
.input
- = f.text_field :name
+ = f.text_field :name, :required => 'required'
.actions
= f.submit nil, :class => 'btn primary'
View
4 app/views/admin/courses/_form.html.haml
@@ -4,12 +4,12 @@
.clearfix
= f.label :code, nil, :class => 'required'
.input
- = f.text_field :code, :class => 'input_small'
+ = f.text_field :code, :class => 'input_small', :required => 'required'
.clearfix
= f.label :name, nil, :class => 'required'
.input
- = f.text_field :name, :class => 'input_xlarge'
+ = f.text_field :name, :class => 'input_xlarge', :required => 'required'
.clearfix
= f.label :course_category_id
View
2  app/views/admin/curriculum_modules/_form.html.haml
@@ -4,7 +4,7 @@
.clearfix
= f.label :name, nil, :class => :required
.input
- = f.text_field :name
+ = f.text_field :name, :required => 'required'
.clearfix
= f.label :order
View
2  app/views/admin/curriculum_students/_form.html.haml
@@ -15,7 +15,7 @@
.clearfix
= f.label :created_at, nil, :class => :required
.input
- = f.date_select :created_at
+ = f.date_select :created_at, :required => 'required'
.clearfix
= f.label :active
View
4 app/views/admin/curriculums/_form.html.haml
@@ -4,12 +4,12 @@
.clearfix
= f.label :code, nil, :class => :required
.input
- = f.text_field :code, :class => :input_medium
+ = f.text_field :code, :class => :input_medium, :required => 'required'
.clearfix
= f.label :name, nil, :class => :required
.input
- = f.text_field :name
+ = f.text_field :name, :required => 'required'
- if @curriculum.id
.clearfix
View
4 app/views/admin/disciplines/_form.html.haml
@@ -4,12 +4,12 @@
.clearfix
= f.label :code, nil, :class => :required
.input
- = f.text_field :code, :disabled => (@discipline.id), :class => :span3
+ = f.text_field :code, :disabled => (@discipline.id), :class => :span3, :required => 'required'
.clearfix
= f.label :name, nil, :class => :required
.input
- = f.text_field :name, :class => :span6
+ = f.text_field :name, :class => :span6, :required => 'required'
.clearfix
= f.label :credits
View
2  app/views/admin/lectures/_form.html.haml
@@ -4,7 +4,7 @@
.clearfix
= f.label :code, nil, :class => :required
.input
- = f.text_field :code, :disabled => (@lecture.id), :class => :input_medium
+ = f.text_field :code, :disabled => (@lecture.id), :class => :input_medium, :required => 'required'
.clearfix
= f.label :discipline_id, nil, :class => :required
View
4 app/views/admin/people/_form.html.haml
@@ -1,10 +1,10 @@
.clearfix
= p.label :name, nil, :class => :required
.input
- = p.text_field :name, :class => 'span6'
+ = p.text_field :name, :class => 'span6', :required => 'required'
.clearfix
- = p.label :email, nil, :class => :required
+ = p.label :email, nil
.input
= p.text_field :email, :class => 'span6'
View
2  app/views/admin/scholarities/_form.html.haml
@@ -4,7 +4,7 @@
.clearfix
= f.label :name, nil, :class => :required
.input
- = f.text_field :name
+ = f.text_field :name, :required => 'required'
.actions
= f.submit nil, :class => 'btn primary'
View
4 app/views/admin/students/_form.html.haml
@@ -2,9 +2,9 @@
= f.error_messages
.clearfix
- = f.label :code, nil, :class => :required
+ = f.label :code, nil, :class => :required
.input
- = f.text_field :code, :class => :input_medium
+ = f.text_field :code, :class => :input_medium, :required => 'required'
= f.fields_for :person do |p|
= render :partial => 'admin/people/form', :locals => {:p => p}
View
4 app/views/admin/transferred_disciplines/_form.html.haml
@@ -12,12 +12,12 @@
.clearfix
= f.label :grade
.input
- = f.text_field :grade
+ = f.text_field :grade, :required => 'required'
.clearfix
= f.label :attendance
.input
- = f.text_field :attendance
+ = f.text_field :attendance, :required => 'required'
.actions
= f.submit nil, :class => 'btn primary'
View
4 app/views/auth/login.html.haml
@@ -11,10 +11,10 @@
%legend= t 'Welcome'
.clearfix
= label_tag :username, (t 'EmailOrStudentId')
- = text_field_tag :username, nil, :autocomplete => :off
+ = text_field_tag :username, nil, :autocomplete => :off, :required => 'required'
.clearfix
= label_tag :password, (t 'Password')
- = password_field_tag :password
+ = password_field_tag :password, nil, :required => 'required'
.actions
%p= submit_tag (t 'LogIn'), :class => 'btn primary'
%p= link_to (t 'ForgotYourPassword'), password_recovery_index_url
View
2  app/views/password_recovery/index.html.haml
@@ -5,6 +5,6 @@
.clearfix
= label_tag 'usuario', (t 'EmailOrStudentId')
.input
- = text_field_tag 'username', nil, :autocomplete => 'off'
+ = text_field_tag 'username', nil, :autocomplete => 'off', :required => 'required'
.actions
= submit_tag (t 'SendMeMyPassword'), :class => 'btn primary'
View
2  app/views/user/edit.html.haml
@@ -12,7 +12,7 @@
.clearfix
= label_tag (t 'activerecord.attributes.person.name')
.input
- = text_field(:user, :name)
+ = text_field(:user, :name, :required => 'required')
.clearfix
= label_tag (t 'activerecord.attributes.person.email')
View
4 app/views/wall/_form.html.haml
@@ -5,12 +5,12 @@
.clearfix
= m.label :subject
.input
- = m.text_field :subject
+ = m.text_field :subject, :class => 'span6'
.clearfix
= m.label :content
.input
- = m.text_area :content, :rows => 5
+ = m.text_area :content, :rows => 5, :class => 'span6', :required => 'required'
.actions
= f.submit nil, :class => 'btn primary'
Please sign in to comment.
Something went wrong with that request. Please try again.