Skip to content

Commit

Permalink
Removed icons from submit buttons, fixed disabled state for tertiary …
Browse files Browse the repository at this point in the history
…button
  • Loading branch information
bisht-richa committed Jan 28, 2025
1 parent 6821889 commit a9f5488
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2524,7 +2524,7 @@ and try again.
</context-group>
</trans-unit>
<trans-unit id="toolbar.delete.user" xml:space="preserve">
<source>Delete</source>
<source>Delete User</source>
<context-group name="ctx">
<context context-type="sourcefile">User details pages</context>
</context-group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1874,13 +1874,13 @@ button below, and &lt;b&gt;will be unable to log back in&lt;/b&gt;.</source>
</context-group>
</trans-unit>
<trans-unit id="userdetails.jsp.disable" xml:space="preserve">
<source>Deactivate</source>
<source>Deactivate User</source>
<context-group name="ctx">
<context context-type="sourcefile">/rhn/users/UserDetails</context>
</context-group>
</trans-unit>
<trans-unit id="userdetails.jsp.enable" xml:space="preserve">
<source>Reactivate</source>
<source>Reactivate User</source>
<context-group name="ctx">
<context context-type="sourcefile">/rhn/users/UserDetails</context>
</context-group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public void testDeletionNoAcl() {
// setup mock objects
String output = "<div class=\"spacewalk-toolbar-h1\">" +
"<div class=\"spacewalk-toolbar\"><a href=\"deletion-url\" class=\"btn btn-danger\">" +
"<i class=\"fa fa-trash-o\" title=\"Delete\">" +
"</i>Delete</a></div><h1></h1></div>";
"<i class=\"fa fa-trash-o\" title=\"Delete User\">" +
"</i>Delete User</a></div><h1></h1></div>";

setupDeletionTag("h1", "deletion-url", "", "user");

Expand Down Expand Up @@ -77,7 +77,7 @@ public void testCreateAclMultipleMixinsMultipleAcls() {
try {
String output = "<div class=\"spacewalk-toolbar-h1\">" +
"<div class=\"spacewalk-toolbar\"><a href=\"deletion-url\" class=\"btn btn-danger\">" +
"<i class=\"fa fa-trash-o\" title=\"Delete\"></i>Delete</a>" +
"<i class=\"fa fa-trash-o\" title=\"Delete User\"></i>Delete User</a>" +
"</div><h1></h1></div>";

setupDeletionTag("h1", "deletion-url",
Expand All @@ -99,7 +99,7 @@ public void testCreateAclMultipleAclsSingleMixin() {
try {
String output = "<div class=\"spacewalk-toolbar-h1\">" +
"<div class=\"spacewalk-toolbar\"><a href=\"deletion-url\" class=\"btn btn-danger\">" +
"<i class=\"fa fa-trash-o\" title=\"Delete\"></i>Delete</a>" +
"<i class=\"fa fa-trash-o\" title=\"Delete User\"></i>Delete User</a>" +
"</div><h1></h1></div>";

setupDeletionTag("h1", "deletion-url",
Expand Down Expand Up @@ -144,7 +144,7 @@ public void testDeletionAcl() {
// setup mock objects
String output = "<div class=\"spacewalk-toolbar-h1\">" +
"<div class=\"spacewalk-toolbar\"><a href=\"deletion-url\" class=\"btn btn-danger\">" +
"<i class=\"fa fa-trash-o\" title=\"Delete\"></i>Delete</a>" +
"<i class=\"fa fa-trash-o\" title=\"Delete User\"></i>Delete User</a>" +
"</div><h1></h1></div>";

setupDeletionTag("h1", "deletion-url", "true_test()", "user");
Expand Down
4 changes: 2 additions & 2 deletions testsuite/features/secondary/min_timezone.feature
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ Feature: Correct timezone display
Scenario: Cleanup: Delete user
When I follow the left menu "Users > User List > Active"
And I follow "MalaysianUser"
And I follow "Delete"
And I follow "Delete User"
Then I should see a "Confirm User Deletion" text
And I should see a "This will delete this user permanently." text
When I click on "Delete"
When I click on "Delete User"
Then I should see a "Active Users" text
And I should not see a "MalaysianUser" link
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ Feature: Advanced content management
Given I am authorized for the "Admin" section
When I follow the left menu "Users > User List > Active"
And I follow "norole"
And I follow "Delete"
And I follow "Delete User"
Then I should see a "Confirm User Deletion" text
And I should see a "This will delete this user permanently." text
When I click on "Delete"
When I click on "Delete User"
Then I should see a "Active Users" text
And I should not see a "norole" link
20 changes: 10 additions & 10 deletions testsuite/features/secondary/srv_users.feature
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ Feature: Manage users
Scenario: Fail to deactivate organization administrator
When I follow the left menu "Users > User List > Active"
And I follow "user1"
When I follow "Deactivate"
When I follow "Deactivate User"
Then I should see a "This action will deactivate this user. This user will no longer be able to log in or perform actions unless it is reactivated." text
When I click on "Deactivate"
When I click on "Deactivate User"
Then I should see a "You cannot deactivate another organization administrator. Please remove the 'Organization Administrator' role from this user before attempting to deactivate their account." text
When I follow "Deactivated"
Then I should see a "No deactivated users." text
Expand All @@ -147,9 +147,9 @@ Feature: Manage users
When I follow the left menu "Users > User List > Active"
And I follow "user1"
Then I should see "role_org_admin" as unchecked
When I follow "Deactivate"
When I follow "Deactivate User"
Then I should see a "This action will deactivate this user. This user will no longer be able to log in or perform actions unless it is reactivated." text
When I click on "Deactivate"
When I click on "Deactivate User"
Then I should see a "Active Users" text
And I should not see a "user1" link
When I follow "Deactivated"
Expand All @@ -163,8 +163,8 @@ Feature: Manage users
When I follow the left menu "Users > User List > Active"
And I follow "Deactivated"
And I follow "user1"
Then I should see a "Reactivate" link
When I follow "Reactivate"
Then I should see a "Reactivate User" link
When I follow "Reactivate User"
Then I should see a "This action will allow this user to access SUSE Manager. This user will retain all permissions, roles, and data that he or she had before being deactivated." text
When I click on "Reactivate User"
Then I should see a "Active Users" text
Expand All @@ -177,8 +177,8 @@ Feature: Manage users
When I follow the left menu "Users > User List > Active"
And I follow "Deactivated"
And I follow "user1"
Then I should see a "Reactivate" link
When I follow "Reactivate"
Then I should see a "Reactivate User" link
When I follow "Reactivate User"
Then I should see a "This action will allow this user to access Uyuni. This user will retain all permissions, roles, and data that he or she had before being deactivated." text
When I click on "Reactivate User"
Then I should see a "Active Users" text
Expand All @@ -189,10 +189,10 @@ Feature: Manage users
Scenario: Delete user
When I follow the left menu "Users > User List > Active"
And I follow "user1"
When I follow "Delete"
When I follow "Delete User"
Then I should see a "Confirm User Deletion" text
And I should see a "This will delete this user permanently." text
When I click on "Delete"
When I click on "Delete User"
Then I should see a "Active Users" text
And I should not see a "user1" link

Expand Down
18 changes: 10 additions & 8 deletions web/html/src/branding/css/base/components/buttons.suma.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@
font-weight: bold;
text-decoration: underline;
text-underline-offset: .3rem;

i {
margin-right: 0;
text-decoration: none;
}
gap: 0.3em;

&:active,
&:focus,
Expand All @@ -91,9 +87,14 @@

&.disabled,
&:disabled {
opacity: 0.6;
pointer-events: auto;
cursor: not-allowed;
&,
&:active {
pointer-events: auto;
cursor: not-allowed;
border-color: transparent;
text-decoration: underline;
text-underline-offset: .3rem;
}
}
}

Expand Down Expand Up @@ -203,6 +204,7 @@
}

.panel-heading,
.panel-heading a:not(.btn-tertiary),
th > a,
th .orderBy {
border: none;
Expand Down
1 change: 0 additions & 1 deletion web/html/src/manager/admin/create-payg/create-payg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ const CreateProject = () => {
className="btn-primary"
title={t("Add PAYG ssh data")}
text={t("Create")}
icon="fa-plus"
action={() =>
onAction(payg.properties, "create")
.then((data) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const TopPanelButtons = (props: TopPanelButtonsProps) => {
className="btn-primary"
title={t("Create project")}
text={t("Create")}
icon="fa-plus"
action={props.onCreate}
/>
</div>
Expand Down
3 changes: 0 additions & 3 deletions web/html/src/manager/images/image-profile-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,6 @@ class CreateImageProfile extends React.Component<Props, State> {
key="clear-btn"
id="clear-btn"
className="btn-default"
icon="fa-eraser"
text={t("Clear fields")}
handler={this.clearFields}
/>,
Expand All @@ -488,7 +487,6 @@ class CreateImageProfile extends React.Component<Props, State> {
key="update-btn"
id="update-btn"
className="btn-primary me-4"
icon="fa-edit"
text={t("Update")}
disabled={this.state.isInvalid}
/>
Expand All @@ -499,7 +497,6 @@ class CreateImageProfile extends React.Component<Props, State> {
key="create-btn"
id="create-btn"
className="btn-primary me-4"
icon="fa-plus"
text={t("Create")}
disabled={this.state.isInvalid}
/>
Expand Down
3 changes: 0 additions & 3 deletions web/html/src/manager/images/image-store-edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class CreateImageStore extends React.Component<Props, State> {
key="clear-btn"
id="clear-btn"
className="btn-default"
icon="fa-eraser"
text={t("Clear fields")}
handler={this.clearFields}
/>,
Expand All @@ -210,7 +209,6 @@ class CreateImageStore extends React.Component<Props, State> {
key="update-btn"
id="update-btn"
className="btn-primary me-4"
icon="fa-edit"
text={t("Update")}
disabled={this.state.isInvalid}
/>
Expand All @@ -221,7 +219,6 @@ class CreateImageStore extends React.Component<Props, State> {
key="create-btn"
id="create-btn"
className="btn-primary me-4"
icon="fa-plus"
text={t("Create")}
disabled={this.state.isInvalid}
/>
Expand Down
6 changes: 2 additions & 4 deletions web/html/src/manager/systems/bootstrap/bootstrap-minions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ class BootstrapMinions extends React.Component<Props, State> {
var errMessage =
xhr.status === 0
? t(
"Request interrupted or invalid response received from the server. Please check if your minion was bootstrapped correctly."
)
"Request interrupted or invalid response received from the server. Please check if your minion was bootstrapped correctly."
)
: Network.errorMessageByStatus(xhr.status);
this.setState({
success: false,
Expand Down Expand Up @@ -394,15 +394,13 @@ class BootstrapMinions extends React.Component<Props, State> {
<AsyncButton
id="bootstrap-btn"
defaultType="btn-primary me-4"
icon="fa-plus"
text={t("Bootstrap")}
disabled={this.state.privKeyLoading}
action={this.onBootstrap}
/>,
<AsyncButton
id="clear-btn"
defaultType="btn-default"
icon="fa-eraser"
text={t("Clear fields")}
action={this.clearFields}
/>,
Expand Down

0 comments on commit a9f5488

Please sign in to comment.