pull/3619/head
Alex Aragon 5 years ago
parent 480e103cdf
commit 68ee8f319e
  1. 80
      app/Resources/public/css/custompage.css
  2. 3
      app/Resources/public/css/themes/chamilo/custompage.css
  3. 11
      custompages/index-unlogged-dist.php
  4. 6
      custompages/lostpassword-dist.php
  5. 6
      custompages/registration-dist.php
  6. 2
      main/auth/inscription.php
  7. 4
      main/auth/lostPassword.php
  8. 6
      main/inc/lib/template.lib.php

@ -0,0 +1,80 @@
:root {
--primary-color: #486F88;
--success-color: #16D090;
}
body, html {
height: 100%;
}
body {
margin: 0;
line-height: 1.5;
color: #212529;
background-color: #fff;
}
.custompage .limiter {
width: 100%;
margin: 0 auto;
}
.custompage .container-login {
width: 100%;
min-height: 100vh;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
padding: 15px;
background: #f2f2f2;
}
.custompage .wrap-login {
background: #fff;
border-radius: 10px;
padding: 30px 45px;
box-shadow: 0 12px 26px rgba(16, 30, 115, 0.06);
}
.custompage .width-login{
width: 390px;
}
.custompage .width-register{
width: 690px;
}
.custompage h3.title, legend{
font-weight: 900;
font-size: 24px;
color: #486F88;
padding: 1rem 0;
}
.custompage label{
color: #486F88;
font-weight: 400;
}
.custompage .form-control,
.custompage .bootstrap-select .dropdown-toggle.btn-default{
border: 2px solid #B3C8D7;
}
.custompage .last-password{
padding: 2.5rem 0;
text-align: center;
}
.btn-primary {
color: #fff;
background-color: var(--primary-color);
border-color: var(--primary-color);;
text-transform: uppercase;
font-weight: bold;
}
.btn-success {
color: #fff;
background-color: var(--success-color);
border-color: var(--success-color);
text-transform: uppercase;
font-weight: bold;
}
.custompage .software-name{
text-align: center;
padding: 2rem 0;
margin-top: 1rem;
display: inline-block;
width: 100%;
font-size: 12px;
}

