summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjerasmus <jerasmus@gitlab.com>2018-11-08 10:29:34 +0200
committerjerasmus <jerasmus@gitlab.com>2018-11-08 11:01:34 +0200
commit7faf2fe0fd8a419304bfab96d1e71e5fa6c9835c (patch)
treeffdf567742de34bb0b03f2d20cab72b79ad0c14f
parentc81d4a65a255146619ccf52ece16757c7db622ae (diff)
downloadgitlab-ce-add-commit-email-copy-button.tar.gz
Added the copy button next to the select element.
-rw-r--r--app/views/profiles/show.html.haml10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index ea215e3e718..bf70a990c3d 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -91,9 +91,13 @@
= f.select :public_email, options_for_select(@user.all_emails, selected: @user.public_email),
{ help: s_("Profiles|This email will be displayed on your public profile."), include_blank: s_("Profiles|Do not show on profile") },
control_class: 'select2'
- = f.select :commit_email, options_for_select(@user.verified_emails, selected: @user.commit_email),
- { help: 'This email will be used for web based operations, such as edits and merges.' },
- control_class: 'select2'
+ - commit_email_docs_link = link_to s_('Profiles|Learn more'), help_page_path('user/profile/index', anchor: 'commit-email', target: '_blank')
+
+ = f.select :commit_email, options_for_select(commit_email_select_options(@user), selected: selected_commit_email(@user)),
+ help: s_("Profiles|This email will be used for web based operations, such as edits and merges. %{learn_more}").html_safe % { learn_more: commit_email_docs_link },
+ control_class: 'select2',
+ append: clipboard_button(title: s_('Copy to clipboard'), class: 'js-clipboard-btn snippet-clipboard-btn btn btn-default', text: @user.commit_email)
+
= f.select :preferred_language, Gitlab::I18n::AVAILABLE_LANGUAGES.map { |value, label| [label, value] },
{ help: s_("Profiles|This feature is experimental and translations are not complete yet.") },
control_class: 'select2'