Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
Merge branch 'MM-23264-ShowConfirmationModalForGroupMention2' of gith…
Browse files Browse the repository at this point in the history
…ub.com:hahmadia/mattermost-webapp into MM-24356-Timezone-count
  • Loading branch information
fm2munsh committed Apr 20, 2020
2 parents e0710eb + c906e0c commit 4e44ba9
Show file tree
Hide file tree
Showing 14 changed files with 703 additions and 313 deletions.
4 changes: 2 additions & 2 deletions components/admin_console/admin_definition.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1743,9 +1743,9 @@ const AdminDefinition = {
type: Constants.SettingsTypes.TYPE_BOOL,
key: 'TeamSettings.EnableConfirmNotificationsToChannel',
label: t('admin.environment.notifications.enableConfirmNotificationsToChannel.label'),
label_default: 'Show @channel and @all confirmation dialog:',
label_default: 'Show @channel and @all and group mention confirmation dialog:',
help_text: t('admin.environment.notifications.enableConfirmNotificationsToChannel.help'),
help_text_default: 'When true, users will be prompted to confirm when posting @channel and @all in channels with over five members. When false, no confirmation is required.',
help_text_default: 'When true, users will be prompted to confirm when posting @channel, @all and group mentions in channels with over five members. When false, no confirmation is required.',
},
{
type: Constants.SettingsTypes.TYPE_BOOL,
Expand Down
120 changes: 12 additions & 108 deletions components/create_comment/__snapshots__/create_comment.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -103,28 +103,12 @@ exports[`components/CreateComment should match snapshot read only channel 1`] =
values={Object {}}
/>
}
message={
<FormattedMessage
defaultMessage="By using @all or @channel you are about to send notifications to {totalMembers} people. Are you sure you want to do this?"
id="notify_all.question"
values={
Object {
"totalMembers": 2,
}
}
/>
}
message=""
modalClass=""
onCancel={[Function]}
onConfirm={[Function]}
show={false}
title={
<FormattedMessage
defaultMessage="Confirm sending notifications to entire channel"
id="notify_all.title.confirm"
values={Object {}}
/>
}
title=""
/>
</form>
`;
Expand Down Expand Up @@ -232,28 +216,12 @@ exports[`components/CreateComment should match snapshot when cannot post 1`] = `
values={Object {}}
/>
}
message={
<FormattedMessage
defaultMessage="By using @all or @channel you are about to send notifications to {totalMembers} people. Are you sure you want to do this?"
id="notify_all.question"
values={
Object {
"totalMembers": 2,
}
}
/>
}
message=""
modalClass=""
onCancel={[Function]}
onConfirm={[Function]}
show={false}
title={
<FormattedMessage
defaultMessage="Confirm sending notifications to entire channel"
id="notify_all.title.confirm"
values={Object {}}
/>
}
title=""
/>
</form>
`;
Expand Down Expand Up @@ -396,28 +364,12 @@ exports[`components/CreateComment should match snapshot, comment with message 1`
values={Object {}}
/>
}
message={
<FormattedMessage
defaultMessage="By using @all or @channel you are about to send notifications to {totalMembers} people. Are you sure you want to do this?"
id="notify_all.question"
values={
Object {
"totalMembers": 2,
}
}
/>
}
message=""
modalClass=""
onCancel={[Function]}
onConfirm={[Function]}
show={false}
title={
<FormattedMessage
defaultMessage="Confirm sending notifications to entire channel"
id="notify_all.title.confirm"
values={Object {}}
/>
}
title=""
/>
</form>
`;
Expand Down Expand Up @@ -548,28 +500,12 @@ exports[`components/CreateComment should match snapshot, emoji picker disabled 1
values={Object {}}
/>
}
message={
<FormattedMessage
defaultMessage="By using @all or @channel you are about to send notifications to {totalMembers} people. Are you sure you want to do this?"
id="notify_all.question"
values={
Object {
"totalMembers": 2,
}
}
/>
}
message=""
modalClass=""
onCancel={[Function]}
onConfirm={[Function]}
show={false}
title={
<FormattedMessage
defaultMessage="Confirm sending notifications to entire channel"
id="notify_all.title.confirm"
values={Object {}}
/>
}
title=""
/>
</form>
`;
Expand Down Expand Up @@ -712,28 +648,12 @@ exports[`components/CreateComment should match snapshot, empty comment 1`] = `
values={Object {}}
/>
}
message={
<FormattedMessage
defaultMessage="By using @all or @channel you are about to send notifications to {totalMembers} people. Are you sure you want to do this?"
id="notify_all.question"
values={
Object {
"totalMembers": 2,
}
}
/>
}
message=""
modalClass=""
onCancel={[Function]}
onConfirm={[Function]}
show={false}
title={
<FormattedMessage
defaultMessage="Confirm sending notifications to entire channel"
id="notify_all.title.confirm"
values={Object {}}
/>
}
title=""
/>
</form>
`;
Expand Down Expand Up @@ -901,28 +821,12 @@ exports[`components/CreateComment should match snapshot, non-empty message and u
values={Object {}}
/>
}
message={
<FormattedMessage
defaultMessage="By using @all or @channel you are about to send notifications to {totalMembers} people. Are you sure you want to do this?"
id="notify_all.question"
values={
Object {
"totalMembers": 2,
}
}
/>
}
message=""
modalClass=""
onCancel={[Function]}
onConfirm={[Function]}
show={false}
title={
<FormattedMessage
defaultMessage="Confirm sending notifications to entire channel"
id="notify_all.title.confirm"
values={Object {}}
/>
}
title=""
/>
</form>
`;
Loading

0 comments on commit 4e44ba9

Please sign in to comment.