From 7d9b69c0269f70b34e943e8f10f6ae0e87b82316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be> Date: Tue, 18 Jul 2017 17:03:46 +0200 Subject: [PATCH] Small changes to PR about login screen --- html/class_passwordRecovery.inc | 14 +++++--------- html/index.php | 13 +++++-------- ihtml/themes/breezy/copynotice.tpl | 3 +++ ihtml/themes/breezy/login.tpl | 13 ++++++------- ihtml/themes/breezy/recovery.tpl | 17 ++++++++--------- ihtml/themes/breezy/setup_header.tpl | 7 ------- plugins/generic/welcome/welcome.tpl | 5 +---- 7 files changed, 28 insertions(+), 44 deletions(-) create mode 100644 ihtml/themes/breezy/copynotice.tpl diff --git a/html/class_passwordRecovery.inc b/html/class_passwordRecovery.inc index 961680558..e6df4fd4c 100644 --- a/html/class_passwordRecovery.inc +++ b/html/class_passwordRecovery.inc @@ -146,16 +146,12 @@ class standAlonePage { /* Check for old files in compile directory */ clean_smarty_compile_dir($smarty->compile_dir); - $smarty->assign('password_img', 'geticon.php?context=status&icon=dialog-password&size=48'); - $smarty->assign('mail_img', 'geticon.php?context=applications&icon=internet-mail&size=48'); - $smarty->assign('directory_img', "geticon.php?context=places&icon=network-server&size=48"); - $smarty->assign('personal_img', "geticon.php?context=types&icon=user&size=48"); - $smarty->assign('date', gmdate("D, d M Y H:i:s")); - $smarty->assign('params', ""); - $smarty->assign('message', ""); - $smarty->assign('changed', FALSE); + $smarty->assign('date', gmdate('D, d M Y H:i:s')); + $smarty->assign('params', ''); + $smarty->assign('message', ''); + $smarty->assign('changed', FALSE); $smarty->assign('revision', FD_VERSION); - $smarty->assign('year', date('Y')); + $smarty->assign('year', date('Y')); } function checkForSSL() diff --git a/html/index.php b/html/index.php index 6a463ef7a..a7d22b7eb 100644 --- a/html/index.php +++ b/html/index.php @@ -38,14 +38,11 @@ function displayLogin() if (isset($_POST['username'])) { $username = trim($_POST['username']); } - $smarty->assign ('date', gmdate("D, d M Y H:i:s")); - $smarty->assign ('username', $username); - $smarty->assign ('personal_img', "geticon.php?context=types&icon=user&size=48"); - $smarty->assign ('password_img', "geticon.php?context=status&icon=dialog-password&size=48"); - $smarty->assign ('directory_img', "geticon.php?context=places&icon=network-server&size=48"); - $smarty->assign ('revision', FD_VERSION); - $smarty->assign ('year', date('Y')); - $smarty->append ('css_files', get_template_path('login.css')); + $smarty->assign ('date', gmdate('D, d M Y H:i:s')); + $smarty->assign ('username', $username); + $smarty->assign ('revision', FD_VERSION); + $smarty->assign ('year', date('Y')); + $smarty->append ('css_files', get_template_path('login.css')); /* Some error to display? */ if (!isset($message)) { diff --git a/ihtml/themes/breezy/copynotice.tpl b/ihtml/themes/breezy/copynotice.tpl new file mode 100644 index 000000000..f6651b5c4 --- /dev/null +++ b/ihtml/themes/breezy/copynotice.tpl @@ -0,0 +1,3 @@ +<div class="copynotice"> + {t escape=no 1=$year 2=$revision}© 2002-%1 <a href="http://www.fusiondirectory.org">The FusionDirectory team, %2</a>{/t} +</div> diff --git a/ihtml/themes/breezy/login.tpl b/ihtml/themes/breezy/login.tpl index fc42199c0..8ca4e47b7 100644 --- a/ihtml/themes/breezy/login.tpl +++ b/ihtml/themes/breezy/login.tpl @@ -1,6 +1,7 @@ <body> {$php_errors} + {include file={filePath file="setup_header.tpl"}} {* FusionDirectory login - smarty template *} @@ -12,7 +13,7 @@ {$msg_dialogs} <div id="window-titlebar"> <p> - {t}FusionDirectory{/t} + {t}Login{/t} </p> </div> <div id="window-content"> @@ -25,20 +26,20 @@ <div> <label for="username"> - <img class="center" src="{$personal_img|escape}" alt="{t}Username{/t}" title="{t}Username{/t}"/> + <img class="center" src="geticon.php?context=types&icon=user&size=48" alt="{t}Username{/t}" title="{t}Username{/t}"/> </label> <input type="text" name="username" id="username" value="{$username|escape}" title="{t}Username{/t}" /> <br /> <br /> <label for="password"> - <img class="center" src="{$password_img|escape}" alt="{t}Password{/t}" title="{t}Password{/t}" /> + <img class="center" src="geticon.php?context=status&icon=dialog-password&size=48" alt="{t}Password{/t}" title="{t}Password{/t}" /> </label> <input type="password" name="password" id="password" value="" title="{t}Password{/t}"/> <br /> <a href="recovery.php">{t}I forgot my password{/t}</a> </div> <div> - <img class="center" src="{$directory_img|escape}" alt="{t}Directory{/t}" title="{t}Directory{/t}" /> + <img class="center" src="geticon.php?context=places&icon=network-server&size=48" alt="{t}Directory{/t}" title="{t}Directory{/t}" /> <select name="server" title="{t}Directory{/t}" onchange="javascript:document.loginform.submit();"> {html_options options=$server_options selected=$server_id} </select> @@ -75,9 +76,7 @@ </div> -<div class="copynotice"> - © 2002-{$year} <a href="http://www.fusionDirectory.org">{t}The FusionDirectory team{/t}, {$revision}</a> -</div> +{include file={filePath file="copynotice.tpl"}} <script type="text/javascript"> <!-- diff --git a/ihtml/themes/breezy/recovery.tpl b/ihtml/themes/breezy/recovery.tpl index f1c4d2cc5..7a9b61f03 100644 --- a/ihtml/themes/breezy/recovery.tpl +++ b/ihtml/themes/breezy/recovery.tpl @@ -1,6 +1,7 @@ <body onLoad="javascript:$$('div.debug_div').each(function (a) { a.hide(); });"> {* FusionDirectory recovery - smarty template *} {$php_errors} + {include file={filePath file="setup_header.tpl"}} {$msg_dialogs} <div id="window-container"> @@ -39,17 +40,17 @@ <br/> <div style="text-align: center;"> <label for="login"> - <img class="center" src="{$personal_img|escape}" alt="{t}Username{/t}" title="{t}Username{/t}"/> + <img class="center" src="geticon.php?context=types&icon=user&size=48" alt="{t}Username{/t}" title="{t}Username{/t}"/> </label> <input type="text" name="login" value="{$login}" title="{t}Username{/t}" readonly /> <br /> <label for="new_password"> - <img class="center" src="{$password_img|escape}" alt="{t}New password{/t}" title="{t}New password{/t}"/> + <img class="center" src="geticon.php?context=status&icon=dialog-password&size=48" alt="{t}New password{/t}" title="{t}New password{/t}"/> </label> <input type="password" name="new_password" id="new_password" value="" title="{t}New password{/t}" onkeyup="testPasswordCss(document.getElementById('new_password').value);" /> <br /> <label for="new_password_repeated"> - <img class="center" src="{$password_img|escape}" alt="{t}New password repeated{/t}" title="{t}New password repeated{/t}"/> + <img class="center" src="geticon.php?context=status&icon=dialog-password&size=48" alt="{t}New password repeated{/t}" title="{t}New password repeated{/t}"/> </label> <input type="password" name="new_password_repeated" id="new_password_repeated" maxlength="40" value="" title="{t}New password repeated{/t}" /> <br> @@ -60,7 +61,7 @@ </div> {if $show_directory_chooser} <div> - <img class="center" src="{$directory_img|escape}" alt="{t}Directory{/t}" title="{t}Directory{/t}" /> + <img class="center" src="geticon.php?context=places&icon=network-server&size=48" alt="{t}Directory{/t}" title="{t}Directory{/t}" /> <select name="server" title="{t}Directory{/t}" onchange="javascript:document.loginform.submit();"> {html_options options=$server_options selected=$server_id} </select> @@ -90,13 +91,13 @@ <div> <label for="email_address"> - <img class="center" src="{$mail_img|escape}" alt="{t}Email address{/t}" title="{t}Email address{/t}" /> + <img class="center" src="geticon.php?context=applications&icon=internet-mail&size=48" alt="{t}Email address{/t}" title="{t}Email address{/t}" /> </label> <input type="text" name="email_address" id="email_address" value="{$email_address}" title="{t}Email{/t}" onFocus=""/> </div> {if $show_directory_chooser} <div> - <img class="center" src="{$directory_img|escape}" alt="{t}Directory{/t}" title="{t}Directory{/t}" /> + <img class="center" src="geticon.php?context=places&icon=network-server&size=48" alt="{t}Directory{/t}" title="{t}Directory{/t}" /> <select name="server" title="{t}Directory{/t}" onchange="javascript:document.loginform.submit();"> {html_options options=$server_options selected=$server_id} </select> @@ -124,9 +125,7 @@ </form> </div> </div> -<div class="copynotice"> - © 2002-{$year} <a href="http://www.fusionDirectory.org">{t}The FusionDirectory team{/t}, {$revision}</a> -</div> +{include file={filePath file="copynotice.tpl"}} <!-- Place cursor in email field --> <script type="text/javascript"> diff --git a/ihtml/themes/breezy/setup_header.tpl b/ihtml/themes/breezy/setup_header.tpl index de0450960..99f1ff849 100644 --- a/ihtml/themes/breezy/setup_header.tpl +++ b/ihtml/themes/breezy/setup_header.tpl @@ -1,12 +1,5 @@ -<div class="setup-header"> <div id="header-left"> <img id="fd-logo" class="optional" src="geticon.php?context=applications&icon=fusiondirectory&size=48" alt="FusionDirectory"/> </div> - <div id="header-right"> - <div class="version"> - {$version} - </div> - </div> -</div> {* FusionDirectory - smarty template for setup header, which is also used by login and password recovery *} diff --git a/plugins/generic/welcome/welcome.tpl b/plugins/generic/welcome/welcome.tpl index 52a2f8cce..74dddf806 100644 --- a/plugins/generic/welcome/welcome.tpl +++ b/plugins/generic/welcome/welcome.tpl @@ -4,9 +4,6 @@ <br/> -<div class="copynotice"> - © 2002-{$year} <a href="http://www.fusionDirectory.org">{t}The FusionDirectory team{/t}, {$revision}</a> -</div> +{include file={filePath file="copynotice.tpl"}} <input type="hidden" name="ignore"/> - -- GitLab