diff options
Diffstat (limited to 'app/views/shared/issuable/form')
-rw-r--r-- | app/views/shared/issuable/form/_branch_chooser.html.haml | 14 | ||||
-rw-r--r-- | app/views/shared/issuable/form/_metadata.html.haml | 10 |
2 files changed, 17 insertions, 7 deletions
diff --git a/app/views/shared/issuable/form/_branch_chooser.html.haml b/app/views/shared/issuable/form/_branch_chooser.html.haml index 70e931ac164..1f391e8a321 100644 --- a/app/views/shared/issuable/form/_branch_chooser.html.haml +++ b/app/views/shared/issuable/form/_branch_chooser.html.haml @@ -37,10 +37,12 @@ data: { placeholder: _('Select branch'), endpoint: refs_project_path(@project, sort: 'updated_desc', find: 'branches') }}) - if source_level < target_level - .gl-alert.gl-alert-warning.gl-mt-4 - = sprite_icon('warning', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-body - = visibilityMismatchString - %br - = _('Review the target project before submitting to avoid exposing %{source} changes.') % { source: source_visibility } + .gl-alert.gl-alert-warning.gl-alert-not-dismissible.gl-max-content.gl-mt-4 + .gl-alert-container + .gl-alert-content{ role: 'alert' } + = sprite_icon('warning', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-body + = visibilityMismatchString + %br + = _('Review the target project before submitting to avoid exposing %{source} changes.') % { source: source_visibility } %hr diff --git a/app/views/shared/issuable/form/_metadata.html.haml b/app/views/shared/issuable/form/_metadata.html.haml index 366e819d252..1043eb49752 100644 --- a/app/views/shared/issuable/form/_metadata.html.haml +++ b/app/views/shared/issuable/form/_metadata.html.haml @@ -2,11 +2,19 @@ - issuable = local_assigns.fetch(:issuable) - presenter = local_assigns.fetch(:presenter) -- return unless can?(current_user, :"admin_#{issuable.to_ability_name}", issuable.project) +- return unless can?(current_user, :"set_#{issuable.to_ability_name}_metadata", issuable) - has_due_date = issuable.has_attribute?(:due_date) - form = local_assigns.fetch(:form) +- if issuable.respond_to?(:confidential) + .form-group.row + .offset-sm-2.col-sm-10 + .form-check + = form.check_box :confidential, class: 'form-check-input' + = form.label :confidential, class: 'form-check-label' do + This issue is confidential and should only be visible to team members with at least Reporter access. + %hr .row %div{ class: (has_due_date ? "col-lg-6" : "col-12") } |