Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add required * indicator to message content/notif method in alert/report modal #12931

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,19 @@ const StyledSectionContainer = styled.div`
`;

const StyledSectionTitle = styled.div`
display: flex;
align-items: center;
margin: ${({ theme }) => theme.gridUnit * 2}px auto
${({ theme }) => theme.gridUnit * 4}px auto;

h4 {
margin: 0;
}

.required {
margin-left: ${({ theme }) => theme.gridUnit}px;
color: ${({ theme }) => theme.colors.error.base};
}
`;

const StyledSwitchContainer = styled.div`
Expand Down Expand Up @@ -1213,6 +1224,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
? t('Report schedule')
: t('Alert condition schedule')}
</h4>
<span className="required">*</span>
</StyledSectionTitle>
<AlertReportCronScheduler
value={
Expand Down Expand Up @@ -1282,6 +1294,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
<div className="column message">
<StyledSectionTitle>
<h4>{t('Message content')}</h4>
<span className="required">*</span>
</StyledSectionTitle>
<div className="inline-container add-margin">
<Radio.Group onChange={onContentTypeChange} value={contentType}>
Expand Down Expand Up @@ -1331,6 +1344,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
/>
<StyledSectionTitle>
<h4>{t('Notification method')}</h4>
<span className="required">*</span>
</StyledSectionTitle>
<NotificationMethod
setting={notificationSettings[0]}
Expand Down