summaryrefslogtreecommitdiffstats
path: root/ui/src/components/site-form.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-02-02 13:50:44 -0500
committerDessalines <tyhou13@gmx.com>2020-02-02 13:50:44 -0500
commitac943f8951fe7da86aaa9f41ee879ab670786c86 (patch)
treec8aabdada00514135c35d2aa9be6890a95bac743 /ui/src/components/site-form.tsx
parent23daba54b4dbc3220effaa5d55042db5398cde43 (diff)
Finishing up interpolation rework.
Diffstat (limited to 'ui/src/components/site-form.tsx')
-rw-r--r--ui/src/components/site-form.tsx27
1 files changed, 14 insertions, 13 deletions
diff --git a/ui/src/components/site-form.tsx b/ui/src/components/site-form.tsx
index 1c4f94ae..113e9c66 100644
--- a/ui/src/components/site-form.tsx
+++ b/ui/src/components/site-form.tsx
@@ -5,7 +5,6 @@ import { capitalizeFirstLetter, randomStr, setupTribute } from '../utils';
import autosize from 'autosize';
import Tribute from 'tributejs/src/Tribute.js';
import { i18n } from '../i18next';
-import { T } from 'inferno-i18next';
interface SiteFormProps {
site?: Site; // If a site is given, that means this is an edit
@@ -67,8 +66,8 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
: capitalizeFirstLetter(i18n.t('name'))
} ${i18n.t('your_site')}`}</h5>
<div class="form-group row">
- <label class="col-12 col-form-label" for="create-site-name">
- { i18n.t('name') }
+ <label class="col-12 col-form-label" htmlFor="create-site-name">
+ {i18n.t('name')}
</label>
<div class="col-12">
<input
@@ -84,14 +83,13 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
</div>
</div>
<div class="form-group row">
- <label class="col-12 col-form-label" for="create-site-sidebar">
- { i18n.t('sidebar') }
+ <label class="col-12 col-form-label" htmlFor={this.id}>
+ {i18n.t('sidebar')}
</label>
<div class="col-12">
<textarea
id={this.id}
value={this.state.siteForm.description}
- id="create-site-sidebar"
onInput={linkEvent(this, this.handleSiteDescriptionChange)}
class="form-control"
rows={3}
@@ -109,8 +107,8 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
checked={this.state.siteForm.enable_downvotes}
onChange={linkEvent(this, this.handleSiteEnableDownvotesChange)}
/>
- <label class="form-check-label" for="create-site-downvotes">
- { i18n.t('enable_downvotes') }
+ <label class="form-check-label" htmlFor="create-site-downvotes">
+ {i18n.t('enable_downvotes')}
</label>
</div>
</div>
@@ -125,8 +123,8 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
checked={this.state.siteForm.enable_nsfw}
onChange={linkEvent(this, this.handleSiteEnableNsfwChange)}
/>
- <label class="form-check-label" for="create-site-enable-nsfw">
- { i18n.t('enable_nsfw') }
+ <label class="form-check-label" htmlFor="create-site-enable-nsfw">
+ {i18n.t('enable_nsfw')}
</label>
</div>
</div>
@@ -144,8 +142,11 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
this.handleSiteOpenRegistrationChange
)}
/>
- <label class="form-check-label" for="create-site-open-registration">
- { i18n.t('open_registration') }
+ <label
+ class="form-check-label"
+ htmlFor="create-site-open-registration"
+ >
+ {i18n.t('open_registration')}
</label>
</div>
</div>
@@ -169,7 +170,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
class="btn btn-secondary"
onClick={linkEvent(this, this.handleCancel)}
>
- { i18n.t('cancel') }
+ {i18n.t('cancel')}
</button>
)}
</div>