Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
app/views/shared/_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