]> Untitled Git - lemmy.git/commitdiff
Adding a max character of 10k to textareas
authorDessalines <tyhou13@gmx.com>
Mon, 29 Apr 2019 19:42:22 +0000 (12:42 -0700)
committerDessalines <tyhou13@gmx.com>
Mon, 29 Apr 2019 19:42:22 +0000 (12:42 -0700)
ui/src/components/comment-form.tsx
ui/src/components/community-form.tsx
ui/src/components/post-form.tsx
ui/src/components/site-form.tsx

index 1b4eda99dbca9bfa459b7b2e6672d4d9529b8f61..a69ae06fc65911021df78a0c8ea0e8c869e1e181 100644 (file)
@@ -56,7 +56,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
         <form onSubmit={linkEvent(this, this.handleCommentSubmit)}>
           <div class="form-group row">
             <div class="col-sm-12">
-              <textarea class="form-control" value={this.state.commentForm.content} onInput={linkEvent(this, this.handleCommentContentChange)} required disabled={this.props.disabled} rows={2} />
+              <textarea class="form-control" value={this.state.commentForm.content} onInput={linkEvent(this, this.handleCommentContentChange)} required disabled={this.props.disabled} rows={2} maxLength={10000} />
             </div>
           </div>
           <div class="row">
index 66071a3fac1a897c8f2a67386982e3491b958fba..e295dcbedd340a9588107931efaaa529e2204c0a 100644 (file)
@@ -88,7 +88,7 @@ export class CommunityForm extends Component<CommunityFormProps, CommunityFormSt
         <div class="form-group row">
           <label class="col-12 col-form-label">Sidebar</label>
           <div class="col-12">
-            <textarea value={this.state.communityForm.description} onInput={linkEvent(this, this.handleCommunityDescriptionChange)} class="form-control" rows={3} />
+            <textarea value={this.state.communityForm.description} onInput={linkEvent(this, this.handleCommunityDescriptionChange)} class="form-control" rows={3} maxLength={10000} />
           </div>
         </div>
         <div class="form-group row">
index e4e75df458663cb34756b85b30c58936ce042015..0154a923f4c29ed9f0d0c116dba9cc4092c4d4b9 100644 (file)
@@ -94,7 +94,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
           <div class="form-group row">
             <label class="col-sm-2 col-form-label">Body</label>
             <div class="col-sm-10">
-              <textarea value={this.state.postForm.body} onInput={linkEvent(this, this.handlePostBodyChange)} class="form-control" rows={4} />
+              <textarea value={this.state.postForm.body} onInput={linkEvent(this, this.handlePostBodyChange)} class="form-control" rows={4} maxLength={10000} />
             </div>
           </div>
           {/* Cant change a community from an edit */}
index 9c0f472bcb6b8087412fa577053bff532527bbce..7c51be40358731b8ac0ff35464ed6a383fa990fa 100644 (file)
@@ -49,7 +49,7 @@ export class SiteForm extends Component<SiteFormProps, SiteFormState> {
         <div class="form-group row">
           <label class="col-12 col-form-label">Sidebar</label>
           <div class="col-12">
-            <textarea value={this.state.siteForm.description} onInput={linkEvent(this, this.handleSiteDescriptionChange)} class="form-control" rows={3} />
+            <textarea value={this.state.siteForm.description} onInput={linkEvent(this, this.handleSiteDescriptionChange)} class="form-control" rows={3} maxLength={10000} />
           </div>
         </div>
         <div class="form-group row">