diff --git a/assets/js/src/newsletters/templates.jsx b/assets/js/src/newsletters/templates.jsx index 162f04677d..8d70d1fc6d 100644 --- a/assets/js/src/newsletters/templates.jsx +++ b/assets/js/src/newsletters/templates.jsx @@ -99,7 +99,7 @@ define( "MailPoet's Guide", description: "This is the standard template that comes with MailPoet.", - readonly: true + readonly: "1" } ] } @@ -210,7 +210,7 @@ define( Preview - { (template.readonly) ? false : deleteLink } + { (template.readonly === "1") ? false : deleteLink } ); }.bind(this)); diff --git a/lib/Config/Migrator.php b/lib/Config/Migrator.php index 9998a267ab..9328f93dc0 100644 --- a/lib/Config/Migrator.php +++ b/lib/Config/Migrator.php @@ -99,8 +99,9 @@ class Migrator { 'id mediumint(9) NOT NULL AUTO_INCREMENT,', 'name varchar(250) NOT NULL,', 'description varchar(250) NOT NULL,', - 'body longtext,', - 'thumbnail longtext,', + 'body LONGTEXT,', + 'thumbnail LONGTEXT,', + 'readonly TINYINT(1) DEFAULT 0', 'created_at TIMESTAMP NOT NULL DEFAULT 0,', 'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,', 'PRIMARY KEY (id)' @@ -265,4 +266,4 @@ class Migrator { return implode("\n", $sql); } -} \ No newline at end of file +} diff --git a/lib/Config/PopulatorData/Templates/BlankTemplate.php b/lib/Config/PopulatorData/Templates/BlankTemplate.php index 1809a03097..09f4a10f5a 100644 --- a/lib/Config/PopulatorData/Templates/BlankTemplate.php +++ b/lib/Config/PopulatorData/Templates/BlankTemplate.php @@ -15,6 +15,7 @@ class BlankTemplate { return array( 'name' => __("A Blank Template"), 'description' => __("A blank canvas ready for you to create something wonderful."), + 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), 'body' => json_encode($this->getBody()), ); diff --git a/lib/Config/PopulatorData/Templates/FranksRoastHouseTemplate.php b/lib/Config/PopulatorData/Templates/FranksRoastHouseTemplate.php index 3e28264fdd..6bb78dc5d2 100644 --- a/lib/Config/PopulatorData/Templates/FranksRoastHouseTemplate.php +++ b/lib/Config/PopulatorData/Templates/FranksRoastHouseTemplate.php @@ -15,6 +15,7 @@ class FranksRoastHouseTemplate { return array( 'name' => __("Frank's Roast House"), 'description' => __("Think of this as your playground, ready for you to explore. Play around with this example newsletter and get a handle of what MailPoet can do for you."), + 'readonly' => 0, 'thumbnail' => $this->getThumbnail(), 'body' => json_encode($this->getBody()), );