mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 12:21:13 +00:00
fix: Adds ability to hide language warning
This commit is contained in:
parent
50a8f40187
commit
9d45b4afe3
2 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@ interface LanguageSelectProps {
|
||||||
showSite?: boolean;
|
showSite?: boolean;
|
||||||
iconVersion?: boolean;
|
iconVersion?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
hideLanguageWarning?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class LanguageSelect extends Component<LanguageSelectProps, any> {
|
export class LanguageSelect extends Component<LanguageSelectProps, any> {
|
||||||
|
@ -49,7 +50,7 @@ export class LanguageSelect extends Component<LanguageSelectProps, any> {
|
||||||
this.selectBtn
|
this.selectBtn
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
{this.props.multiple && (
|
{this.props.multiple && !this.props.hideLanguageWarning && (
|
||||||
<div className="alert alert-warning" role="alert">
|
<div className="alert alert-warning" role="alert">
|
||||||
{i18n.t("undetermined_language_warning")}
|
{i18n.t("undetermined_language_warning")}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -265,6 +265,7 @@ export class CommunityForm extends Component<
|
||||||
showSite
|
showSite
|
||||||
selectedLanguageIds={this.state.form.discussion_languages}
|
selectedLanguageIds={this.state.form.discussion_languages}
|
||||||
multiple={true}
|
multiple={true}
|
||||||
|
hideLanguageWarning={true}
|
||||||
onChange={this.handleDiscussionLanguageChange}
|
onChange={this.handleDiscussionLanguageChange}
|
||||||
/>
|
/>
|
||||||
<div className="form-group row">
|
<div className="form-group row">
|
||||||
|
|
Loading…
Reference in a new issue