Przeglądaj źródła

Fix incorrect maxlength param values

Kailash Nadh 6 lat temu
rodzic
commit
3de7b3f560

+ 4 - 4
frontend/my/src/Campaign.js

@@ -396,7 +396,7 @@ class TheFormDef extends React.PureComponent {
                 <Input
                   disabled={this.props.formDisabled}
                   autoFocus
-                  maxLength="200"
+                  maxLength={200}
                 />
               )}
             </Form.Item>
@@ -404,7 +404,7 @@ class TheFormDef extends React.PureComponent {
               {getFieldDecorator("subject", {
                 initialValue: record.subject,
                 rules: [{ required: true }]
-              })(<Input disabled={this.props.formDisabled} maxLength="500" />)}
+              })(<Input disabled={this.props.formDisabled} maxLength={500} />)}
             </Form.Item>
             <Form.Item {...formItemLayout} label="From address">
               {getFieldDecorator("from_email", {
@@ -416,7 +416,7 @@ class TheFormDef extends React.PureComponent {
                 <Input
                   disabled={this.props.formDisabled}
                   placeholder="Company Name <email@company.com>"
-                  maxLength="200"
+                  maxLength={200}
                 />
               )}
             </Form.Item>
@@ -431,7 +431,7 @@ class TheFormDef extends React.PureComponent {
                     ? subLists
                     : this.props.data[cs.ModelLists].length === 1
                     ? [this.props.data[cs.ModelLists][0].id]
-                    : undefined,
+                    : [1],
                 rules: [{ required: true }]
               })(
                 <Select disabled={this.props.formDisabled} mode="multiple">

+ 1 - 1
frontend/my/src/Import.js

@@ -165,7 +165,7 @@ class TheFormDef extends React.PureComponent {
           >
             {getFieldDecorator("delim", {
               initialValue: ","
-            })(<Input maxLength="1" style={{ maxWidth: 40 }} />)}
+            })(<Input maxLength={1} style={{ maxWidth: 40 }} />)}
           </Form.Item>
           <Form.Item {...formItemLayout} label="CSV or ZIP file">
             <div className="dropbox">

+ 4 - 2
frontend/my/src/Lists.js

@@ -147,7 +147,7 @@ class CreateFormDef extends React.PureComponent {
               {getFieldDecorator("name", {
                 initialValue: record.name,
                 rules: [{ required: true }]
-              })(<Input autoFocus maxLength="200" />)}
+              })(<Input autoFocus maxLength={200} />)}
             </Form.Item>
             <Form.Item
               {...formItemLayout}
@@ -202,7 +202,9 @@ class Lists extends React.PureComponent {
           const out = []
           out.push(
             <div className="name" key={`name-${record.id}`}>
-              <a role="button" onClick={() => this.handleShowEditForm(record)}>{text}</a>
+              <a role="button" onClick={() => this.handleShowEditForm(record)}>
+                {text}
+              </a>
             </div>
           )
 

+ 2 - 2
frontend/my/src/Subscriber.js

@@ -184,13 +184,13 @@ class CreateFormDef extends React.PureComponent {
             {getFieldDecorator("email", {
               initialValue: record.email,
               rules: [{ required: true }]
-            })(<Input autoFocus pattern="(.+?)@(.+?)" maxLength="200" />)}
+            })(<Input autoFocus pattern="(.+?)@(.+?)" maxLength={200} />)}
           </Form.Item>
           <Form.Item {...layout} label="Name">
             {getFieldDecorator("name", {
               initialValue: record.name,
               rules: [{ required: true }]
-            })(<Input maxLength="200" />)}
+            })(<Input maxLength={200} />)}
           </Form.Item>
           <Form.Item
             {...layout}

+ 1 - 1
frontend/my/src/Templates.js

@@ -138,7 +138,7 @@ class CreateFormDef extends React.PureComponent {
                 {getFieldDecorator("name", {
                   initialValue: record.name,
                   rules: [{ required: true }]
-                })(<Input autoFocus maxLength="200" />)}
+                })(<Input autoFocus maxLength={200} />)}
               </Form.Item>
               <Form.Item {...formItemLayout} name="body" label="Raw HTML">
                 {getFieldDecorator("body", {