diff options
author | Ezekiel Kigbo <ekigbo@gitlab.com> | 2019-05-07 21:58:16 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2019-05-07 21:58:16 +0000 |
commit | 3ad6653b3e64ad81278cbbc24dacd15bd2d32e6f (patch) | |
tree | d481264c2003dd5f26da4f61da413d19db96c057 /app/assets/javascripts/profile/profile.js | |
parent | 9d4450263fd7dc53dafd62389871d8b1fcea5e1a (diff) | |
download | gitlab-ce-3ad6653b3e64ad81278cbbc24dacd15bd2d32e6f.tar.gz |
Added user time settings fields to profile
Udpated user_edit_profile_spec with time preferences
Minor update form fields
Diffstat (limited to 'app/assets/javascripts/profile/profile.js')
-rw-r--r-- | app/assets/javascripts/profile/profile.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/assets/javascripts/profile/profile.js b/app/assets/javascripts/profile/profile.js index deacff5abe7..6e3800021b4 100644 --- a/app/assets/javascripts/profile/profile.js +++ b/app/assets/javascripts/profile/profile.js @@ -2,6 +2,9 @@ import $ from 'jquery'; import axios from '~/lib/utils/axios_utils'; import flash from '../flash'; import { parseBoolean } from '~/lib/utils/common_utils'; +import TimezoneDropdown, { + formatTimezone, +} from '~/pages/projects/pipeline_schedules/shared/components/timezone_dropdown'; export default class Profile { constructor({ form } = {}) { @@ -10,6 +13,14 @@ export default class Profile { this.setRepoRadio(); this.bindEvents(); this.initAvatarGlCrop(); + + this.$inputEl = $('#user_timezone'); + + this.timezoneDropdown = new TimezoneDropdown({ + $inputEl: this.$inputEl, + $dropdownEl: $('.js-timezone-dropdown'), + displayFormat: selectedItem => formatTimezone(selectedItem), + }); } initAvatarGlCrop() { |