BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
338a73ec
Commit
338a73ec
authored
May 25, 2017
by
kushalpandya
Committed by
Jarka Kadlecova
Jun 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for required input validation
parent
33d82ccb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
_field.html.haml
app/views/shared/_field.html.haml
+3
-3
No files found.
app/views/shared/_field.html.haml
View file @
338a73ec
...
...
@@ -15,14 +15,14 @@
=
form
.
label
name
,
title
,
class:
"control-label"
.col-sm-10
-
if
type
==
'text'
=
form
.
text_field
name
,
class:
"form-control"
,
placeholder:
placeholder
=
form
.
text_field
name
,
class:
"form-control"
,
placeholder:
placeholder
,
required:
required
-
elsif
type
==
'textarea'
=
form
.
text_area
name
,
rows:
5
,
class:
"form-control"
,
placeholder:
placeholder
=
form
.
text_area
name
,
rows:
5
,
class:
"form-control"
,
placeholder:
placeholder
,
required:
required
-
elsif
type
==
'checkbox'
=
form
.
check_box
name
-
elsif
type
==
'select'
=
form
.
select
name
,
options_for_select
(
choices
,
value
?
value
:
default_choice
),
{},
{
class:
"form-control"
}
-
elsif
type
==
'password'
=
form
.
password_field
name
,
autocomplete:
"new-password"
,
class:
"form-control"
=
form
.
password_field
name
,
autocomplete:
"new-password"
,
class:
"form-control"
,
required:
value
.
present?
?
nil
:
:required
-
if
help
%span
.help-block
=
help
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment