mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-01 10:09:56 +00:00
fix: Small adjustments to create post form
This commit is contained in:
parent
7efbf8c69c
commit
deed524a7f
3 changed files with 20 additions and 27 deletions
|
@ -66,10 +66,9 @@ export class LanguageSelect extends Component<LanguageSelectProps, any> {
|
||||||
{i18n.t(this.props.multiple ? "language_plural" : "language")}
|
{i18n.t(this.props.multiple ? "language_plural" : "language")}
|
||||||
</label>
|
</label>
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(`col-sm-${this.props.multiple ? 9 : 10}`, {
|
||||||
"input-group",
|
"input-group": this.props.multiple,
|
||||||
`col-sm-${this.props.multiple ? 9 : 10}`
|
})}
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
{this.selectBtn}
|
{this.selectBtn}
|
||||||
{this.props.multiple && (
|
{this.props.multiple && (
|
||||||
|
|
|
@ -178,7 +178,7 @@ export class CreatePost extends Component<
|
||||||
id="createPostForm"
|
id="createPostForm"
|
||||||
className="col-12 col-lg-6 offset-lg-3 mb-4"
|
className="col-12 col-lg-6 offset-lg-3 mb-4"
|
||||||
>
|
>
|
||||||
<h5>{i18n.t("create_post")}</h5>
|
<h1 className="h4">{i18n.t("create_post")}</h1>
|
||||||
<PostForm
|
<PostForm
|
||||||
onCreate={this.handlePostCreate}
|
onCreate={this.handlePostCreate}
|
||||||
params={locationState}
|
params={locationState}
|
||||||
|
|
|
@ -357,6 +357,13 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<LanguageSelect
|
||||||
|
allLanguages={this.props.allLanguages}
|
||||||
|
siteLanguages={this.props.siteLanguages}
|
||||||
|
selectedLanguageIds={selectedLangs}
|
||||||
|
multiple={false}
|
||||||
|
onChange={this.handleLanguageChange}
|
||||||
|
/>
|
||||||
{!this.props.post_view && (
|
{!this.props.post_view && (
|
||||||
<div className="mb-3 row">
|
<div className="mb-3 row">
|
||||||
<label className="col-sm-2 col-form-label" htmlFor="post-community">
|
<label className="col-sm-2 col-form-label" htmlFor="post-community">
|
||||||
|
@ -381,30 +388,17 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{this.props.enableNsfw && (
|
{this.props.enableNsfw && (
|
||||||
<div className="mb-3 row">
|
<div className="form-check mb-3">
|
||||||
<legend className="col-form-label col-sm-2 pt-0">
|
|
||||||
{i18n.t("nsfw")}
|
|
||||||
</legend>
|
|
||||||
<div className="col-sm-10">
|
|
||||||
<div className="form-check">
|
|
||||||
<input
|
<input
|
||||||
className="form-check-input position-static"
|
className="form-check-input"
|
||||||
id="post-nsfw"
|
id="post-nsfw"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
checked={this.state.form.nsfw}
|
checked={this.state.form.nsfw}
|
||||||
onChange={linkEvent(this, this.handlePostNsfwChange)}
|
onChange={linkEvent(this, this.handlePostNsfwChange)}
|
||||||
/>
|
/>
|
||||||
</div>
|
<label className="form-check-label">{i18n.t("nsfw")}</label>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<LanguageSelect
|
|
||||||
allLanguages={this.props.allLanguages}
|
|
||||||
siteLanguages={this.props.siteLanguages}
|
|
||||||
selectedLanguageIds={selectedLangs}
|
|
||||||
multiple={false}
|
|
||||||
onChange={this.handleLanguageChange}
|
|
||||||
/>
|
|
||||||
<input
|
<input
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
autoComplete="false"
|
autoComplete="false"
|
||||||
|
|
Loading…
Reference in a new issue