Skip to content

Commit

Permalink
XWIKI-21776: Admin section: make the Notifications section pass webst…
Browse files Browse the repository at this point in the history
…andard tests (#2801)

* Added a fallback for null value of `$divData`
* Added a label for the `id="since"` input at the end of the form
* Added a missing space between attributes in email preferences
* Replaced the comment with an actual test for Notifications
* Replaced other uses of Divdata to account for the fact that it might be null
  • Loading branch information
Sereza7 authored Feb 23, 2024
1 parent 9b1251a commit a0174ab
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ $services.localization.use('document', 'XWiki.Notifications.Code.LegacyNotificat
<div>
<input type="radio" id="mode_since" name="mode" value="since"#if($request.mode == 'since')checked#end/>
<label for="mode_since">$escapetool.html($services.localization.render('legacy.event.migration.since'))</label>
<label for="since" class="sr-only">$escapetool.html($services.localization.render('legacy.event.migration.since.picker.label'))</label>
<input type="date" id="since" name="since"#if($request.since) value="$escapetool.xml($request.since)"#end max="$datetool.format('yyyy-MM-dd', $datetool.date)"/>
</div>
<div class="buttons"><span class="buttonwrapper"><input type="submit" value="$escapetool.xml($services.localization.render('legacy.event.migration.start'))" name="migrate" class="button"/></span></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ require(['jquery', 'xwiki-meta', 'ApplicationWidget', 'xwiki-bootstrap-switch',
{{html clean="false"}}
<div class="xform">
<p class="xHint">$escapetool.xml($services.localization.render('notifications.settings.applications.hint'))</p>
<table class="notifPreferences" data-target="$escapetool.xml($wikimacro.parameters.target)" $divData>
<table class="notifPreferences" data-target="$escapetool.xml($wikimacro.parameters.target)" $!divData>
<thead>
<tr>
<th scope="col">$escapetool.xml($services.localization.render('notifications.settings.applications.appName'))</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
<div class="xform">
<dl>
<dt><label for='preference_notification_email_frequency'>$escapetool.xml($services.localization.render('notifications.settings.email.frequency'))</label>
<p id='preference_notification_email_frequency_hint'class="xHint">$escapetool.xml($services.localization.render('notifications.settings.email.frequency.hint'))</p>
<p id='preference_notification_email_frequency_hint' class="xHint">$escapetool.xml($services.localization.render('notifications.settings.email.frequency.hint'))</p>
</dt>
<dd>
#if ($wikimacro.parameters.target == 'user')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ path=$services.webjars.url('org.xwiki.platform:xwiki-platform-notifications-webj
### MACRO CONTENT
######################################################
{{html clean="false"}}
<div class="systemFilterPreferences xform" data-target="$escapetool.xml($wikimacro.parameters.target)" $divData>
<div class="systemFilterPreferences xform" data-target="$escapetool.xml($wikimacro.parameters.target)" $!divData>
<div class="row">
<p class="xHint col-xs-12 col-sm-9 col-md-8 col-lg-9">
$escapetool.xml($services.localization.render('notifications.settings.filters.preferences.system.hint'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,7 @@
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Likes
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=Mentions
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=MessageStream
<!-- /xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&amp;section=Notifications
TODO https://jira.xwiki.org/browse/XWIKI-21776 -->
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&amp;section=Notifications
<!-- Wikis -->
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&amp;section=wikis.descriptor
/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&amp;section=wikis.templates
Expand Down

0 comments on commit a0174ab

Please sign in to comment.