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
e8085c93
Commit
e8085c93
authored
Dec 17, 2019
by
Alper Akgun
Committed by
Phil Hughes
Dec 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Invalid trial form does not remember the user and country fields
parent
e14a7597
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
ee/app/assets/javascripts/pages/trials/country_select.js
ee/app/assets/javascripts/pages/trials/country_select.js
+5
-1
ee/app/views/trials/new.html.haml
ee/app/views/trials/new.html.haml
+2
-2
ee/changelogs/unreleased/118457-invalid-trial-form-does-not-remember-the-user-and-country-field.yml
...ial-form-does-not-remember-the-user-and-country-field.yml
+5
-0
No files found.
ee/app/assets/javascripts/pages/trials/country_select.js
View file @
e8085c93
import
$
from
'
jquery
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
__
}
from
'
~/locale
'
;
import
Flash
from
'
~/flash
'
;
import
Flash
from
'
~/flash
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
const
selectElement
=
document
.
getElementById
(
'
country_select
'
);
const
selectElement
=
document
.
getElementById
(
'
country_select
'
);
const
{
countriesEndPoint
}
=
selectElement
.
dataset
;
const
{
countriesEndPoint
,
selectedOption
}
=
selectElement
.
dataset
;
axios
axios
.
get
(
countriesEndPoint
)
.
get
(
countriesEndPoint
)
...
@@ -17,6 +18,9 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -17,6 +18,9 @@ document.addEventListener('DOMContentLoaded', () => {
selectElement
.
appendChild
(
option
);
selectElement
.
appendChild
(
option
);
});
});
$
(
selectElement
)
.
val
(
selectedOption
)
.
trigger
(
'
change.select2
'
);
})
})
.
catch
(()
=>
new
Flash
(
__
(
'
Error loading countries data.
'
)));
.
catch
(()
=>
new
Flash
(
__
(
'
Error loading countries data.
'
)));
});
});
ee/app/views/trials/new.html.haml
View file @
e8085c93
...
@@ -20,10 +20,10 @@
...
@@ -20,10 +20,10 @@
=
text_field_tag
:phone_number
,
params
[
:phone_number
],
class:
'form-control'
,
required:
true
=
text_field_tag
:phone_number
,
params
[
:phone_number
],
class:
'form-control'
,
required:
true
.form-group
.form-group
=
label_tag
:number_of_users
,
_
(
'How many users will be evaluating the trial?'
),
for: :number_of_users
,
class:
'col-form-label'
=
label_tag
:number_of_users
,
_
(
'How many users will be evaluating the trial?'
),
for: :number_of_users
,
class:
'col-form-label'
=
number_field_tag
:number_of_users
,
nil
,
class:
'form-control'
,
required:
true
,
min:
1
=
number_field_tag
:number_of_users
,
params
[
:number_of_users
]
,
class:
'form-control'
,
required:
true
,
min:
1
.form-group
.form-group
=
label_tag
:country
,
_
(
'Country'
),
class:
'col-form-label'
=
label_tag
:country
,
_
(
'Country'
),
class:
'col-form-label'
=
select_tag
:country
,
options_for_select
([[
_
(
'Please select a country'
),
''
]]),
class:
'select2'
,
required:
true
,
id:
'country_select'
,
data:
{
countries_end_point:
countries_path
}
=
select_tag
:country
,
options_for_select
([[
_
(
'Please select a country'
),
''
]]),
class:
'select2'
,
required:
true
,
id:
'country_select'
,
data:
{
countries_end_point:
countries_path
,
selected_option:
params
[
:country
]
}
=
submit_tag
_
(
'Continue'
),
class:
'btn btn-success btn-block'
=
submit_tag
_
(
'Continue'
),
class:
'btn btn-success btn-block'
=
render
'skip_trial'
=
render
'skip_trial'
ee/changelogs/unreleased/118457-invalid-trial-form-does-not-remember-the-user-and-country-field.yml
0 → 100644
View file @
e8085c93
---
title
:
Invalid trial form to remember user & country
merge_request
:
21840
author
:
type
:
fixed
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