From 3ad6653b3e64ad81278cbbc24dacd15bd2d32e6f Mon Sep 17 00:00:00 2001 From: Ezekiel Kigbo Date: Tue, 7 May 2019 21:58:16 +0000 Subject: Added user time settings fields to profile Udpated user_edit_profile_spec with time preferences Minor update form fields --- app/assets/javascripts/profile/profile.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/assets/javascripts/profile/profile.js') 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() { -- cgit v1.2.3