summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-25 15:10:55 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-25 15:10:55 +0000
commitc59393a068f9d0113cc10ca8798d333d6a0e3d53 (patch)
tree57de87b7bb6206957fa0359551a50661d44bf594 /app/assets/javascripts/pages
parentf471d836199c3e35a80769a6daa5c4b6a52be8d7 (diff)
downloadgitlab-ce-c59393a068f9d0113cc10ca8798d333d6a0e3d53.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pages')
-rw-r--r--app/assets/javascripts/pages/profiles/init_timezone_dropdown.js4
-rw-r--r--app/assets/javascripts/pages/projects/pipeline_schedules/shared/init_form.js11
2 files changed, 5 insertions, 10 deletions
diff --git a/app/assets/javascripts/pages/profiles/init_timezone_dropdown.js b/app/assets/javascripts/pages/profiles/init_timezone_dropdown.js
index 80b911493a8..91d5013c67d 100644
--- a/app/assets/javascripts/pages/profiles/init_timezone_dropdown.js
+++ b/app/assets/javascripts/pages/profiles/init_timezone_dropdown.js
@@ -8,7 +8,7 @@ export const initTimezoneDropdown = () => {
return null;
}
- const { timezoneData, initialValue } = el.dataset;
+ const { timezoneData, initialValue, name } = el.dataset;
const timezones = JSON.parse(timezoneData);
const timezoneDropdown = new Vue({
@@ -23,7 +23,7 @@ export const initTimezoneDropdown = () => {
props: {
value: this.value,
timezoneData: timezones,
- name: 'user[timezone]',
+ name,
},
class: 'gl-md-form-input-lg',
});
diff --git a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/init_form.js b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/init_form.js
index eae721771de..abd17efc498 100644
--- a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/init_form.js
+++ b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/init_form.js
@@ -6,8 +6,8 @@ import { REF_TYPE_BRANCHES, REF_TYPE_TAGS } from '~/ref/constants';
import setupNativeFormVariableList from '~/ci_variable_list/native_form_variable_list';
import GlFieldErrors from '~/gl_field_errors';
import Translate from '~/vue_shared/translate';
+import { initTimezoneDropdown } from '../../../profiles/init_timezone_dropdown';
import IntervalPatternInput from './components/interval_pattern_input.vue';
-import TimezoneDropdown from './components/timezone_dropdown';
Vue.use(Translate);
@@ -81,13 +81,6 @@ export default () => {
const formElement = document.getElementById('new-pipeline-schedule-form');
- gl.timezoneDropdown = new TimezoneDropdown({
- $dropdownEl: $('.js-timezone-dropdown'),
- $inputEl: $('#schedule_cron_timezone'),
- onSelectTimezone: () => {
- gl.pipelineScheduleFieldErrors.updateFormValidityState();
- },
- });
gl.pipelineScheduleFieldErrors = new GlFieldErrors(formElement);
initTargetRefDropdown();
@@ -97,3 +90,5 @@ export default () => {
formField: 'schedule',
});
};
+
+initTimezoneDropdown();