diff options
Diffstat (limited to 'app/views/profiles/show.html.haml')
-rw-r--r-- | app/views/profiles/show.html.haml | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index 5ffffb80d97..930f4f5c397 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -1,8 +1,8 @@ - breadcrumb_title s_("Profiles|Edit Profile") - page_title s_("Profiles|Edit Profile") - add_page_specific_style 'page_bundles/profile' -- @content_class = "limit-container-width" unless fluid_layout - gravatar_link = link_to Gitlab.config.gravatar.host, 'https://' + Gitlab.config.gravatar.host +- @force_desktop_expanded_sidebar = true = gitlab_ui_form_for @user, url: profile_path, method: :put, html: { multipart: true, class: 'edit-user js-edit-user gl-mt-3 js-quick-submit gl-show-field-errors js-password-prompt-form', remote: true }, authenticity_token: true do |f| .row.js-search-settings-section @@ -53,7 +53,9 @@ = status_form.hidden_field :emoji, data: { js_name: 'emoji' } = status_form.hidden_field :message, data: { js_name: 'message' } = status_form.hidden_field :availability, data: { js_name: 'availability' } - = status_form.hidden_field :clear_status_after, value: @user.status&.clear_status_at&.to_s(:iso8601), data: { js_name: 'clearStatusAfter' } + = status_form.hidden_field :clear_status_after, + value: user_clear_status_at(@user), + data: { js_name: 'clearStatusAfter' } .col-lg-12 %hr .row.user-time-preferences.js-search-settings-section @@ -106,9 +108,18 @@ .form-group.gl-form-group - external_accounts_help_url = help_page_path('user/profile/index', anchor: 'add-external-accounts-to-your-user-profile-page') - external_accounts_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: external_accounts_help_url } - - external_accounts_docs_link = s_('Profiles|Your Discord user ID. Should be between %{min} and %{max} digits long. %{external_accounts_link_start}Learn more.%{external_accounts_link_end}').html_safe % { min: '17', max: '20', external_accounts_link_start: external_accounts_link_start, external_accounts_link_end: '</a>'.html_safe } + - external_accounts_docs_link = s_('Profiles|Your Discord user ID. %{external_accounts_link_start}Learn more.%{external_accounts_link_end}').html_safe % { external_accounts_link_start: external_accounts_link_start, external_accounts_link_end: '</a>'.html_safe } + - min_discord_length = 17 + - max_discord_length = 20 = f.label :discord - = f.text_field :discord, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|User ID") + = f.text_field :discord, + class: 'gl-form-input form-control gl-md-form-input-lg js-validate-length', + placeholder: s_("Profiles|User ID"), + data: { min_length: min_discord_length, + min_length_message: s_('Profiles|Discord ID is too short (minimum is %{min_length} characters).') % { min_length: min_discord_length }, + max_length: max_discord_length, + max_length_message: s_('Profiles|Discord ID is too long (maximum is %{max_length} characters).') % { max_length: max_discord_length }, + allow_empty: true} %small.form-text.text-gl-muted = external_accounts_docs_link @@ -147,8 +158,13 @@ %legend.col-form-label.col-form-label = s_("Profiles|Private contributions") = f.gitlab_ui_checkbox_component :include_private_contributions, - s_('Profiles|Include private contributions on my profile'), + s_('Profiles|Include private contributions on your profile'), help_text: s_("Profiles|Choose to show contributions of private projects on your public profile without any project, repository or organization information.") + %fieldset.form-group.gl-form-group + %legend.col-form-label.col-form-label + = s_("Profiles|Achievements") + = f.gitlab_ui_checkbox_component :achievements_enabled, + s_('Profiles|Display achievements on your profile') .row.js-hide-when-nothing-matches-search .col-lg-12 %hr |