Merge pull request #10066 from opf/fix/40348/send-notifications

Show sendNotifications checkbox to disable notifications in template
pull/10087/head
Oliver Günther 3 years ago committed by GitHub
commit 8156feb58a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      frontend/src/app/features/projects/components/new-project/new-project.component.ts
  2. 5
      frontend/src/app/shared/components/forms/fieldset.sass
  3. 4
      spec/features/projects/template_spec.rb

@ -43,7 +43,6 @@ export class NewProjectComponent extends UntilDestroyedMixin implements OnInit {
hiddenFields:string[] = [
'identifier',
'sendNotifications',
'active',
];
@ -114,6 +113,11 @@ export class NewProjectComponent extends UntilDestroyedMixin implements OnInit {
}
private isHiddenField(key:string|undefined):boolean {
// We explictly want to show the sendNotifications param
if (key === '_meta.sendNotifications') {
return false;
}
return !!key && (this.hiddenFields.includes(key) || this.isMeta(key));
}

@ -7,13 +7,12 @@
&_collapsible &
&--toggle::before
display: inline-block
content: ""
@include icon-mixin-arrow-up1
padding: .625rem .25rem 0
&_collapsed &
&--toggle::before
content: ""
@include icon-mixin-arrow-down1
&--fields
height: 0

@ -100,7 +100,9 @@ describe 'Project templates', type: :feature, js: true do
# It does not show the copy meta flags
expect(page).to have_no_selector('[data-qa-field-name="copyMembers"]')
expect(page).to have_no_selector('[data-qa-field-name="sendNotifications"]')
# But shows the send notifications field
expect(page).to have_selector('[data-qa-field-name="sendNotifications"]')
# Update status to off track
status_field.select_option 'Off track'

Loading…
Cancel
Save