Skip to content

Commit

Permalink
Hotfix CI errors in PostForm
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorbg committed Jan 22, 2025
1 parent ec7efc3 commit 761fb44
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/webpacker/components/Posts/PostForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export default function PostForm({
const [formBody, setFormBody] = useInputState(post?.body ?? '');
const [formTags, setFormTags] = useState(post?.tags_array ?? []);
const [formIsStickied, setFormIsStickied] = useCheckboxState(post?.sticky ?? false);
const [formShowOnHomePage, setFormShowOnHomePage] = useCheckboxState(post?.show_on_homepage ?? true);
const [
formShowOnHomePage,
setFormShowOnHomePage,
] = useCheckboxState(post?.show_on_homepage ?? true);
const [postURL, setPostURL] = useInputState(post?.url ?? null);
const [postId, setPostId] = useInputState(post?.id ?? null);
const [unstickAt, setUnstickAt] = useState(post?.unstick_at ?? null);
Expand Down Expand Up @@ -88,8 +91,8 @@ export default function PostForm({
<Form onSubmit={onSubmit}>
<Form.Input label={I18n.t('activerecord.attributes.post.title')} onChange={setFormTitle} value={formTitle} />
<FormField>
<label>{I18n.t('activerecord.attributes.post.body')}</label>
<MarkdownEditor onChange={setFormBody} value={formBody} />
<label htmlFor="post-body">{I18n.t('activerecord.attributes.post.body')}</label>
<MarkdownEditor id="post-body" onChange={setFormBody} value={formBody} />
{/* i18n-tasks-use t('simple_form.hints.post.body') */}
<I18nHTMLTranslate i18nKey="simple_form.hints.post.body" />
</FormField>
Expand All @@ -99,8 +102,9 @@ export default function PostForm({
{ formIsStickied
&& (
<FormField>
<label>{I18n.t('activerecord.attributes.post.unstick_at')}</label>
<label htmlFor="unstick-at">{I18n.t('activerecord.attributes.post.unstick_at')}</label>
<UtcDatePicker
id="unstick-at"
placeholderText={I18n.t('activerecord.attributes.post.unstick_at')}
isoDate={unstickAt}
onChange={(date) => setUnstickAt(date)}
Expand Down

0 comments on commit 761fb44

Please sign in to comment.