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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
162a68a1
Commit
162a68a1
authored
Aug 06, 2021
by
Alper Akgun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Placeholder for "Number of employees" in trial
Changelog: changed EE: true
parent
8a6f6da1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
ee/app/helpers/ee/trial_helper.rb
ee/app/helpers/ee/trial_helper.rb
+2
-2
ee/app/views/shared/groups/_trial_form.html.haml
ee/app/views/shared/groups/_trial_form.html.haml
+1
-1
ee/app/views/trials/new.html.haml
ee/app/views/trials/new.html.haml
+1
-1
ee/spec/views/trials/new.html.haml_spec.rb
ee/spec/views/trials/new.html.haml_spec.rb
+3
-1
No files found.
ee/app/helpers/ee/trial_helper.rb
View file @
162a68a1
...
...
@@ -2,9 +2,9 @@
module
EE
module
TrialHelper
def
company_size_options_for_select
(
selected
=
0
)
def
company_size_options_for_select
(
selected
=
''
)
options_for_select
([
[
_
(
'Please select'
),
0
],
[
_
(
'Please select'
),
''
],
[
'1 - 99'
,
'1-99'
],
[
'100 - 499'
,
'100-499'
],
[
'500 - 1,999'
,
'500-1,999'
],
...
...
ee/app/views/shared/groups/_trial_form.html.haml
View file @
162a68a1
...
...
@@ -15,7 +15,7 @@
.row
.form-group.col-sm-12.gl-select2-html5-required-fix
=
label_tag
:company_size
,
s_
(
'Trial|Number of employees'
),
for: :company_size
,
class:
'col-form-label'
=
select_tag
:company_size
,
company_size_options_for_select
(
params
[
:company_size
]),
include_blank:
true
,
class:
'js-trial-field select2'
,
required:
true
=
select_tag
:company_size
,
company_size_options_for_select
(
params
[
:company_size
]),
class:
'js-trial-field select2'
,
required:
true
.row
.form-group.col-sm-12
=
label_tag
:number_of_users
,
s_
(
'Trial|How many employees will use Gitlab?'
),
for: :number_of_users
,
class:
'col-form-label'
...
...
ee/app/views/trials/new.html.haml
View file @
162a68a1
...
...
@@ -40,7 +40,7 @@
=
text_field_tag
:company_name
,
params
[
:company_name
]
||
current_user
.
organization
,
class:
'form-control gl-form-input'
,
required:
true
,
data:
{
qa_selector:
'company_name'
},
readonly:
readonly
.form-group.gl-select2-html5-required-fix
=
label_tag
:company_size
,
_
(
'Number of employees'
),
for: :company_size
,
class:
'col-form-label'
=
select_tag
:company_size
,
company_size_options_for_select
(
params
[
:company_size
]),
include_blank:
true
,
class:
'select2'
,
required:
true
,
data:
{
qa_selector:
'number_of_employees'
}
=
select_tag
:company_size
,
company_size_options_for_select
(
params
[
:company_size
]),
class:
'select2'
,
required:
true
,
data:
{
qa_selector:
'number_of_employees'
}
.form-group
=
label_tag
:phone_number
,
_
(
'Telephone number'
),
for: :phone_number
,
class:
'col-form-label'
=
telephone_field_tag
:phone_number
,
params
[
:phone_number
],
pattern:
'^(\+)*[0-9-\s]+$'
,
class:
'form-control gl-form-input'
,
required:
true
,
data:
{
qa_selector:
'telephone_number'
}
...
...
ee/spec/views/trials/new.html.haml_spec.rb
View file @
162a68a1
...
...
@@ -16,10 +16,12 @@ RSpec.describe 'trials/new.html.haml' do
subject
{
rendered
}
it
'has fields for first, last
and company names
'
,
:aggregate_failures
do
it
'has fields for first, last
company name and size
'
,
:aggregate_failures
do
is_expected
.
to
have_field
(
'first_name'
)
is_expected
.
to
have_field
(
'last_name'
)
is_expected
.
to
have_field
(
'company_name'
)
sizes
=
[
'Please select'
,
'1 - 99'
,
'100 - 499'
,
'500 - 1,999'
,
'2,000 - 9,999'
,
'10,000 +'
]
is_expected
.
to
have_select
(
'company_size'
,
options:
sizes
,
selected:
[])
end
context
'remove_known_trial_form_fields noneditable experiment is enabled'
do
...
...
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