Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
fb6c88ab
Commit
fb6c88ab
authored
Apr 08, 2022
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate contribution checkbox to Pajamas component
parent
d1799487
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
13 deletions
+11
-13
app/views/projects/merge_requests/_form.html.haml
app/views/projects/merge_requests/_form.html.haml
+1
-1
app/views/projects/merge_requests/creations/_new_submit.html.haml
...s/projects/merge_requests/creations/_new_submit.html.haml
+1
-1
app/views/shared/issuable/form/_contribution.html.haml
app/views/shared/issuable/form/_contribution.html.haml
+6
-7
app/views/shared/issuable/form/_metadata.html.haml
app/views/shared/issuable/form/_metadata.html.haml
+2
-3
locale/gitlab.pot
locale/gitlab.pot
+1
-1
No files found.
app/views/projects/merge_requests/_form.html.haml
View file @
fb6c88ab
=
form_for
[
@project
,
@merge_request
],
=
gitlab_ui_
form_for
[
@project
,
@merge_request
],
html:
{
class:
'merge-request-form common-note-form js-requires-input js-quick-submit'
}
do
|
f
|
html:
{
class:
'merge-request-form common-note-form js-requires-input js-quick-submit'
}
do
|
f
|
=
render
'shared/issuable/form'
,
f:
f
,
issuable:
@merge_request
,
presenter:
@mr_presenter
=
render
'shared/issuable/form'
,
f:
f
,
issuable:
@merge_request
,
presenter:
@mr_presenter
app/views/projects/merge_requests/creations/_new_submit.html.haml
View file @
fb6c88ab
%h3
.page-title
%h3
.page-title
=
_
(
'New merge request'
)
=
_
(
'New merge request'
)
=
form_for
[
@project
,
@merge_request
],
html:
{
class:
'merge-request-form common-note-form js-requires-input js-quick-submit'
}
do
|
f
|
=
gitlab_ui_
form_for
[
@project
,
@merge_request
],
html:
{
class:
'merge-request-form common-note-form js-requires-input js-quick-submit'
}
do
|
f
|
=
render
'shared/issuable/form'
,
f:
f
,
issuable:
@merge_request
,
commits:
@commits
,
presenter:
@mr_presenter
=
render
'shared/issuable/form'
,
f:
f
,
issuable:
@merge_request
,
commits:
@commits
,
presenter:
@mr_presenter
=
f
.
hidden_field
:source_project_id
=
f
.
hidden_field
:source_project_id
=
f
.
hidden_field
:source_branch
=
f
.
hidden_field
:source_branch
...
...
app/views/shared/issuable/form/_contribution.html.haml
View file @
fb6c88ab
-
issuable
=
local_assigns
.
fetch
(
:issuable
)
-
issuable
=
local_assigns
.
fetch
(
:issuable
)
-
form
=
local_assigns
.
fetch
(
:form
)
-
form
=
local_assigns
.
fetch
(
:form
)
-
contribution_help_link
=
help_page_path
(
'user/project/merge_requests/allow_collaboration'
)
-
contribution_help_link_start
=
'<a href="%{url}" target="_blank" rel="noopener noreferrer">'
.
html_safe
%
{
url:
contribution_help_link
}
-
return
unless
issuable
.
is_a?
(
MergeRequest
)
-
return
unless
issuable
.
is_a?
(
MergeRequest
)
-
return
unless
issuable
.
for_fork?
-
return
unless
issuable
.
for_fork?
...
@@ -11,10 +13,7 @@
...
@@ -11,10 +13,7 @@
%label
.col-form-label.col-sm-2
%label
.col-form-label.col-sm-2
=
_
(
'Contribution'
)
=
_
(
'Contribution'
)
.col-sm-10
.col-sm-10
.form-check.gl-mt-2
=
form
.
gitlab_ui_checkbox_component
:allow_collaboration
,
=
form
.
check_box
:allow_collaboration
,
disabled:
!
issuable
.
can_allow_collaboration?
(
current_user
),
class:
'form-check-input'
_
(
'Allow commits from members who can merge to the target branch. %{link_start}About this feature.%{link_end}'
).
html_safe
%
{
link_start:
contribution_help_link_start
,
link_end:
'</a>'
.
html_safe
},
=
form
.
label
:allow_collaboration
,
class:
'form-check-label'
do
checkbox_options:
{
disabled:
!
issuable
.
can_allow_collaboration?
(
current_user
)
},
=
_
(
'Allow commits from members who can merge to the target branch.'
)
help_text:
allow_collaboration_unavailable_reason
(
issuable
)
=
link_to
'About this feature'
,
help_page_path
(
'user/project/merge_requests/allow_collaboration'
),
target:
'_blank'
,
rel:
'noopener noreferrer nofollow'
.form-text.text-muted
=
allow_collaboration_unavailable_reason
(
issuable
)
app/views/shared/issuable/form/_metadata.html.haml
View file @
fb6c88ab
...
@@ -17,9 +17,8 @@
...
@@ -17,9 +17,8 @@
-
if
issuable
.
respond_to?
(
:confidential
)
&&
can?
(
current_user
,
:set_confidentiality
,
issuable
)
-
if
issuable
.
respond_to?
(
:confidential
)
&&
can?
(
current_user
,
:set_confidentiality
,
issuable
)
.form-group.row
.form-group.row
.offset-sm-2.col-sm-10
.offset-sm-2.col-sm-10
.form-check
=
form
.
gitlab_ui_checkbox_component
:confidential
,
=
form
.
gitlab_ui_checkbox_component
:confidential
,
_
(
'This issue is confidential and should only be visible to team members with at least Reporter access.'
)
s_
(
'This issue is confidential and should only be visible to team members with at least Reporter access.'
)
-
if
can?
(
current_user
,
:"set_
#{
issuable
.
to_ability_name
}
_metadata"
,
issuable
)
-
if
can?
(
current_user
,
:"set_
#{
issuable
.
to_ability_name
}
_metadata"
,
issuable
)
%hr
%hr
...
...
locale/gitlab.pot
View file @
fb6c88ab
...
@@ -3651,7 +3651,7 @@ msgstr ""
...
@@ -3651,7 +3651,7 @@ msgstr ""
msgid "Allow access to the following IP addresses"
msgid "Allow access to the following IP addresses"
msgstr ""
msgstr ""
msgid "Allow commits from members who can merge to the target branch."
msgid "Allow commits from members who can merge to the target branch.
%{link_start}About this feature.%{link_end}
"
msgstr ""
msgstr ""
msgid "Allow group owners to manage LDAP-related settings"
msgid "Allow group owners to manage LDAP-related settings"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment