mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-10-26 08:06:09 +01:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -78,7 +78,7 @@ const RepositoryForm: FC<Props> = ({
|
||||
});
|
||||
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<Props> = ({
|
||||
};
|
||||
|
||||
const submitButton = () => {
|
||||
if (disabled) {
|
||||
if (!isModifiable() && isEditMode()) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<Level
|
||||
right={<SubmitButton disabled={!isValid()} loading={loading} label={t("repositoryForm.submitCreate")} />}
|
||||
right={<SubmitButton disabled={!isValid() || loading} loading={loading} label={t("repositoryForm.submitCreate")} />}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user