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
254dd734
Commit
254dd734
authored
Aug 07, 2020
by
sfang97
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add project visibility modal back
parent
52a21137
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
12 deletions
+8
-12
app/assets/javascripts/badges/components/badge_form.vue
app/assets/javascripts/badges/components/badge_form.vue
+1
-4
app/views/projects/_visibility_modal.html.haml
app/views/projects/_visibility_modal.html.haml
+2
-2
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+3
-4
spec/features/projects/user_changes_project_visibility_spec.rb
...features/projects/user_changes_project_visibility_spec.rb
+2
-2
No files found.
app/assets/javascripts/badges/components/badge_form.vue
View file @
254dd734
...
...
@@ -216,10 +216,7 @@ export default {
</p>
</div>
<div
v-if=
"isEditing"
class=
"row-content-block gl-display-flex gl-justify-content-space-between"
>
<div
v-if=
"isEditing"
class=
"row-content-block gl-display-flex gl-justify-content-end"
>
<button
class=
"btn btn-cancel"
type=
"button"
@
click=
"onCancel"
>
{{
__
(
'
Cancel
'
)
}}
</button>
<loading-button
:loading=
"isSaving"
...
...
app/views/projects/_visibility_modal.html.haml
View file @
254dd734
...
...
@@ -23,7 +23,7 @@
=
(
"To confirm, type %{phrase_code}"
).
html_safe
%
{
phrase_code:
'<code class="js-confirm-danger-match">%{phrase_name}</code>'
.
html_safe
%
{
phrase_name:
@project
.
full_path
}
}
.form-group
=
text_field_tag
'confirm_path_input'
,
''
,
class:
'form-control js-confirm-danger-input qa-confirm-input'
.form-actions.clearfix
%button
.btn.btn-default
.gl-display-flex.gl-justify-content-end
{
type:
"button"
,
"data-dismiss"
:
"modal"
}
.form-actions.
gl-display-flex.gl-justify-content-end.
clearfix
%button
.btn.btn-default
{
type:
"button"
,
"data-dismiss"
:
"modal"
}
=
_
(
'Cancel'
)
=
submit_tag
_
(
'Reduce project visibility'
),
class:
"btn btn-danger js-confirm-danger-submit qa-confirm-button"
,
disabled:
true
app/views/projects/edit.html.haml
View file @
254dd734
...
...
@@ -21,10 +21,9 @@
%input
{
name:
'update_section'
,
type:
'hidden'
,
value:
'js-shared-permissions'
}
%template
.js-project-permissions-form-data
{
type:
"application/json"
}=
project_permissions_panel_data_json
(
@project
)
.js-project-permissions-form
-
if
!
show_visibility_confirm_modal?
(
@project
)
-
if
show_visibility_confirm_modal?
(
@project
)
=
render
"visibility_modal"
.gl-display-flex.gl-justify-content-end
=
f
.
submit
_
(
'Save changes'
),
class:
"btn btn-success
#{
(
'js-confirm-danger'
if
show_visibility_confirm_modal?
(
@project
))
}
"
,
data:
{
qa_selector:
'visibility_features_permissions_save_button'
,
check_field_name:
(
"project[visibility_level]"
if
show_visibility_confirm_modal?
(
@project
)),
check_compare_value:
@project
.
visibility_level
}
=
f
.
submit
_
(
'Save changes'
),
class:
"btn btn-success
#{
(
'js-confirm-danger'
if
show_visibility_confirm_modal?
(
@project
))
}
"
,
data:
{
qa_selector:
'visibility_features_permissions_save_button'
,
check_field_name:
(
"project[visibility_level]"
if
show_visibility_confirm_modal?
(
@project
)),
check_compare_value:
@project
.
visibility_level
}
%section
.qa-merge-request-settings.rspec-merge-request-settings.settings.merge-requests-feature.no-animate
#js-merge-request-settings
{
class:
[(
'expanded'
if
expanded
),
(
'hidden'
if
@project
.
project_feature
.
send
(
:merge_requests_access_level
)
==
0
)]
}
.settings-header
...
...
@@ -39,7 +38,7 @@
%input
{
name:
'update_section'
,
type:
'hidden'
,
value:
'js-merge-request-settings'
}
=
render
'projects/merge_request_settings'
,
form:
f
.gl-display-flex.gl-justify-content-end
=
f
.
submit
_
(
'Save changes'
),
class:
"btn btn-succes
gl-display-flex gl-justify-content-end
qa-save-merge-request-changes rspec-save-merge-request-changes"
=
f
.
submit
_
(
'Save changes'
),
class:
"btn btn-succes qa-save-merge-request-changes rspec-save-merge-request-changes"
=
render_if_exists
'projects/merge_request_approvals_settings'
,
expanded:
expanded
...
...
spec/features/projects/user_changes_project_visibility_spec.rb
View file @
254dd734
...
...
@@ -22,10 +22,10 @@ RSpec.describe 'User changes public project visibility', :js do
click_button
'Save changes'
end
find
(
'.js-confirm-danger-input'
).
send_keys
(
project
.
nam
e
)
find
(
'.js-confirm-danger-input'
).
send_keys
(
project
.
path_with_namespac
e
)
page
.
within
'.modal'
do
click_button
'
Confirm
'
click_button
'
Reduce project visibility
'
end
expect
(
page
).
to
have_text
(
"Project '
#{
project
.
name
}
' was successfully updated"
)
...
...
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