mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-02 01:01:14 +00:00
Adding a warning for deselecting the undetermined language. (#945)
- Fixes #930
This commit is contained in:
parent
7721d41f6d
commit
cc76092cf2
2 changed files with 33 additions and 28 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 21808b45ea3ef7fa91654d4f6738b5144da6bfe7
|
Subproject commit 7379716231b9f7e67f710751c839398b7ab5d65e
|
|
@ -47,33 +47,38 @@ export class LanguageSelect extends Component<LanguageSelectProps, any> {
|
||||||
return this.props.iconVersion ? (
|
return this.props.iconVersion ? (
|
||||||
this.selectBtn
|
this.selectBtn
|
||||||
) : (
|
) : (
|
||||||
<div className="form-group row">
|
<div>
|
||||||
<label
|
<div className="alert alert-warning" role="alert">
|
||||||
className={classNames("col-form-label", {
|
{i18n.t("undetermined_language_warning")}
|
||||||
"col-sm-3": this.props.multiple,
|
</div>
|
||||||
"col-sm-2": !this.props.multiple,
|
<div className="form-group row">
|
||||||
})}
|
<label
|
||||||
htmlFor={this.id}
|
className={classNames("col-form-label", {
|
||||||
>
|
"col-sm-3": this.props.multiple,
|
||||||
{i18n.t(this.props.multiple ? "language_plural" : "language")}
|
"col-sm-2": !this.props.multiple,
|
||||||
</label>
|
})}
|
||||||
<div
|
htmlFor={this.id}
|
||||||
className={classNames("input-group", {
|
>
|
||||||
"col-sm-9": this.props.multiple,
|
{i18n.t(this.props.multiple ? "language_plural" : "language")}
|
||||||
"col-sm-10": !this.props.multiple,
|
</label>
|
||||||
})}
|
<div
|
||||||
>
|
className={classNames("input-group", {
|
||||||
{this.selectBtn}
|
"col-sm-9": this.props.multiple,
|
||||||
{this.props.multiple && (
|
"col-sm-10": !this.props.multiple,
|
||||||
<div className="input-group-append">
|
})}
|
||||||
<button
|
>
|
||||||
className="input-group-text"
|
{this.selectBtn}
|
||||||
onClick={linkEvent(this, this.handleDeselectAll)}
|
{this.props.multiple && (
|
||||||
>
|
<div className="input-group-append">
|
||||||
<Icon icon="x" />
|
<button
|
||||||
</button>
|
className="input-group-text"
|
||||||
</div>
|
onClick={linkEvent(this, this.handleDeselectAll)}
|
||||||
)}
|
>
|
||||||
|
<Icon icon="x" />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue