Commit 91864a92 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch '40780-choose-file' into 'master'

Resolve "Rename "Browse file" inputs to "Choose file""

Closes #40780

See merge request gitlab-org/gitlab-ce!16092
parents 377d5c9e 86c0bb49
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
= group_icon(@group, alt: '', class: 'avatar group-avatar s160') = group_icon(@group, alt: '', class: 'avatar group-avatar s160')
%p.light %p.light
- if @group.avatar? - if @group.avatar?
You can change your group avatar here You can change the group avatar here
- else - else
You can upload a group avatar here You can upload a group avatar here
= render 'shared/choose_group_avatar_button', f: f = render 'shared/choose_group_avatar_button', f: f
- if @group.avatar? - if @group.avatar?
%hr %hr
= link_to 'Remove avatar', group_avatar_path(@group.to_param), data: { confirm: "Group avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar" = link_to _('Remove avatar'), group_avatar_path(@group.to_param), data: { confirm: _("Avatar will be removed. Are you sure?")}, method: :delete, class: "btn btn-danger btn-inverted"
= render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group = render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group
......
...@@ -22,18 +22,15 @@ ...@@ -22,18 +22,15 @@
.clearfix.avatar-image.append-bottom-default .clearfix.avatar-image.append-bottom-default
= link_to avatar_icon(@user, 400), target: '_blank', rel: 'noopener noreferrer' do = link_to avatar_icon(@user, 400), target: '_blank', rel: 'noopener noreferrer' do
= image_tag avatar_icon(@user, 160), alt: '', class: 'avatar s160' = image_tag avatar_icon(@user, 160), alt: '', class: 'avatar s160'
%h5.prepend-top-0 %h5.prepend-top-0= _("Upload new avatar")
Upload new avatar
.prepend-top-5.append-bottom-10 .prepend-top-5.append-bottom-10
%a.btn.js-choose-user-avatar-button %button.btn.js-choose-user-avatar-button{ type: 'button' }= _("Choose file...")
Browse file... %span.avatar-file-name.prepend-left-default.js-avatar-filename= _("No file chosen")
%span.avatar-file-name.prepend-left-default.js-avatar-filename No file chosen
= f.file_field_without_bootstrap :avatar, class: 'js-user-avatar-input hidden', accept: 'image/*' = f.file_field_without_bootstrap :avatar, class: 'js-user-avatar-input hidden', accept: 'image/*'
.help-block .help-block= _("The maximum file size allowed is 200KB.")
The maximum file size allowed is 200KB.
- if @user.avatar? - if @user.avatar?
%hr %hr
= link_to 'Remove avatar', profile_avatar_path, data: { confirm: 'Avatar will be removed. Are you sure?' }, method: :delete, class: 'btn btn-gray' = link_to _('Remove avatar'), profile_avatar_path, data: { confirm: _('Avatar will be removed. Are you sure?') }, method: :delete, class: 'btn btn-danger btn-inverted'
%hr %hr
.row .row
.col-lg-4.profile-settings-sidebar .col-lg-4.profile-settings-sidebar
......
...@@ -42,24 +42,23 @@ ...@@ -42,24 +42,23 @@
= f.text_field :tag_list, value: @project.tag_list.sort.join(', '), maxlength: 2000, class: "form-control" = f.text_field :tag_list, value: @project.tag_list.sort.join(', '), maxlength: 2000, class: "form-control"
%p.help-block Separate tags with commas. %p.help-block Separate tags with commas.
%fieldset.features %fieldset.features
%h5.prepend-top-0 %h5.prepend-top-0= _("Project avatar")
Project avatar
.form-group .form-group
- if @project.avatar? - if @project.avatar?
.avatar-container.s160 .avatar-container.s160.append-bottom-15
= project_icon(@project.full_path, alt: '', class: 'avatar project-avatar s160') = project_icon(@project.full_path, alt: '', class: 'avatar project-avatar s160')
%p.light
- if @project.avatar_in_git - if @project.avatar_in_git
Project avatar in repository: #{ @project.avatar_in_git } %p.light
%a.choose-btn.btn.js-choose-project-avatar-button = _("Project avatar in repository: %{link}").html_safe % { link: @project.avatar_in_git }
Browse file... .prepend-top-5.append-bottom-10
%span.file_name.prepend-left-default.js-avatar-filename No file chosen %button.btn.js-choose-project-avatar-button{ type: 'button' }= _("Choose file...")
%span.file_name.prepend-left-default.js-avatar-filename= _("No file chosen")
= f.file_field :avatar, class: "js-project-avatar-input hidden" = f.file_field :avatar, class: "js-project-avatar-input hidden"
.help-block The maximum file size allowed is 200KB. .help-block= _("The maximum file size allowed is 200KB.")
- if @project.avatar? - if @project.avatar?
%hr %hr
= link_to 'Remove avatar', project_avatar_path(@project), data: { confirm: "Project avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar" = link_to _('Remove avatar'), project_avatar_path(@project), data: { confirm: _("Avatar will be removed. Are you sure?") }, method: :delete, class: "btn btn-danger btn-inverted"
= f.submit 'Save changes', class: "btn btn-save" = f.submit 'Save changes', class: "btn btn-success"
%section.settings.sharing-permissions.no-animate{ class: ('expanded' if expanded) } %section.settings.sharing-permissions.no-animate{ class: ('expanded' if expanded) }
.settings-header .settings-header
......
%button.choose-btn.btn.btn-sm.js-choose-group-avatar-button{ type: 'button' } %button.btn.js-choose-group-avatar-button{ type: 'button' }= _("Choose File ...")
%i.fa.fa-paperclip %span.file_name.js-avatar-filename= _("No file chosen")
%span Choose File ... = f.file_field :avatar, class: "js-group-avatar-input hidden"
  .help-block= _("The maximum file size allowed is 200KB.")
%span.file_name.js-avatar-filename File name...
= f.file_field :avatar, class: 'js-group-avatar-input hidden'
.light The maximum file size allowed is 200KB.
---
title: Update Browse file to Choose file in all occurences
merge_request:
author:
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment