Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix incorrect maxlength param values

Kailash Nadh3de7b3f560fb
diff --git a/frontend/my/src/Campaign.js b/frontend/my/src/Campaign.js
index 8a2fe5af..65346742 100644
--- a/frontend/my/src/Campaign.js
+++ b/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 protected]>"
- 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">
diff --git a/frontend/my/src/Import.js b/frontend/my/src/Import.js
index f6278372..9ba5d1ad 100644
--- a/frontend/my/src/Import.js
+++ b/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">
diff --git a/frontend/my/src/Lists.js b/frontend/my/src/Lists.js
index 65c5f690..bba29420 100644
--- a/frontend/my/src/Lists.js
+++ b/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>
)
diff --git a/frontend/my/src/Subscriber.js b/frontend/my/src/Subscriber.js
index a8ec5670..52594908 100644
--- a/frontend/my/src/Subscriber.js
+++ b/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}
diff --git a/frontend/my/src/Templates.js b/frontend/my/src/Templates.js
index 866b2310..e4a46f02 100644
--- a/frontend/my/src/Templates.js
+++ b/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", {