Disable configure_homepage.php replaced by page blocks

Fix templates
pull/2715/head
Julio Montoya 7 years ago
parent 36446091c6
commit 3c6fa9fddd
  1. 2
      main/admin/configure_homepage.php
  2. 65
      main/admin/email_tester.php
  3. 3
      main/admin/index.php
  4. 2
      main/template/default/admin/email_tester.html.twig
  5. 2
      main/template/default/skill/list.html.twig

@ -1,6 +1,8 @@
<?php
/* For licensing terms, see /license.txt */
// Replaced by page blocks
exit;
/**
* Configure the portal homepage (manages multi-urls and languages).
*

@ -0,0 +1,65 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Index page of the admin tools.
*
* @package chamilo.admin
*/
// Resetting the course id.
$cidReset = true;
// Including some necessary chamilo files.
require_once __DIR__.'/../inc/global.inc.php';
api_protect_admin_script();
// Setting the section (for the tabs).
$this_section = SECTION_PLATFORM_ADMIN;
$toolName = get_lang('EMailTester');
$form = new FormValidator('email_tester');
$form->addText('destination', get_lang('Destination'), true, ['cols-size' => [2, 8, 2]]);
$form->addText('subject', get_lang('Subject'), true, ['cols-size' => [2, 8, 2]]);
$form->addHtmlEditor(
'content',
get_lang('Message'),
true,
false,
['ToolbarSet' => 'Minimal', 'cols-size' => [2, 8, 2]]
);
$form->addButtonSend(get_lang('SendMessage'), 'submit', false, ['cols-size' => [2, 8, 2]]);
$errorsInfo = MessageManager::failedSentMailErrors();
if ($form->validate()) {
$values = $form->exportValues();
$user = api_get_user_entity(api_get_user_id());
$mailIsSent = api_mail_html(
get_lang('UserTestingEMailConf'),
$values['destination'],
$values['subject'],
$values['content'],
UserManager::formatUserFullName($user),
$user->getEmail()
);
Display::addFlash(
Display::return_message(get_lang('MailingTestSent'), 'success')
);
header('Location: '.api_get_self());
exit;
}
$view = new Template($toolName);
$view->assign('form', $form->returnForm());
$view->assign('errors', $errorsInfo);
$template = $view->get_template('admin/email_tester.tpl');
$content = $view->fetch($template);
$view->assign('header', $toolName);
$view->assign('content', $content);
$view->display_one_col_template();

@ -204,7 +204,8 @@ if (api_is_platform_admin()) {
'url' => api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=admin',
'label' => get_lang('GlobalAgenda'),
];
$items[] = ['url' => 'configure_homepage.php', 'label' => get_lang('ConfigureHomePage')];
// Replaced by page blocks
//$items[] = ['url' => 'configure_homepage.php', 'label' => get_lang('ConfigureHomePage')];
$items[] = ['url' => 'configure_inscription.php', 'label' => get_lang('ConfigureInscription')];
$items[] = ['url' => 'statistics/index.php', 'label' => get_lang('Statistics')];
$items[] = [

@ -1,3 +1,4 @@
{% autoescape false %}
<div class="row">
{% if errors is empty %}
<div class="col-md-12">
@ -21,3 +22,4 @@
{% endif %}
</div>
{% endautoescape %}

@ -1,3 +1,4 @@
{% autoescape false %}
{% if tags %}
<div class="row">
<div class="col-md-3" >
@ -78,3 +79,4 @@
});
});
</script>
{% endautoescape %}
Loading…
Cancel
Save