From 0db5259e8412fbcf2f555ed6fa343c5474a1b29a Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 3 Mar 2019 20:26:49 -0500 Subject: [PATCH] Fixed: Don't allow Release Change if AnyRelease and Files Present --- frontend/src/Album/Edit/EditAlbumModalContent.js | 3 +++ frontend/src/Album/Edit/EditAlbumModalContentConnector.js | 1 + 2 files changed, 4 insertions(+) diff --git a/frontend/src/Album/Edit/EditAlbumModalContent.js b/frontend/src/Album/Edit/EditAlbumModalContent.js index 58f5f1e46..949feee08 100644 --- a/frontend/src/Album/Edit/EditAlbumModalContent.js +++ b/frontend/src/Album/Edit/EditAlbumModalContent.js @@ -34,6 +34,7 @@ class EditAlbumModalContent extends Component { title, artistName, albumType, + statistics, item, isSaving, onInputChange, @@ -88,6 +89,7 @@ class EditAlbumModalContent extends Component { type={inputTypes.ALBUM_RELEASE_SELECT} name="releases" helpText="Change release for this album" + isDisabled={anyReleaseOk.value && statistics.trackFileCount > 0} albumReleases={releases} onChange={onInputChange} /> @@ -120,6 +122,7 @@ EditAlbumModalContent.propTypes = { title: PropTypes.string.isRequired, artistName: PropTypes.string.isRequired, albumType: PropTypes.string.isRequired, + statistics: PropTypes.object.isRequired, item: PropTypes.object.isRequired, isSaving: PropTypes.bool.isRequired, onInputChange: PropTypes.func.isRequired, diff --git a/frontend/src/Album/Edit/EditAlbumModalContentConnector.js b/frontend/src/Album/Edit/EditAlbumModalContentConnector.js index 31672d275..f6329f8e8 100644 --- a/frontend/src/Album/Edit/EditAlbumModalContentConnector.js +++ b/frontend/src/Album/Edit/EditAlbumModalContentConnector.js @@ -33,6 +33,7 @@ function createMapStateToProps() { title: album.title, artistName: artist.artistName, albumType: album.albumType, + statistics: album.statistics, isSaving, saveError, item: settings.settings,