From a35c227a557f9780c195a7eb0023b29ba16d47bd Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Thu, 28 Jan 2021 11:31:16 +0100 Subject: [PATCH] Repository contact information is editable The RepositoryForm is called within the creation and editing of a repository. It contains a validator, which is supposed to check, among other things, whether the namespace and name were specified when the repository is created. This information is missing in the edit mode. I therefore initially set valid.namespaceAndName to true. It is changed to false again before the creation mask becomes active. --- CHANGELOG.md | 1 + .../ui-webapp/src/repos/components/form/RepositoryForm.tsx | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba2528b612..c997b37726 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Add explicit provider setup for bouncy castle ([#1500](https://github.com/scm-manager/scm-manager/pull/1500)) +- Repository contact information is editable ([#1508](https://github.com/scm-manager/scm-manager/pull/1508)) ## [2.12.0] - 2020-12-17 ### Added diff --git a/scm-ui/ui-webapp/src/repos/components/form/RepositoryForm.tsx b/scm-ui/ui-webapp/src/repos/components/form/RepositoryForm.tsx index 813499f717..c450df9bd9 100644 --- a/scm-ui/ui-webapp/src/repos/components/form/RepositoryForm.tsx +++ b/scm-ui/ui-webapp/src/repos/components/form/RepositoryForm.tsx @@ -78,7 +78,7 @@ const RepositoryForm: FC = ({ }); const [initRepository, setInitRepository] = useState(false); const [contextEntries, setContextEntries] = useState({}); - const [valid, setValid] = useState({ namespaceAndName: false, contact: true }); + const [valid, setValid] = useState({ namespaceAndName: true, contact: true }); const [t] = useTranslation("repos"); useEffect(() => { @@ -178,12 +178,12 @@ const RepositoryForm: FC = ({ }; const submitButton = () => { - if (disabled) { + if (!isModifiable() && isEditMode()) { return null; } return ( } + right={} /> ); };