Minor - format code

pull/2729/head
Julio Montoya 7 years ago
parent 501dcbe38a
commit e965b5dd45
  1. 2
      main/inc/ajax/mail.ajax.php
  2. 6
      main/inc/lib/MailTemplateManager.php
  3. 19
      main/mail_template/list.php
  4. 2
      plugin/customcertificate/src/CustomCertificatePlugin.php

@ -15,5 +15,3 @@ switch ($action) {
echo $item['template'];
break;
}

@ -18,11 +18,9 @@ class MailTemplateManager extends Model
'default_template',
'created_at',
'updated_at',
'author_id'
'author_id',
];
/**
*/
public function __construct()
{
parent::__construct();
@ -69,7 +67,7 @@ class MailTemplateManager extends Model
'',
'32'
).'</a>';
$html .='</div>';
$html .= '</div>';
$html .= Display::grid_html('mail_template');
return $html;

@ -62,14 +62,14 @@ switch ($action) {
// The validation or display
if ($form->validate()) {
//if ($check) {
$values = $form->exportValues();
$values['template'] = $values['email_template'];
$res = $mailTemplate->update($values);
if ($res) {
Display::addFlash(
$values = $form->exportValues();
$values['template'] = $values['email_template'];
$res = $mailTemplate->update($values);
if ($res) {
Display::addFlash(
Display::return_message(get_lang('ItemUpdated').': '.$values['name'], 'confirm')
);
}
}
//}
header('Location: '.api_get_self());
exit;
@ -78,7 +78,7 @@ switch ($action) {
case 'delete':
$mailTemplate->delete($id);
Display::addFlash(
Display::return_message(get_lang('Deleted'),'confirm')
Display::return_message(get_lang('Deleted'), 'confirm')
);
header('Location: '.api_get_self());
exit;
@ -86,7 +86,7 @@ switch ($action) {
case 'set_default':
$mailTemplate->setDefault($id);
Display::addFlash(
Display::return_message(get_lang('Updated'),'confirm')
Display::return_message(get_lang('Updated'), 'confirm')
);
header('Location: '.api_get_self());
break;
@ -116,7 +116,7 @@ switch ($action) {
'index' => 'default_template',
'width' => '100',
'align' => 'left',
'hidden' => 'true'
'hidden' => 'true',
],
[
'name' => 'actions',
@ -131,7 +131,6 @@ switch ($action) {
//$extra_params['editurl'] = $url; //use the width of the parent
$extra_params['height'] = 'auto'; //use the width of the parent
//With this function we can add actions to the jgrid
$action_links = 'function action_formatter (cellvalue, options, rowObject) {

@ -205,7 +205,7 @@ class CustomCertificatePlugin extends Plugin
/**
* Get certificate data.
*
* @param int $id The certificate
* @param int $id The certificate
* @param int $userId
*
* @return array

Loading…
Cancel
Save