Change padded image attribute to fullWidth

This commit is contained in:
Tautvidas Sipavičius
2016-02-08 17:38:27 +02:00
parent 2ae3d8ebdf
commit 8b001d820b
19 changed files with 81 additions and 75 deletions

View File

@ -35,7 +35,7 @@ define([
titlePosition: 'inTextBlock', // 'inTextBlock'|'aboveBlock',
titleAlignment: 'left', // 'left'|'center'|'right'
titleIsLink: false, // false|true
imagePadded: true, // true|false
imageFullWidth: false, // true|false
//imageAlignment: 'centerPadded', // 'centerFull'|'centerPadded'|'left'|'right'|'alternate'|'none'
showAuthor: 'no', // 'no'|'aboveText'|'belowText'
authorPrecededBy: 'Author:',
@ -63,7 +63,7 @@ define([
initialize: function() {
base.BlockView.prototype.initialize.apply(this, arguments);
this.fetchPosts();
this.on('change:amount change:contentType change:terms change:inclusionType change:displayType change:titleFormat change:titlePosition change:titleAlignment change:titleIsLink change:imagePadded change:showAuthor change:authorPrecededBy change:showCategories change:categoriesPrecededBy change:readMoreType change:readMoreText change:sortBy change:showDivider', this._scheduleFetchPosts, this);
this.on('change:amount change:contentType change:terms change:inclusionType change:displayType change:titleFormat change:titlePosition change:titleAlignment change:titleIsLink change:imageFullWidth change:showAuthor change:authorPrecededBy change:showCategories change:categoriesPrecededBy change:readMoreType change:readMoreText change:sortBy change:showDivider', this._scheduleFetchPosts, this);
this.listenTo(this.get('readMoreButton'), 'change', this._scheduleFetchPosts);
this.listenTo(this.get('divider'), 'change', this._scheduleFetchPosts);
},
@ -144,7 +144,7 @@ define([
"change .mailpoet_automated_latest_content_include_or_exclude": _.partial(this.changeField, "inclusionType"),
"change .mailpoet_automated_latest_content_title_position": _.partial(this.changeField, "titlePosition"),
"change .mailpoet_automated_latest_content_title_alignment": _.partial(this.changeField, "titleAlignment"),
"change .mailpoet_automated_latest_content_image_padded": _.partial(this.changeBoolField, "imagePadded"),
"change .mailpoet_automated_latest_content_image_full_width": _.partial(this.changeBoolField, "imageFullWidth"),
"change .mailpoet_automated_latest_content_show_author": _.partial(this.changeField, "showAuthor"),
"keyup .mailpoet_automated_latest_content_author_preceded_by": _.partial(this.changeField, "authorPrecededBy"),
"change .mailpoet_automated_latest_content_show_categories": _.partial(this.changeField, "showCategories"),

View File

@ -20,7 +20,7 @@ define([
link: 'http://example.org',
src: 'no-image.png',
alt: 'An image of...',
padded: true, // true | false - Padded or full width
fullWidth: true, // true | false
width: '64px',
height: '64px',
styles: {
@ -45,10 +45,10 @@ define([
this.toolsView = new Module.ImageBlockToolsView({ model: this.model });
this.toolsRegion.show(this.toolsView);
if (this.model.get('padded')) {
this.$el.removeClass('mailpoet_full_image');
} else {
if (this.model.get('fullWidth')) {
this.$el.addClass('mailpoet_full_image');
} else {
this.$el.removeClass('mailpoet_full_image');
}
},
});
@ -64,7 +64,7 @@ define([
"keyup .mailpoet_field_image_link": _.partial(this.changeField, "link"),
"keyup .mailpoet_field_image_address": _.partial(this.changeField, "src"),
"keyup .mailpoet_field_image_alt_text": _.partial(this.changeField, "alt"),
"change .mailpoet_field_image_padded": _.partial(this.changeBoolCheckboxField, "padded"),
"change .mailpoet_field_image_full_width": _.partial(this.changeBoolCheckboxField, "fullWidth"),
"change .mailpoet_field_image_alignment": _.partial(this.changeField, "styles.block.textAlign"),
"click .mailpoet_field_image_select_another_image": "showMediaManager",
"click .mailpoet_done_editing": "close",

View File

@ -46,7 +46,7 @@ define([
titlePosition: 'inTextBlock', // 'inTextBlock'|'aboveBlock',
titleAlignment: 'left', // 'left'|'center'|'right'
titleIsLink: false, // false|true
imagePadded: true, // true|false
imageFullWidth: false, // true|false
//imageAlignment: 'centerPadded', // 'centerFull'|'centerPadded'|'left'|'right'|'alternate'|'none'
showAuthor: 'no', // 'no'|'aboveText'|'belowText'
authorPrecededBy: 'Author:',
@ -88,7 +88,7 @@ define([
this.on('change:amount change:contentType change:terms change:inclusionType change:postStatus change:search change:sortBy', refreshAvailablePosts);
this.listenTo(this.get('_selectedPosts'), 'add remove reset', refreshTransformedPosts);
this.on('change:displayType change:titleFormat change:titlePosition change:titleAlignment change:titleIsLink change:imagePadded change:showAuthor change:authorPrecededBy change:showCategories change:categoriesPrecededBy change:readMoreType change:readMoreText change:showDivider', refreshTransformedPosts);
this.on('change:displayType change:titleFormat change:titlePosition change:titleAlignment change:titleIsLink change:imageFullWidth change:showAuthor change:authorPrecededBy change:showCategories change:categoriesPrecededBy change:readMoreType change:readMoreText change:showDivider', refreshTransformedPosts);
this.listenTo(this.get('readMoreButton'), 'change', refreshTransformedPosts);
this.listenTo(this.get('divider'), 'change', refreshTransformedPosts);
@ -396,7 +396,7 @@ define([
"change .mailpoet_posts_include_or_exclude": _.partial(this.changeField, "inclusionType"),
"change .mailpoet_posts_title_position": _.partial(this.changeField, "titlePosition"),
"change .mailpoet_posts_title_alignment": _.partial(this.changeField, "titleAlignment"),
"change .mailpoet_posts_image_padded": _.partial(this.changeBoolField, "imagePadded"),
"change .mailpoet_posts_image_full_width": _.partial(this.changeBoolField, "imageFullWidth"),
"change .mailpoet_posts_show_author": _.partial(this.changeField, "showAuthor"),
"keyup .mailpoet_posts_author_preceded_by": _.partial(this.changeField, "authorPrecededBy"),
"change .mailpoet_posts_show_categories": _.partial(this.changeField, "showCategories"),

View File

@ -225,6 +225,11 @@ define([
showPreview: function() {
var json = App.toJSON();
// Stringify to enable transmission of primitive non-string value types
if (!_.isUndefined(json.body)) {
json.body = JSON.stringify(json.body);
}
MailPoet.Ajax.post({
endpoint: 'newsletters',
action: 'render',

View File

@ -68,7 +68,7 @@ class FranksRoastHouseTemplate {
"link" => "http://www.example.com",
"src" => $this->template_image_url . "/header-v2.jpg",
"alt" => __("Frank's Roast House"),
"padded" => false,
"fullWidth" => true,
"width" => "600px",
"height" => "220px",
"styles" => array(
@ -95,7 +95,7 @@ class FranksRoastHouseTemplate {
"link" => "http://example.org",
"src" => $this->template_image_url . "/coffee-grain.jpg",
"alt" => __("coffee-grain-3-1329675-1599x941"),
"padded" => true,
"fullWidth" => false,
"width" => "1599px",
"height" => "777px",
"styles" => array(
@ -139,7 +139,7 @@ class FranksRoastHouseTemplate {
"link" => "http://example.org",
"src" => $this->template_image_url . "/sandwich.jpg",
"alt" => "sandwich",
"padded" => true,
"fullWidth" => false,
"width" => "640px",
"height" => "344px",
"styles" => array(
@ -238,7 +238,7 @@ class FranksRoastHouseTemplate {
"link" => "http://example.org",
"src" => $this->template_image_url . "/map-v2.jpg",
"alt" => __("map-v2"),
"padded" => true,
"fullWidth" => false,
"width" => "636px",
"height" => "342px",
"styles" => array(

View File

@ -90,7 +90,7 @@ class PostNotificationsBlankTemplate {
"link" => "http://example.org",
"src" => $this->template_image_url . "/ALC-widget-icon.png",
"alt" => __("ALC-widget-icon"),
"padded" => true,
"fullWidth" => false,
"width" => "200px",
"height" => "134px",
"styles" => array(

View File

@ -68,7 +68,7 @@ class WelcomeTemplate {
"link" => "http://example.org",
"src" => $this->template_image_url . "/logo-header.gif",
"alt" => "logo-header",
"padded" => true,
"fullWidth" => false,
"width" => "233px",
"height" => "118px",
"styles" => array(

View File

@ -22,12 +22,12 @@ class PostTransformer {
$content = $content_manager->filterContent($content);
$structure_transformer = new StructureTransformer();
$structure = $structure_transformer->transform($content, $this->args['imagePadded'] === 'true');
$structure = $structure_transformer->transform($content, $this->args['imageFullWidth'] === 'true');
$structure = $this->appendFeaturedImage(
$post,
$this->args['displayType'],
$this->args['imagePadded'] === 'true',
$this->args['imageFullWidth'] === 'true',
$structure
);
$structure = $this->appendPostTitle($post, $structure);
@ -36,7 +36,7 @@ class PostTransformer {
return $structure;
}
private function appendFeaturedImage($post, $display_type, $image_padded, $structure) {
private function appendFeaturedImage($post, $display_type, $image_full_width, $structure) {
if ($display_type === 'full') {
// No featured images for full posts
return $structure;
@ -45,7 +45,7 @@ class PostTransformer {
$featured_image = $this->getFeaturedImage(
$post->ID,
$post->post_title,
(bool)$image_padded
(bool)$image_full_width
);
if (is_array($featured_image)) {
@ -55,7 +55,7 @@ class PostTransformer {
return $structure;
}
private function getFeaturedImage($post_id, $post_title, $image_padded) {
private function getFeaturedImage($post_id, $post_title, $image_full_width) {
if(has_post_thumbnail($post_id)) {
$thumbnail_id = get_post_thumbnail_id($post_id);
@ -81,7 +81,7 @@ class PostTransformer {
'link' => get_permalink($post_id),
'src' => $image_info[0],
'alt' => $alt_text,
'padded' => $image_padded,
'fullWidth' => $image_full_width,
'width' => $image_info[1],
'height' => $image_info[2],
'styles' => array(

View File

@ -7,11 +7,11 @@ if(!defined('ABSPATH')) exit;
class StructureTransformer {
function transform($content, $image_padded) {
function transform($content, $image_full_width) {
$root = pQuery::parseStr($content);
$this->hoistImagesToRoot($root);
$structure = $this->transformTagsToBlocks($root, $image_padded);
$structure = $this->transformTagsToBlocks($root, $image_full_width);
$structure = $this->mergeNeighboringBlocks($structure);
return $structure;
}
@ -44,8 +44,8 @@ class StructureTransformer {
* Transforms HTML tags into their respective JSON objects,
* turns other root children into text blocks
*/
private function transformTagsToBlocks($root, $image_padded) {
return array_map(function($item) use ($image_padded) {
private function transformTagsToBlocks($root, $image_full_width) {
return array_map(function($item) use ($image_full_width) {
if ($item->tag === 'img' || $item->tag === 'a' && $item->query('img')) {
if ($item->tag === 'a') {
$link = $item->getAttribute('href');
@ -60,7 +60,7 @@ class StructureTransformer {
'link' => $link,
'src' => $image->getAttribute('src'),
'alt' => $image->getAttribute('alt'),
'padded' => $image_padded,
'fullWidth' => $image_full_width,
'width' => $image->getAttribute('width'),
'height' => $image->getAttribute('height'),
'styles' => array(

View File

@ -12,6 +12,7 @@ class Image {
<td class="mailpoet_image ' . $element['paddedClass'] . '" align="center" valign="top">
<img style="max-width:' . $element['width'] . 'px;" src="' . $element['src'] . '"
width="' . $element['width'] . '" height="' . $element['height'] . '" alt="' . $element['alt'] . '"/>
' . json_encode($element) . '
</td>
</tr>';
return $template;
@ -26,7 +27,7 @@ class Image {
$element['width'] = $column_width;
$element['height'] = ceil((int) $element['height'] / $ratio);
}
if($element['padded'] == "true" && $element['width'] >= $column_width) {
if($element['fullWidth'] == false && $element['width'] >= $column_width) {
// resize image if the padded option is on
$ratio = (int) $element['width'] / ((int) $element['width'] - $padded_width);
$element['width'] = (int) $element['width'] - $padded_width;
@ -39,4 +40,4 @@ class Image {
}
return $element;
}
}
}

View File

@ -143,7 +143,7 @@ class Newsletters {
$data
);
$rendered_newsletter = $shortcodes->replace();
return array('rendered_body' => $rendered_newsletter);
return array('rendered_body' => $rendered_newsletter, 'original' => $data);
}
function sendPreview($data = array()) {
@ -280,4 +280,4 @@ class Newsletters {
);
}
}
}
}

View File

@ -71,7 +71,7 @@ define([
});
it('has image width', function () {
expect(model.get('imagePadded')).to.be.a('boolean');
expect(model.get('imageFullWidth')).to.be.a('boolean');
});
it('has an option to display author', function () {
@ -126,7 +126,7 @@ define([
titlePosition: 'aboveBlock', // 'inTextBlock'|'aboveBlock',
titleAlignment: 'right', // 'left'|'center'|'right'
titleIsLink: true, // false|true
imagePadded: false, // true|false
imageFullWidth: false, // true|false
showAuthor: 'belowText', // 'no'|'aboveText'|'belowText'
authorPrecededBy: 'Custom config author preceded by',
showCategories: 'belowText', // 'no'|'aboveText'|'belowText'
@ -172,7 +172,7 @@ define([
expect(model.get('titlePosition')).to.equal('aboveBlock');
expect(model.get('titleAlignment')).to.equal('right');
expect(model.get('titleIsLink')).to.equal(true);
expect(model.get('imagePadded')).to.equal(false);
expect(model.get('imageFullWidth')).to.equal(false);
expect(model.get('showAuthor')).to.equal('belowText');
expect(model.get('authorPrecededBy')).to.equal('Custom config author preceded by');
expect(model.get('showCategories')).to.equal('belowText');
@ -346,8 +346,8 @@ define([
it('changes the model if image alignment changes', function () {
var newValue = false;
view.$('.mailpoet_automated_latest_content_image_padded').val(newValue).change();
expect(model.get('imagePadded')).to.equal(newValue);
view.$('.mailpoet_automated_latest_content_image_full_width').val(newValue).change();
expect(model.get('imageFullWidth')).to.equal(newValue);
});
it('changes the model if show author changes', function () {

View File

@ -30,8 +30,8 @@ define([
expect(model.get('alt')).to.be.a('string');
});
it('can be padded', function () {
expect(model.get('padded')).to.be.a('boolean');
it('can be full width', function () {
expect(model.get('fullWidth')).to.be.a('boolean');
});
it('has a width', function () {
@ -61,7 +61,7 @@ define([
model.set('link', 'http://example.net');
model.set('src', 'someNewImage.png');
model.set('alt', 'Some alt text');
model.set('padded', false);
model.set('fullWidth', false);
model.set('width', '63px');
model.set('height', '61px');
model.set('styles.block.textAlign', 'right');
@ -76,7 +76,7 @@ define([
link: 'http://example.org/customConfigPage',
src: 'http://example.org/someCustomConfigImage.png',
alt: 'Custom config alt',
padded: false,
fullWidth: false,
width: '1234px',
height: '2345px',
styles: {
@ -92,7 +92,7 @@ define([
expect(model.get('link')).to.equal('http://example.org/customConfigPage');
expect(model.get('src')).to.equal('http://example.org/someCustomConfigImage.png');
expect(model.get('alt')).to.equal('Custom config alt');
expect(model.get('padded')).to.equal(false);
expect(model.get('fullWidth')).to.equal(false);
expect(model.get('width')).to.equal('1234px');
expect(model.get('height')).to.equal('2345px');
expect(model.get('styles.block.textAlign')).to.equal('right');
@ -182,8 +182,8 @@ define([
it('updates the model when padding changes', function () {
var newValue = 'false';
view.$('.mailpoet_field_image_padded').prop('checked', false).change();
expect(model.get('padded')).to.equal(false);
view.$('.mailpoet_field_image_full_width').prop('checked', false).change();
expect(model.get('fullWidth')).to.equal(false);
});
it.skip('closes the sidepanel after "Done" is clicked', function() {

View File

@ -74,7 +74,7 @@ define([
});
it('has image specific alignment', function () {
expect(model.get('imagePadded')).to.be.a('boolean');
expect(model.get('imageFullWidth')).to.be.a('boolean');
});
it('has an option to display author', function () {
@ -129,7 +129,7 @@ define([
titlePosition: 'aboveBlock', // 'inTextBlock'|'aboveBlock',
titleAlignment: 'right', // 'left'|'center'|'right'
titleIsLink: true, // false|true
imagePadded: false, // true|false
imageFullWidth: false, // true|false
//imageAlignment: 'right', // 'centerFull'|'centerPadded'|'left'|'right'|'alternate'|'none'
showAuthor: 'belowText', // 'no'|'aboveText'|'belowText'
authorPrecededBy: 'Custom config author preceded by',
@ -176,7 +176,7 @@ define([
expect(model.get('titlePosition')).to.equal('aboveBlock');
expect(model.get('titleAlignment')).to.equal('right');
expect(model.get('titleIsLink')).to.equal(true);
expect(model.get('imagePadded')).to.equal(false);
expect(model.get('imageFullWidth')).to.equal(false);
expect(model.get('showAuthor')).to.equal('belowText');
expect(model.get('authorPrecededBy')).to.equal('Custom config author preceded by');
expect(model.get('showCategories')).to.equal('belowText');
@ -318,8 +318,8 @@ define([
it('changes the model if image alignment changes', function () {
var newValue = false;
view.$('.mailpoet_posts_image_padded').val(newValue).change();
expect(model.get('imagePadded')).to.equal(newValue);
view.$('.mailpoet_posts_image_full_width').val(newValue).change();
expect(model.get('imageFullWidth')).to.equal(newValue);
});
it('changes the model if show author changes', function () {

View File

@ -44,7 +44,7 @@
"link": "",
"src": "http://test.mailpoet.net/wp-content/uploads/2015/12/660.png",
"alt": "660",
"padded": true,
"fullWidth": false,
"width": "660px",
"height": "250px",
"styles": {
@ -199,7 +199,7 @@
"link": "http://example.org",
"src": "http://test.mailpoet.net/wp-content/uploads/2015/12/660.png",
"alt": "660",
"padded": false,
"fullWidth": true,
"width": "660px",
"height": "250px",
"styles": {
@ -235,7 +235,7 @@
"link": "",
"src": "http://test.mailpoet.net/wp-content/uploads/2015/12/330x125.png",
"alt": "330x125",
"padded": true,
"fullWidth": false,
"width": "330px",
"height": "125px",
"styles": {
@ -390,7 +390,7 @@
"link": "http://example.org",
"src": "http://test.mailpoet.net/wp-content/uploads/2015/12/330x125.png",
"alt": "330x125",
"padded": false,
"fullWidth": true,
"width": "330px",
"height": "125px",
"styles": {
@ -415,7 +415,7 @@
"link": "",
"src": "http://test.mailpoet.net/wp-content/uploads/2015/12/330x125-copy-150x57.png",
"alt": "330x125 copy",
"padded": true,
"fullWidth": false,
"width": "150px",
"height": "57px",
"styles": {
@ -561,7 +561,7 @@
"link": "http://example.org",
"src": "http://test.mailpoet.net/wp-content/uploads/2015/12/330x125.png",
"alt": "330x125",
"padded": false,
"fullWidth": true,
"width": "330px",
"height": "125px",
"styles": {
@ -606,7 +606,7 @@
"link": "",
"src": "http://test.mailpoet.net/wp-content/uploads/2015/12/220x83-copy.png",
"alt": "220x83 copy",
"padded": true,
"fullWidth": false,
"width": "100px",
"height": "38px",
"styles": {
@ -761,7 +761,7 @@
"link": "",
"src": "http://test.mailpoet.net/wp-content/uploads/2015/12/220x83.png",
"alt": "220x83",
"padded": false,
"fullWidth": true,
"width": "220px",
"height": "83px",
"styles": {
@ -786,7 +786,7 @@
"link": "",
"src": "http://test.mailpoet.net/wp-content/uploads/2015/12/220x83.png",
"alt": "220x83",
"padded": true,
"fullWidth": false,
"width": "220px",
"height": "83px",
"styles": {
@ -941,7 +941,7 @@
"link": "http://example.org",
"src": "http://test.mailpoet.net/wp-content/uploads/2015/12/220x83.png",
"alt": "220x83",
"padded": false,
"fullWidth": true,
"width": "220px",
"height": "83px",
"styles": {
@ -966,7 +966,7 @@
"link": "",
"src": "http://test.mailpoet.net/wp-content/uploads/2015/12/220x83.png",
"alt": "220x83",
"padded": true,
"fullWidth": false,
"width": "220px",
"height": "83px",
"styles": {
@ -1121,7 +1121,7 @@
"link": "http://example.org",
"src": "http://test.mailpoet.net/wp-content/uploads/2015/12/220x83.png",
"alt": "220x83",
"padded": false,
"fullWidth": true,
"width": "220px",
"height": "83px",
"styles": {
@ -1215,4 +1215,4 @@
"backgroundColor": "#333333"
}
}
}
}

View File

@ -925,7 +925,7 @@
titlePosition: 'inTextBlock', // 'inTextBlock'|'aboveBlock',
titleAlignment: 'left', // 'left'|'center'|'right'
titleIsLink: false, // false|true
imagePadded: true, // true|false
imageFullWidth: false, // true|false
showAuthor: 'no', // 'no'|'aboveText'|'belowText'
authorPrecededBy: '<%= __('Author:') %>',
showCategories: 'no', // 'no'|'aboveText'|'belowText'
@ -1028,7 +1028,7 @@
'newsletter_editor/pigeon.png'
) %>',
alt: '<%= __('An image of...') %>',
padded: true,
fullWidth: false,
width: '281px',
height: '190px',
styles: {
@ -1047,7 +1047,7 @@
titlePosition: 'inTextBlock', // 'inTextBlock'|'aboveBlock',
titleAlignment: 'left', // 'left'|'center'|'right'
titleIsLink: false, // false|true
imagePadded: true, // true|false
imageFullWidth: false, // true|false
showAuthor: 'no', // 'no'|'aboveText'|'belowText'
authorPrecededBy: '<%= __('Author:') %>',
showCategories: 'no', // 'no'|'aboveText'|'belowText'

View File

@ -156,14 +156,14 @@
<div class="mailpoet_form_field_title"><%= __('Image width') %></div>
<div class="mailpoet_form_field_radio_option">
<label>
<input type="radio" name="imagePadded" class="mailpoet_automated_latest_content_image_padded" value="true" {{#if model.imagePadded}}CHECKED{{/if}}/>
<%= __('With padding') %>
<input type="radio" name="imageFullWidth" class="mailpoet_automated_latest_content_image_full_width" value="true" {{#if model.imageFullWidth}}CHECKED{{/if}}/>
<%= __('Full width') %>
</label>
</div>
<div class="mailpoet_form_field_radio_option">
<label>
<input type="radio" name="imagePadded" class="mailpoet_automated_latest_content_image_padded" value="false" {{#unless model.imagePadded}}CHECKED{{/unless}}/>
<%= __('Full width') %>
<input type="radio" name="imageFullWidth" class="mailpoet_automated_latest_content_image_full_width" value="false" {{#unless model.imageFullWidth}}CHECKED{{/unless}}/>
<%= __('Padded') %>
</label>
</div>
</div>

View File

@ -26,8 +26,8 @@
<div class="mailpoet_form_field">
<div class="mailpoet_form_field_checkbox_option">
<label>
<input type="checkbox" name="padded" class="mailpoet_field_image_padded" value="true" {{#if padded}}CHECKED{{/if}}/>
<%= __('With padding') %>
<input type="checkbox" name="fullWidth" class="mailpoet_field_image_full_width" value="true" {{#if fullWidth }}CHECKED{{/if}}/>
<%= __('Full width') %>
</label>
</div>
</div>

View File

@ -110,14 +110,14 @@
<div class="mailpoet_form_field_title"><%= __('Image width') %></div>
<div class="mailpoet_form_field_radio_option">
<label>
<input type="radio" name="imagePadded" class="mailpoet_posts_image_padded" value="true" {{#if model.imagePadded}}CHECKED{{/if}}/>
<%= __('With padding') %>
<input type="radio" name="imageFullWidth" class="mailpoet_posts_image_full_width" value="true" {{#if model.imageFullWidth}}CHECKED{{/if}}/>
<%= __('Full width') %>
</label>
</div>
<div class="mailpoet_form_field_radio_option">
<label>
<input type="radio" name="imagePadded" class="mailpoet_posts_image_padded" value="false" {{#unless model.imagePadded}}CHECKED{{/unless}}/>
<%= __('Full width') %>
<input type="radio" name="imageFullWidth" class="mailpoet_posts_image_full_width" value="false" {{#unless model.imageFullWidth}}CHECKED{{/unless}}/>
<%= __('Padded') %>
</label>
</div>
</div>