mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Merge pull request #2739 from chrisgarrity/issue/2309-wide-translations
Wrap ‘need help?’ link when translation is too long
This commit is contained in:
commit
16ca2d7319
2 changed files with 35 additions and 32 deletions
|
@ -7,6 +7,7 @@ const Form = require('../forms/form.jsx');
|
||||||
const Input = require('../forms/input.jsx');
|
const Input = require('../forms/input.jsx');
|
||||||
const Button = require('../forms/button.jsx');
|
const Button = require('../forms/button.jsx');
|
||||||
const Spinner = require('../spinner/spinner.jsx');
|
const Spinner = require('../spinner/spinner.jsx');
|
||||||
|
const FlexRow = require('../flex-row/flex-row.jsx');
|
||||||
|
|
||||||
require('./login.scss');
|
require('./login.scss');
|
||||||
|
|
||||||
|
@ -59,34 +60,35 @@ class Login extends React.Component {
|
||||||
name="password"
|
name="password"
|
||||||
type="password"
|
type="password"
|
||||||
/>
|
/>
|
||||||
{this.state.waiting ? [
|
<FlexRow className="submit-row">
|
||||||
<Button
|
{this.state.waiting ? [
|
||||||
className="submit-button white"
|
<Button
|
||||||
disabled="disabled"
|
className="submit-button white"
|
||||||
key="submitButton"
|
disabled="disabled"
|
||||||
type="submit"
|
key="submitButton"
|
||||||
|
type="submit"
|
||||||
|
>
|
||||||
|
<Spinner
|
||||||
|
className="spinner"
|
||||||
|
color="blue"
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
] : [
|
||||||
|
<Button
|
||||||
|
className="submit-button white"
|
||||||
|
key="submitButton"
|
||||||
|
type="submit"
|
||||||
|
>
|
||||||
|
<FormattedMessage id="general.signIn" />
|
||||||
|
</Button>
|
||||||
|
]}
|
||||||
|
<a
|
||||||
|
href="/accounts/password_reset/"
|
||||||
|
key="passwordResetLink"
|
||||||
>
|
>
|
||||||
<Spinner
|
<FormattedMessage id="login.needHelp" />
|
||||||
className="spinner"
|
</a>
|
||||||
color="blue"
|
</FlexRow>
|
||||||
/>
|
|
||||||
</Button>
|
|
||||||
] : [
|
|
||||||
<Button
|
|
||||||
className="submit-button white"
|
|
||||||
key="submitButton"
|
|
||||||
type="submit"
|
|
||||||
>
|
|
||||||
<FormattedMessage id="general.signIn" />
|
|
||||||
</Button>
|
|
||||||
]}
|
|
||||||
<a
|
|
||||||
className="right"
|
|
||||||
href="/accounts/password_reset/"
|
|
||||||
key="passwordResetLink"
|
|
||||||
>
|
|
||||||
<FormattedMessage id="login.needHelp" />
|
|
||||||
</a>
|
|
||||||
{error}
|
{error}
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,22 +28,23 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spinner {
|
.spinner {
|
||||||
margin: 0 .8rem;
|
margin: 0 .8rem;
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.submit-row {
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-direction: row; // override 'column' layout at small widths
|
||||||
|
}
|
||||||
|
|
||||||
.submit-button {
|
.submit-button {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
margin-top: 15px;
|
margin: auto 0;
|
||||||
color: $ui-white;
|
color: $ui-white;
|
||||||
|
|
||||||
&:link,
|
&:link,
|
||||||
|
|
Loading…
Reference in a new issue