Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion adhocracy4/follows/static/follows/FollowButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const translated = {
followingDescription: django.gettext(
'Click to no longer be updated about this project via email.'
),
followAlert: django.gettext('From now on, we\'ll keep you updated on all changes. Make sure email notifications are enabled in your %(linkStart)s profile settings%(linkEnd)s'),
followAlert: django.gettext('From now on, we\'ll keep you updated on all changes.<br/>Make sure email notifications are enabled in your %(linkStart)s profile settings%(linkEnd)s'),
followingAlert: django.gettext('You will no longer be updated via email.'),
follow: django.gettext('Follow'),
following: django.gettext('Following')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ test('Test AlertPortal renders correctly with existing target', async () => {
render(<FollowButton authenticatedAs project="test" alertTarget="alert-container" />)
const followButton = await screen.findByText('Follow')
fireEvent.click(followButton)
const alertElement = screen.getByText('From now on, we\'ll keep you updated on all changes. Make sure email notifications are enabled in your %(linkStart)s profile settings%(linkEnd)s')
const alertElement = screen.getByText((content, element) => {
return content.includes('From now on, we\'ll keep you updated on all changes') &&
content.includes('Make sure email notifications are enabled in your') &&
content.includes('profile settings')
})
expect(alertElement).toBeInTheDocument()
document.body.removeChild(alertContainer)
})
20 changes: 10 additions & 10 deletions adhocracy4/static/Alert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ const Alert = ({ type = 'info', title, message, htmlMessage, onClick, timeInMs }
{htmlMessage
? (<div dangerouslySetInnerHTML={{ __html: htmlMessage }} />)
: (message)}
{onClick && (
<button
type="button"
className="alert__close"
aria-label={closeTag}
onClick={onClick}
>
<span className="fa fa-times" aria-hidden="true" />
</button>
)}
</div>
{onClick && (
<button
type="button"
className="alert__close"
aria-label={closeTag}
onClick={onClick}
>
<span className="fa fa-times" aria-hidden="true" />
</button>
)}
</div>
)
}
Expand Down
Loading