Skip to content
Snippets Groups Projects

dev#160166 : CkEditor placeholders plugin

Merged Alex Arnaud requested to merge dev#160166_newsletters_placeholders into master
Compare and Show latest version
2 files
+ 68
43
Preferences
Compare changes
Files
2
@@ -46,6 +46,32 @@ class ZendAfi_Form_Admin_Newsletter extends ZendAfi_Form {
->addElement('checkbox', 'draft',
['label' => $this->_('Brouillon ?')])
->addElement('radio',
'display_full_article',
['label' => $this->_('Afficher articles en intégralité'),
'value' => $datas['display_full_article'] ?? 0,
'separator' => '',
'multiOptions' => [ '1' => $this->_('Oui'),
'0' => $this->_('Non')
]
])
->addElement('radio',
'render_with_widget',
['label' => $this->_('Afficher comme sur le site'),
'value' => $datas['render_with_widget'] ?? 0,
'separator' => '',
'multiOptions' => [ '1' => $this->_('Oui'),
'0' => $this->_('Non')
]
])
->addElement('userfile',
'custom_css',
['label' => $this->_('Css personnalisée'),
'value' => $datas['custom_css'] ?? '',
])
->addElement('ckeditor', 'contenu',
['required' => true,
'allowEmpty' => false])
@@ -69,7 +95,7 @@ class ZendAfi_Form_Admin_Newsletter extends ZendAfi_Form {
'validators' => [new Zend_Validate_Int()]])
->addDisplayGroup(['titre', 'mail_subject', 'expediteur', 'draft'],
->addDisplayGroup(['titre', 'mail_subject', 'expediteur', 'draft', 'render_with_widget','display_full_article', 'custom_css'],
'letter',
['legend' => $this->_('Lettre')])
@@ -87,31 +113,6 @@ class ZendAfi_Form_Admin_Newsletter extends ZendAfi_Form {
parent::populate($datas);
$this
->addElement('radio',
'display_full_article',
['label' => $this->_('Afficher articles en intégralité'),
'value' => $datas['display_full_article'] ?? 0,
'separator' => '',
'multiOptions' => [ '1' => $this->_('Oui'),
'0' => $this->_('Non')
]
])
->addElement('radio',
'render_with_widget',
['label' => $this->_('Afficher comme sur le site'),
'value' => $datas['render_with_widget'] ?? 0,
'separator' => '',
'multiOptions' => [ '1' => $this->_('Oui'),
'0' => $this->_('Non')
]
])
->addElement('userfile',
'custom_css',
['label' => $this->_('Css personnalisée'),
'value' => $datas['custom_css'] ?? '',
])
->addElement('treeSelect',
'articles_selector',
@@ -137,7 +138,7 @@ class ZendAfi_Form_Admin_Newsletter extends ZendAfi_Form {
]);
$this->addDisplayGroup(['render_with_widget','display_full_article','custom_css','articles_selector'],
$this->addDisplayGroup(['articles_selector'],
'articles',
['legend' => $this->_('Articles')]);
return $this;