|
|
@@ -21,7 +21,7 @@ const AVAILABLE_GRANTS = [
|
|
|
grant: PageGrant.GRANT_PUBLIC, iconName: 'group', btnStyleClass: 'outline-info', label: 'Public',
|
|
|
},
|
|
|
{
|
|
|
- grant: PageGrant.GRANT_RESTRICTED, iconName: 'link', btnStyleClass: 'outline-teal', label: 'Anyone with the link',
|
|
|
+ grant: PageGrant.GRANT_RESTRICTED, iconName: 'link', btnStyleClass: 'outline-success', label: 'Anyone with the link',
|
|
|
},
|
|
|
// { grant: 3, iconClass: '', label: 'Specified users only' },
|
|
|
{
|
|
|
@@ -30,7 +30,7 @@ const AVAILABLE_GRANTS = [
|
|
|
{
|
|
|
grant: PageGrant.GRANT_USER_GROUP,
|
|
|
iconName: 'more_horiz',
|
|
|
- btnStyleClass: 'outline-purple',
|
|
|
+ btnStyleClass: 'outline-warning',
|
|
|
label: 'Only inside the group',
|
|
|
reselectLabel: 'Reselect the group',
|
|
|
},
|
|
|
@@ -39,6 +39,7 @@ const AVAILABLE_GRANTS = [
|
|
|
|
|
|
type Props = {
|
|
|
disabled?: boolean,
|
|
|
+ openInModal?: boolean,
|
|
|
grant: PageGrant,
|
|
|
userRelatedGrantedGroups?: {
|
|
|
id: string,
|
|
|
@@ -57,6 +58,7 @@ export const GrantSelector = (props: Props): JSX.Element => {
|
|
|
|
|
|
const {
|
|
|
disabled,
|
|
|
+ openInModal,
|
|
|
userRelatedGrantedGroups,
|
|
|
onUpdateGrant,
|
|
|
grant: currentGrant,
|
|
|
@@ -162,13 +164,13 @@ export const GrantSelector = (props: Props): JSX.Element => {
|
|
|
<DropdownToggle color={dropdownToggleBtnColor} caret className="d-flex justify-content-between align-items-center" disabled={disabled}>
|
|
|
{dropdownToggleLabelElm}
|
|
|
</DropdownToggle>
|
|
|
- <DropdownMenu container="body">
|
|
|
+ <DropdownMenu container={openInModal ? '' : 'body'}>
|
|
|
{dropdownMenuElems}
|
|
|
</DropdownMenu>
|
|
|
</UncontrolledDropdown>
|
|
|
</div>
|
|
|
);
|
|
|
- }, [changeGrantHandler, currentGrant, disabled, userRelatedGrantedGroups, t]);
|
|
|
+ }, [changeGrantHandler, currentGrant, disabled, userRelatedGrantedGroups, t, openInModal]);
|
|
|
|
|
|
/**
|
|
|
* Render select grantgroup modal.
|