@ -1,5 +1,3 @@
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap');
:root { :root {
--primary-color: #486F88; --primary-color: #486F88;
--success-color: #16D090; --success-color: #16D090;
@ -13,7 +11,6 @@ body {
line-height: 1.5; line-height: 1.5;
color: #212529; color: #212529;
background-color: #fff; background-color: #fff;
font-family: 'Lato', sans-serif;
} }
.custompage .limiter { .custompage .limiter {
width: 100%; width: 100%;

@ -5,11 +5,11 @@
* *
* @package chamilo.custompages * @package chamilo.custompages
*/ */
require_once api_get_path(SYS_PATH).'main/inc/global.inc.php'; require_once api_get_path(SYS_PATH) . 'main/inc/global.inc.php';
require_once __DIR__.'/language.php'; require_once __DIR__ . '/language.php';
$template = new Template(get_lang('SignIn'),false,false,false,false,true,true); $template = new Template(get_lang('SignIn'), false, false, false, false, true, true);
/** /**
* Homemade micro-controller. * Homemade micro-controller.
@ -45,13 +45,12 @@ $flash = Display::getFlashToString();
Display::cleanFlashMessages(); Display::cleanFlashMessages();
if (api_get_setting('allow_registration') === 'true') { if (api_get_setting('allow_registration') === 'true') {
$urlRegister = api_get_path(WEB_CODE_PATH).'auth/inscription.php?language='.api_get_interface_language(); $urlRegister = api_get_path(WEB_CODE_PATH) . 'auth/inscription.php?language=' . api_get_interface_language();
$template->assign('url_register', $urlRegister); $template->assign('url_register', $urlRegister);
} }
$urlLostPassword = api_get_path(WEB_CODE_PATH).'auth/lostPassword.php?language='.api_get_interface_language(); $urlLostPassword = api_get_path(WEB_CODE_PATH) . 'auth/lostPassword.php?language=' . api_get_interface_language();
$template->assign('url_lost_password', $urlLostPassword); $template->assign('url_lost_password', $urlLostPassword);
$template->assign('mgs_flash', $flash); $template->assign('mgs_flash', $flash);
$template->assign('section_name', $this_section);
$layout = $template->get_template('custompage/login.tpl'); $layout = $template->get_template('custompage/login.tpl');
$content = $template->fetch($layout); $content = $template->fetch($layout);

@ -5,10 +5,10 @@
* *
* @package chamilo.custompages * @package chamilo.custompages
*/ */
require_once api_get_path(SYS_PATH).'main/inc/global.inc.php'; require_once api_get_path(SYS_PATH) . 'main/inc/global.inc.php';
require_once __DIR__.'/language.php'; require_once __DIR__ . '/language.php';
$template = new Template(get_lang('LostPassword'),false,false,false,false,true,true); $template = new Template(get_lang('LostPassword'), false, false, false, false, true, true);
$error = null; $error = null;

@ -8,10 +8,10 @@
* *
* @package chamilo.custompages * @package chamilo.custompages
*/ */
require_once api_get_path(SYS_PATH).'main/inc/global.inc.php'; require_once api_get_path(SYS_PATH) . 'main/inc/global.inc.php';
require_once __DIR__.'/language.php'; require_once __DIR__ . '/language.php';
$template = new Template(get_lang('Registration'),false,false,false,false,true,true); $template = new Template(get_lang('Registration'), false, false, false, false, true, true);
/** /**
* Removes some unwanted elementend of the form object. * Removes some unwanted elementend of the form object.

@ -629,7 +629,7 @@ if ($allowDoubleValidation && $showTerms == false) {
$user_already_registered_show_terms || $user_already_registered_show_terms ||
$showTerms $showTerms
) { ) {
$form->addButton('register',get_lang('RegisterUser'),null,'primary','btn-block'); $form->addButton('register', get_lang('RegisterUser'), null, 'primary', 'btn-block');
$formContainsSendButton = true; $formContainsSendButton = true;
} }
} }

@ -41,7 +41,7 @@ if ($reset && $userId) {
exit; exit;
} }
$form = new FormValidator('lost_password','post','','',[],FormValidator::LAYOUT_GRID); $form = new FormValidator('lost_password', 'post', '', '', [], FormValidator::LAYOUT_GRID);
$form->addHeader($tool_name); $form->addHeader($tool_name);
$form->addText( $form->addText(
'user', 'user',
@ -82,7 +82,7 @@ if ($allowCaptcha) {
$form->addRule('captcha', get_lang('TheTextYouEnteredDoesNotMatchThePicture'), 'CAPTCHA', $captcha_question); $form->addRule('captcha', get_lang('TheTextYouEnteredDoesNotMatchThePicture'), 'CAPTCHA', $captcha_question);
} }
$form->addButtonSend(get_lang('Send'),'submit',false,[],'btn-block',null); $form->addButtonSend(get_lang('Send'), 'submit', false, [], 'btn-block', null);
if ($form->validate()) { if ($form->validate()) {
$values = $form->exportValues(); $values = $form->exportValues();

@ -663,9 +663,11 @@ class Template
} }
} }
if (CustomPages::enabled()) { if (CustomPages::enabled()) {
$cssCustomPage = api_get_path(SYS_CSS_PATH) . $this->themeDir . "custompage.css"; $cssCustomPage = api_get_path(SYS_CSS_PATH).$this->themeDir."custompage.css";
if (is_file($cssCustomPage)) { if (is_file($cssCustomPage)) {
$css[] = api_get_path(WEB_CSS_PATH) . $this->themeDir . 'custompage.css'; $css[] = api_get_path(WEB_CSS_PATH).$this->themeDir.'custompage.css';
} else {
$css[] = api_get_path(WEB_CSS_PATH).'custompage.css';
} }
} }

Loading…
Cancel
Save