Skip to content

Commit

Permalink
pkp/pkp-lib#10571 Remove unnecessary UI components
Browse files Browse the repository at this point in the history
  • Loading branch information
taslangraham committed Nov 25, 2024
1 parent 6a1f74a commit 9b0d81f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 144 deletions.
21 changes: 2 additions & 19 deletions src/components/Container/ManageEmailsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ export default {
// Remove user group fields if current mailable does not support specifying user group access
if (!this.currentMailable.canAssignUserGroupToTemplates) {
templateForm.fields = templateForm.fields.filter(
(field) => !['userGroupIds', 'isUnrestricted'].includes(field.name),
(field) =>
!['assignedUserGroupIds', 'isUnrestricted'].includes(field.name),
);
}
Expand All @@ -427,24 +428,6 @@ export default {
};
});
}
if (field.name === 'userGroupIds') {
// Existing template will have a list of assignable user groups in its data.
// However, for new templates, we get the assignable user groups from the mailable that we are creating the template for
field.assignableUserGroups =
this.currentTemplate['assignableTemplateUserGroups'] ||
this.currentMailable['assignableTemplateUserGroups'];
field.assignedUserGroupIds =
this.currentTemplate['assignedUserGroupIds'] || [];
field.isUnrestricted =
this.currentTemplate['isUnrestricted'] || false;
}
if (field.name === 'isUnrestricted') {
field.isUnrestricted =
this.currentTemplate['isUnrestricted'] || false;
}
return field;
});
Expand Down
4 changes: 0 additions & 4 deletions src/components/Form/FormGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ import FieldTextarea from './fields/FieldTextarea.vue';
import FieldUpload from './fields/FieldUpload.vue';
import FieldSlider from './fields/FieldSlider.vue';
import FieldUploadImage from './fields/FieldUploadImage.vue';
import FieldEmailTemplateUserGroupSettings from './fields/FieldEmailTemplateUserGroupSettings.vue';
import FieldEmailTemplateUnrestricted from './fields/FieldEmailTemplateUnrestricted.vue';
import {shouldShowFieldWithinGroup} from './formHelpers';
Expand Down Expand Up @@ -111,8 +109,6 @@ export default {
FieldSlider,
FieldUpload,
FieldUploadImage,
FieldEmailTemplateUserGroupSettings,
FieldEmailTemplateUnrestricted,
},
props: {
id: String,
Expand Down
42 changes: 0 additions & 42 deletions src/components/Form/fields/FieldEmailTemplateUnrestricted.vue

This file was deleted.

79 changes: 0 additions & 79 deletions src/components/Form/fields/FieldEmailTemplateUserGroupSettings.vue

This file was deleted.

0 comments on commit 9b0d81f

Please sign in to comment.