diff --git a/app/Resources/public/css/custompage.css b/app/Resources/public/css/custompage.css new file mode 100644 index 0000000000..289fd0f529 --- /dev/null +++ b/app/Resources/public/css/custompage.css @@ -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; +} \ No newline at end of file diff --git a/app/Resources/public/css/themes/chamilo/custompage.css b/app/Resources/public/css/themes/chamilo/custompage.css index b480a87f50..289fd0f529 100644 --- a/app/Resources/public/css/themes/chamilo/custompage.css +++ b/app/Resources/public/css/themes/chamilo/custompage.css @@ -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 { --primary-color: #486F88; --success-color: #16D090; @@ -13,7 +11,6 @@ body { line-height: 1.5; color: #212529; background-color: #fff; - font-family: 'Lato', sans-serif; } .custompage .limiter { width: 100%; diff --git a/custompages/index-unlogged-dist.php b/custompages/index-unlogged-dist.php index 656e501346..002b7be828 100644 --- a/custompages/index-unlogged-dist.php +++ b/custompages/index-unlogged-dist.php @@ -5,11 +5,11 @@ * * @package chamilo.custompages */ -require_once api_get_path(SYS_PATH).'main/inc/global.inc.php'; -require_once __DIR__.'/language.php'; +require_once api_get_path(SYS_PATH) . 'main/inc/global.inc.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. @@ -45,13 +45,12 @@ $flash = Display::getFlashToString(); Display::cleanFlashMessages(); 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); } -$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('mgs_flash', $flash); -$template->assign('section_name', $this_section); $layout = $template->get_template('custompage/login.tpl'); $content = $template->fetch($layout); diff --git a/custompages/lostpassword-dist.php b/custompages/lostpassword-dist.php index 6cdeaee095..dc1d79470e 100644 --- a/custompages/lostpassword-dist.php +++ b/custompages/lostpassword-dist.php @@ -5,10 +5,10 @@ * * @package chamilo.custompages */ -require_once api_get_path(SYS_PATH).'main/inc/global.inc.php'; -require_once __DIR__.'/language.php'; +require_once api_get_path(SYS_PATH) . 'main/inc/global.inc.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; diff --git a/custompages/registration-dist.php b/custompages/registration-dist.php index db6502a23c..1f6ed1429f 100644 --- a/custompages/registration-dist.php +++ b/custompages/registration-dist.php @@ -8,10 +8,10 @@ * * @package chamilo.custompages */ -require_once api_get_path(SYS_PATH).'main/inc/global.inc.php'; -require_once __DIR__.'/language.php'; +require_once api_get_path(SYS_PATH) . 'main/inc/global.inc.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. diff --git a/main/auth/inscription.php b/main/auth/inscription.php index d29e8b4930..60ffac5406 100755 --- a/main/auth/inscription.php +++ b/main/auth/inscription.php @@ -629,7 +629,7 @@ if ($allowDoubleValidation && $showTerms == false) { $user_already_registered_show_terms || $showTerms ) { - $form->addButton('register',get_lang('RegisterUser'),null,'primary','btn-block'); + $form->addButton('register', get_lang('RegisterUser'), null, 'primary', 'btn-block'); $formContainsSendButton = true; } } diff --git a/main/auth/lostPassword.php b/main/auth/lostPassword.php index f685486717..13bafb450c 100755 --- a/main/auth/lostPassword.php +++ b/main/auth/lostPassword.php @@ -41,7 +41,7 @@ if ($reset && $userId) { exit; } -$form = new FormValidator('lost_password','post','','',[],FormValidator::LAYOUT_GRID); +$form = new FormValidator('lost_password', 'post', '', '', [], FormValidator::LAYOUT_GRID); $form->addHeader($tool_name); $form->addText( 'user', @@ -82,7 +82,7 @@ if ($allowCaptcha) { $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()) { $values = $form->exportValues(); diff --git a/main/inc/lib/template.lib.php b/main/inc/lib/template.lib.php index 6edc0a2ccb..264b8c4632 100755 --- a/main/inc/lib/template.lib.php +++ b/main/inc/lib/template.lib.php @@ -663,9 +663,11 @@ class Template } } 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)) { - $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'; } }