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

XWIKI-22191: Account disabling and password changing action links should be buttons #3148

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ body {

/* Remove the underlining from links with the btn class.
Those are already styled differently from their neighboring text. */
& a.btn {
& a.btn,
& a.button {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this change, you didn't introduced a button class here, but you replaced a link to a button, so the selector should be just button no?

Copy link
Contributor Author

@Sereza7 Sereza7 Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

When checking out the displays of "button like links", I stumbled upon this one. It gets underlined on hover but there's no need for it to be underlined. See the third item of the PR description in the opening message.

.not-inline-link();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@
<div class="passwordManagement">
<h2>$escapetool.xml($services.localization.render('platform.core.profile.section.security'))</h2>
<span class="buttonwrapper">
<a id="changePassword" href="$doc.getURL('view', 'xpage=passwd')">$escapetool.xml(
$services.localization.render('platform.core.profile.changePassword'))</a>
<button id="changePassword" onclick="location='$doc.getURL('view', 'xpage=passwd')'">$escapetool.xml(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmmm it means it won't work anymore when javascript is disabled. Not a big fan of this onclick attribute to be honest.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted those changes in d043470 👍

$services.localization.render('platform.core.profile.changePassword'))</button>
</span>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ $services.localization.render('platform.core.profile.category.profile.disabled')
#set ($enableClass = "hidden")
#set ($disableClass = "")
#end
<a href="#" id="enable" class="btn btn-success $enableClass">$services.icon.renderHTML('unlock') $services.localization.render('platform.core.profile.category.profile.enableAccount')</a>
<a href="#" id="disable" class="btn btn-warning $disableClass">$services.icon.renderHTML('lock') $services.localization.render('platform.core.profile.category.profile.disableAccount')</a>
<button id="enable" class="btn btn-success $enableClass">$services.icon.renderHTML('unlock') $services.localization.render('platform.core.profile.category.profile.enableAccount')</button>
<button id="disable" class="btn btn-warning $disableClass">$services.icon.renderHTML('lock') $services.localization.render('platform.core.profile.category.profile.disableAccount')</button>
#end
<div class='userInfo'>
#if($xcontext.action == 'view' && $hasEdit)
Expand Down