Add link to the new form

[MAILPOET-1798]
This commit is contained in:
Pavel Dohnal
2020-02-03 15:57:36 +01:00
committed by Jack Kitterhing
parent 9877fed216
commit 1dbf4714b1
2 changed files with 17 additions and 5 deletions

View File

@ -1,6 +1,8 @@
.mailpoet-block-div {
background: #cfc;
border: 2px solid #9c9;
color: green;
padding: 20px;
}
.mailpoet-block-create-new-content {
display: flex;
flex-direction: column;
}

View File

@ -19,6 +19,7 @@ function Edit({ attributes, setAttributes }) {
selectedForm: parseInt(event.target.value, 10),
});
}}
className="mailpoet-block-create-forms-list"
defaultValue={attributes.selectedForm}
>
<option value="" disabled selected>Select a MailPoet form</option>
@ -45,11 +46,20 @@ function Edit({ attributes, setAttributes }) {
{
attributes.selectedForm === null && (
<Placeholder
className="mailpoet-block-div"
className="mailpoet-block-create-new"
icon={<BlockIcon icon={Icon} showColors />}
label="MailPoet Subscription Form"
>
{displayFormsSelect()}
<div className="mailpoet-block-create-new-content">
<a
href="admin.php?page=mailpoet-forms"
target="_blank"
className="mailpoet-block-create-new-link"
>
Create a new form
</a>
{displayFormsSelect()}
</div>
</Placeholder>
)
}