Skip to content

Commit

Permalink
Merge pull request #511 from prabalsingh24/collection-change-default-…
Browse files Browse the repository at this point in the history
…privacy

Collection: Change default privacy to public
  • Loading branch information
MonkeyDo committed Sep 10, 2020
2 parents e233463 + c966662 commit ea70d68
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/client/components/forms/userCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,14 @@ class UserCollectionForm extends React.Component {
}));
const initialName = this.state.collection.name;
const initialDescription = this.state.collection.description;
const initialPrivacy = this.state.collection.public ? 'Public' : 'Private';
const initialType = this.state.collection.entityType;
let initialPrivacy;
if (this.props.collection.name) {
initialPrivacy = this.state.collection.public ? 'Public' : 'Private';
}
else {
initialPrivacy = 'Public';
}
const {errorText} = this.state;
const errorAlertClass = classNames('text-center', 'margin-top-1', {hidden: !errorText});
const submitLabel = this.props.collection.name ? 'Update collection' : 'Create collection';
Expand Down

0 comments on commit ea70d68

Please sign in to comment.