Add an option for certain templates to be read only
This commit is contained in:
@ -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
|
||||
</a>
|
||||
</div>
|
||||
{ (template.readonly) ? false : deleteLink }
|
||||
{ (template.readonly === "1") ? false : deleteLink }
|
||||
</li>
|
||||
);
|
||||
}.bind(this));
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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()),
|
||||
);
|
||||
|
@ -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()),
|
||||
);
|
||||
|
Reference in New Issue
Block a user