Use AccessibleButton
for "Accept" on AuthPage (#10508)
* Use AccessibleButton for "Accept" on AuthPage - Use AccessibleButton - Remove mx_InteractiveAuthEntryComponents_termsSubmit:disabled as disabled state is handled by AccessibleButton Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Empty commit Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> --------- Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
This commit is contained in:
parent
6280395928
commit
747afec27e
2 changed files with 15 additions and 17 deletions
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2017 Vector Creations Ltd
|
Copyright 2017 Vector Creations Ltd
|
||||||
|
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
@ -14,6 +15,15 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
.mx_InteractiveAuthEntryComponents {
|
||||||
|
.mx_InteractiveAuthEntryComponents_termsSubmit {
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box; /* prevent overflowing */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.mx_InteractiveAuthEntryComponents_msisdnWrapper {
|
.mx_InteractiveAuthEntryComponents_msisdnWrapper {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
@ -35,24 +45,12 @@ limitations under the License.
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_InteractiveAuthEntryComponents_termsSubmit {
|
|
||||||
margin-top: 20px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* XXX: This should be a common button class */
|
/* XXX: This should be a common button class */
|
||||||
.mx_InteractiveAuthEntryComponents_msisdnSubmit:disabled {
|
.mx_InteractiveAuthEntryComponents_msisdnSubmit:disabled {
|
||||||
background-color: $light-fg-color;
|
background-color: $light-fg-color;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_InteractiveAuthEntryComponents_termsSubmit:disabled {
|
|
||||||
background-color: #92caad; /* Only used here */
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_InteractiveAuthEntryComponents_termsPolicy {
|
.mx_InteractiveAuthEntryComponents_termsPolicy {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
|
@ -386,20 +386,20 @@ export class TermsAuthEntry extends React.Component<ITermsAuthEntryProps, ITerms
|
||||||
|
|
||||||
let submitButton: JSX.Element | undefined;
|
let submitButton: JSX.Element | undefined;
|
||||||
if (this.props.showContinue !== false) {
|
if (this.props.showContinue !== false) {
|
||||||
// XXX: button classes
|
|
||||||
submitButton = (
|
submitButton = (
|
||||||
<button
|
<AccessibleButton
|
||||||
className="mx_InteractiveAuthEntryComponents_termsSubmit mx_GeneralButton"
|
kind="primary"
|
||||||
|
className="mx_InteractiveAuthEntryComponents_termsSubmit"
|
||||||
onClick={this.trySubmit}
|
onClick={this.trySubmit}
|
||||||
disabled={!allChecked}
|
disabled={!allChecked}
|
||||||
>
|
>
|
||||||
{_t("Accept")}
|
{_t("Accept")}
|
||||||
</button>
|
</AccessibleButton>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="mx_InteractiveAuthEntryComponents">
|
||||||
<p>{_t("Please review and accept the policies of this homeserver:")}</p>
|
<p>{_t("Please review and accept the policies of this homeserver:")}</p>
|
||||||
{checkboxes}
|
{checkboxes}
|
||||||
{errorSection}
|
{errorSection}
|
||||||
|
|
Loading…
Reference in a new issue