Skip to content

Commit

Permalink
fix: hide "Reset" button when editing a Contributor
Browse files Browse the repository at this point in the history
  • Loading branch information
asuworks committed Jun 11, 2024
1 parent ebe53ed commit c415a31
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/components/releaseEditor/ContributorEditForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
</form>
</div>
<div class="modal-footer border-0">
<button type="button" class="btn btn-outline-gray" @click="resetContributor">Reset</button>
<button v-if="!disableEditForm" type="button" class="btn btn-outline-gray" @click="resetContributor">Reset</button>
<button
type="reset"
class="btn btn-outline-gray"
Expand Down Expand Up @@ -329,7 +329,8 @@ function resetContributor() {
}
function setOrganizationGivenName() {
values.givenName = (values as any).jsonAffiliations[0].name;
const firstOrganization = (values as any).jsonAffiliations[0];
values.givenName = firstOrganization ? firstOrganization.name : "";
}
function populateFromUser(user: any) {
Expand Down

0 comments on commit c415a31

Please sign in to comment.