From e975fe9cda0f42041d10383e69304ac571019f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be> Date: Fri, 24 Jun 2016 12:34:58 +0200 Subject: [PATCH] Fixes #4918 Fixing stuff in tpl files --- html/class_passwordRecovery.inc | 5 +- html/index.php | 11 ++-- html/themes/breezy/login.css | 4 ++ html/themes/breezy/password-style.css | 56 --------------------- html/themes/breezy/printer.css | 4 -- html/themes/breezy/setup.css | 6 --- html/themes/breezy/style.css | 7 ++- html/themes/default/login.css | 4 ++ html/themes/default/password-style.css | 56 --------------------- html/themes/default/printer.css | 4 -- html/themes/default/setup.css | 6 --- html/themes/default/style.css | 7 ++- ihtml/themes/default/islocked.tpl | 45 +++++++++-------- ihtml/themes/default/login.tpl | 4 +- ihtml/themes/default/recovery.tpl | 64 +++++++++++++----------- ihtml/themes/default/restore-confirm.tpl | 46 +++++++++-------- ihtml/themes/default/setup_header.tpl | 10 ++-- ihtml/themes/default/simple-remove.tpl | 44 ++++++++-------- setup/setup_frame.tpl | 2 +- 19 files changed, 145 insertions(+), 240 deletions(-) delete mode 100644 html/themes/breezy/password-style.css delete mode 100644 html/themes/default/password-style.css diff --git a/html/class_passwordRecovery.inc b/html/class_passwordRecovery.inc index ed0c588e5..4d9e65497 100644 --- a/html/class_passwordRecovery.inc +++ b/html/class_passwordRecovery.inc @@ -166,10 +166,7 @@ class standAlonePage { exit; } elseif ($config->get_cfg_value("warnssl") == 'TRUE') { /* Display SSL mode warning? */ - $smarty->assign("ssl", "<b>"._("Warning").":</b> ". - _("Session will not be encrypted."). - " <a style=\"color:red;\" href=\"".htmlentities($ssl). - "\"><b>"._("Enter SSL session")."</b></a>!"); + $smarty->assign ('ssl', sprintf(_('Warning: <a href="%s">Session is not encrypted!</a>'), $ssl)); } } diff --git a/html/index.php b/html/index.php index 66614ae2a..88886ddb3 100644 --- a/html/index.php +++ b/html/index.php @@ -52,17 +52,16 @@ function displayLogin() $smarty->assign ("message", $message); /* Displasy SSL mode warning? */ - if (($ssl != "") && ($config->get_cfg_value('warnSSL') == 'TRUE')) { - $smarty->assign ("ssl", _("Warning").": <a style=\"color:red;\" href=\"$ssl\">"._("Session is not encrypted!")."</a>"); + if (($ssl != '') && ($config->get_cfg_value('warnSSL') == 'TRUE')) { + $smarty->assign ('ssl', sprintf(_('Warning: <a href="%s">Session is not encrypted!</a>'), $ssl)); } else { - $smarty->assign ("ssl", ""); + $smarty->assign ('ssl', ''); } if (!$config->check_session_lifetime()) { - $smarty->assign ("lifetime", _("Warning").": ". - _("The session lifetime configured in your fusiondirectory.conf will be overridden by php.ini settings.")); + $smarty->assign ('lifetime', _('Warning: The session lifetime configured in your fusiondirectory.conf will be overridden by php.ini settings.')); } else { - $smarty->assign ("lifetime", ""); + $smarty->assign ('lifetime', ''); } /* Generate server list */ diff --git a/html/themes/breezy/login.css b/html/themes/breezy/login.css index 8366fb61c..67b67bfa3 100644 --- a/html/themes/breezy/login.css +++ b/html/themes/breezy/login.css @@ -79,6 +79,10 @@ html.rtl div#window_footer > div:nth-child(1) { text-align:right; } +span.warning, p.warning { +color:red; +} + /* On small screens */ @media (max-width: 640px) { div#window_div { diff --git a/html/themes/breezy/password-style.css b/html/themes/breezy/password-style.css deleted file mode 100644 index 178084c96..000000000 --- a/html/themes/breezy/password-style.css +++ /dev/null @@ -1,56 +0,0 @@ -body { -margin:0; -background-color:#fcfcfc; -color:#2980b9; -font-family:arial,helvetica,sans-serif; -font-size:12px; -} - -h1 { -margin:0; -background-color:#507AAA; -border-bottom:1px solid #C0C2C3; -padding-top:.2em; -padding-bottom:.2em; -} - -img.center { -text-align:center; -vertical-align:middle; -} - -h1.headline { -font-size:2em; -} - -div.success { -padding:1em; -} - -p.infotext { -padding:.5em; -} - -table { -border-spacing:.5em; -} - -div.change { -margin-right:.5em; -text-align:right; -} -html.rtl div.change { -text-align:left; -} - -div.ruler { -border-top:1px solid #C0C2C3; -width:100%; -height:1px; -margin-top:.5em; -margin-bottom:.5em; -} - -table.iesucks { -width:60%; -} diff --git a/html/themes/breezy/printer.css b/html/themes/breezy/printer.css index 3367145d2..e92309900 100644 --- a/html/themes/breezy/printer.css +++ b/html/themes/breezy/printer.css @@ -18,7 +18,3 @@ width:100%; div.setup_header { display:none; } - -div.setup_menu { -display:none; -} diff --git a/html/themes/breezy/setup.css b/html/themes/breezy/setup.css index 931731897..10014a397 100644 --- a/html/themes/breezy/setup.css +++ b/html/themes/breezy/setup.css @@ -11,12 +11,6 @@ body.setup .plugin_window { border-radius:5px; } -div.setup_menu { -background-color:#F8F8F8; -padding:4px 5px; -border-bottom:1px solid #B0B0B0; -} - /* default.*/ div.default { padding:2px 10px; diff --git a/html/themes/breezy/style.css b/html/themes/breezy/style.css index c035f53a0..d9b0d677c 100644 --- a/html/themes/breezy/style.css +++ b/html/themes/breezy/style.css @@ -674,13 +674,18 @@ margin-right:35px; div#header_right { padding-top:8px; -text-align:right; height:38px; color:#31363b; } +html.ltr div#header_right { +text-align:right; +} html.rtl div#header_right { text-align:left; } +div#header_right div.version { +font-size:20px; +} /* Header col */ div.setup_header { diff --git a/html/themes/default/login.css b/html/themes/default/login.css index bd4680f4c..90c372e04 100644 --- a/html/themes/default/login.css +++ b/html/themes/default/login.css @@ -69,6 +69,10 @@ html.rtl div#window_footer > div:nth-child(1) { text-align:right; } +span.warning, p.warning { +color:red; +} + /* On small screens */ @media (max-width: 640px) { div#window_div { diff --git a/html/themes/default/password-style.css b/html/themes/default/password-style.css deleted file mode 100644 index cfa7b879d..000000000 --- a/html/themes/default/password-style.css +++ /dev/null @@ -1,56 +0,0 @@ -body { -margin:0; -background-color:#FFF; -color:#00008F; -font-family:arial,helvetica,sans-serif; -font-size:12px; -} - -h1 { -margin:0; -background-color:#507AAA; -border-bottom:1px solid #AAA; -padding-top:.2em; -padding-bottom:.2em; -} - -img.center { -text-align:center; -vertical-align:middle; -} - -h1.headline { -font-size:2em; -} - -div.success { -padding:1em; -} - -p.infotext { -padding:.5em; -} - -table { -border-spacing:.5em; -} - -div.change { -margin-right:.5em; -text-align:right; -} -html.rtl div.change { -text-align:left; -} - -div.ruler { -border-top:1px solid #AAA; -width:100%; -height:1px; -margin-top:.5em; -margin-bottom:.5em; -} - -table.iesucks { -width:60%; -} diff --git a/html/themes/default/printer.css b/html/themes/default/printer.css index 3367145d2..e92309900 100644 --- a/html/themes/default/printer.css +++ b/html/themes/default/printer.css @@ -18,7 +18,3 @@ width:100%; div.setup_header { display:none; } - -div.setup_menu { -display:none; -} diff --git a/html/themes/default/setup.css b/html/themes/default/setup.css index a8ca76f55..812a74679 100644 --- a/html/themes/default/setup.css +++ b/html/themes/default/setup.css @@ -11,12 +11,6 @@ body.setup .plugin_window { border-radius:5px; } -div.setup_menu { -background-color:#F8F8F8; -padding:4px 5px; -border-bottom:1px solid #B0B0B0; -} - /* default.*/ div.default { padding:2px 10px; diff --git a/html/themes/default/style.css b/html/themes/default/style.css index 832edfe93..8ff45ac11 100644 --- a/html/themes/default/style.css +++ b/html/themes/default/style.css @@ -659,13 +659,18 @@ margin-right:35px; div#header_right { padding-top:8px; -text-align:right; height:38px; color:black; } +html.ltr div#header_right { +text-align:right; +} html.rtl div#header_right { text-align:left; } +div#header_right div.version { +font-size:20px; +} /* Header col */ div.setup_header { diff --git a/ihtml/themes/default/islocked.tpl b/ihtml/themes/default/islocked.tpl index a4e937054..c29695996 100644 --- a/ihtml/themes/default/islocked.tpl +++ b/ihtml/themes/default/islocked.tpl @@ -1,23 +1,28 @@ -<div style="font-size:20px;"> - <img alt="" src="geticon.php?context=status&icon=object-locked&size=32" style="vertical-align:top;"/> {t}Locking conflict detected{/t} -</div> - -<p> - <b>{t}Warning{/t}:</b> {$message} -</p> -<p> - {t}If this lock detection is false, the other person has obviously closed the webbrowser during the edit operation. You may want to take over the lock by pressing the 'Edit anyway' button.{/t} -</p> +<div class="notice"> + <div class="msgtitle"> + <h2> + <img alt="" src="geticon.php?context=status&icon=object-locked&size=32" class="center"/> {t}Locking conflict detected{/t} + </h2> + </div> + <div> + <p> + <b>{t}Warning{/t}:</b> {$message} + </p> + <p> + {t}If this lock detection is false, the other person has obviously closed the webbrowser during the edit operation. You may want to take over the lock by pressing the 'Edit anyway' button.{/t} + </p> -<p class="plugbottom"> - <input type="submit" name="delete_lock" value="{$action}"> - {if $allow_readonly} - - <input type="submit" name="open_readonly" value="{t}Read only{/t}"> - {/if} - - <input type="submit" name="cancel_lock" value="{t}Cancel{/t}"> -</p> + <p class="plugbottom"> + <input type="submit" name="delete_lock" value="{$action}"/> + {if $allow_readonly} + + <input type="submit" name="open_readonly" value="{t}Read only{/t}"/> + {/if} + + <input type="submit" name="cancel_lock" value="{t}Cancel{/t}"/> + </p> -<input type="hidden" name="dn" value="{$dn}"> + <input type="hidden" name="dn" value="{$dn}"/> + </div> +</div> diff --git a/ihtml/themes/default/login.tpl b/ihtml/themes/default/login.tpl index 05d2096d0..3c7ff4b9b 100644 --- a/ihtml/themes/default/login.tpl +++ b/ihtml/themes/default/login.tpl @@ -20,8 +20,8 @@ <div class="optional"> {t}Please use your username and your password to log into the site administration system.{/t}<br /> - {if $ssl}<b>{$ssl}</b>{/if} - {if $lifetime}<b><div style="color:red;">{$lifetime}</div></b>{/if} + {if $ssl}<span class="warning">{$ssl}</span>{/if} + {if $lifetime}<span class="warning">{$lifetime}</span>{/if} </div> <div> diff --git a/ihtml/themes/default/recovery.tpl b/ihtml/themes/default/recovery.tpl index 625ec8a22..a28b3a26a 100644 --- a/ihtml/themes/default/recovery.tpl +++ b/ihtml/themes/default/recovery.tpl @@ -3,10 +3,8 @@ {$php_errors} <div> {include file={filePath file="setup_header.tpl"}} - <div class='setup_menu'> - <b>{t}FusionDirectory password recovery{/t}</b> - </div> </div> + {$msg_dialogs} <div id="window_container"> @@ -14,32 +12,34 @@ <form action='recovery.php{$params}' method='post' name='mainform' onSubmit='js_check(this);return true;'> - {$msg_dialogs} <div id="window_titlebar"> <p> <img class="center" src="geticon.php?context=status&icon=dialog-password&size=48" alt="{t}Password{/t}" title="{t}Password{/t}"/> {t}Lost password{/t} </p> </div> + <div id="window_content"> + <div> {if $activated} - <div style="padding-left:10px;padding-right:10px;"> - <!-- Display SSL warning message on demand --> - <p class="warning"> {$ssl} </p> + <!-- Display SSL warning message on demand --> + <span class="warning"> {$ssl} </span> - <!-- Display error message on demand --> - <p class="warning"> {$message} </p> + <!-- Display error message on demand --> + <span class="warning"> {$message} </span> {if $step==3} <p class="infotext"> {t 1=$uid 2=$email_address}Informations to reset password for %1 have been sent to email address %2{/t}<br/> - <div style="color:red;">{t 1=$delay_allowed}Warning : this email is only valid for %1 minutes.{/t}</div> + <span class="warning">{t 1=$delay_allowed}Warning : this email is only valid for %1 minutes.{/t}</span> </p> + </div> + </div> {elseif $step==4} <p class="infotext"> {t}This dialog provides a simple way to change your password. Enter the new password (twice) in the fields below and press the 'Change' button.{/t} </p> - <div class="ruler"></div> + <br/> <table> {if $show_directory_chooser} <tr> @@ -59,7 +59,7 @@ </tr> <tr> <td><label for="new_password">{t}New password{/t}</label></td> - <td><input type="password" name="new_password" id="new_password" maxlength="40" value="" title="{t}New password{/t}" onFocus="nextfield= 'new_password_repeated';" onkeyup="testPasswordCss(document.getElementById('new_password').value);"></td> + <td><input type="password" name="new_password" id="new_password" value="" title="{t}New password{/t}" onFocus="nextfield= 'new_password_repeated';" onkeyup="testPasswordCss(document.getElementById('new_password').value);"></td> </tr> <tr> <td><label for="new_password_repeated">{t}New password repeated{/t}</label></td> @@ -73,26 +73,29 @@ </td> </tr> </table> - - <div class="ruler"></div> - - <div class="change" style="float:right; text-align:right;"> - <input type="submit" name="change" value="{t}Change{/t}" title="{t}Click here to change your password{/t}"> - <input type="hidden" id="formSubmit"> + </div> + </div> + <div id="window_footer" class="plugbottom"> + <div> </div> - <div style="clear:both"></div> + <div> + <input type="submit" name="change" value="{t}Change{/t}" title="{t}Click here to change your password{/t}"/> + </div> + </div> {elseif $changed} <div class="success"> <img class="center" src="geticon.php?context=status&icon=task-complete&size=16" alt="{t}Success{/t}" title="{t}Success{/t}"> <b>{t}Your password has been changed successfully.{/t}</b><br/> <br/><a href="./">Return to login screen</a> </div> + </div> + </div> {else} <p class="infotext"> {t}Enter your current e-mail address in the field below and press the 'Change' button.{/t}<br/> - <strong>{t}=> Use your e-mail in the long format, e.g : John Doe => john.doe@ibcp.fr{/t}</strong> + <strong>{t}=> Use your e-mail in the long format, e.g : John Doe => john.doe@example.com{/t}</strong> </p> - <div class="ruler"></div> + <br/> <table> {if $show_directory_chooser} <tr> @@ -107,24 +110,27 @@ <tr> <td><label for="email_address">{t}Email address{/t}</label></td> <td> - <input type="text" name="email_address" id="email_address" width="60" maxlength="60" value="{$email_address}" title="{t}Mail{/t}" onFocus=""> + <input type="text" name="email_address" id="email_address" value="{$email_address}" title="{t}Email{/t}" onFocus=""/> </td> </tr> </table> - <div class="change" style="float:right; text-align:right;"> - <input type="submit" name="apply" value="{t}Change{/t}" - title="{t}Click here to change your password{/t}"> - <input type="hidden" id="formSubmit"> + </div> + </div> + <div id="window_footer" class="plugbottom"> + <div> </div> - <div style="clear:both"></div> + <div> + <input type="submit" name="apply" value="{t}Change{/t}" title="{t}Click here to change your password{/t}"/> + </div> + </div> {/if} {else} - <div style="padding-left:10px;padding-right:10px;"> <!-- Display error message on demand --> <p class="warning"> {$message} </p> <p>{t}Password recovery is not activated. If you have lost your password, please contact your administrator{/t}</p> -{/if} </div> + </div> +{/if} </form> </div> </div> diff --git a/ihtml/themes/default/restore-confirm.tpl b/ihtml/themes/default/restore-confirm.tpl index d1d653c86..782f734a8 100644 --- a/ihtml/themes/default/restore-confirm.tpl +++ b/ihtml/themes/default/restore-confirm.tpl @@ -1,25 +1,29 @@ -<div style="padding:5px;"> - <div style="font-size:18px;"> - <img alt="" src="geticon.php?context=status&icon=dialog-warning&size=32" class="center"/> {t}Warning: you are about to restore the following snapshot{/t} +<div class="notice"> + <div class="msgtitle"> + <h2> + <img alt="" src="geticon.php?context=status&icon=dialog-warning&size=32" class="center"/> {t}Warning: you are about to restore the following snapshot{/t} + </h2> </div> - <p> - <ul> - {foreach from=$objects item=object} - <li style="list-style-image:url('{$object.icon}');" title="{$object.type}"> - {$object.name} (<i>{$object.dn}</i>) - </li> - {/foreach} - </ul> - {t}Any modification made to the object since this snapshot will be lost.{/t} - {t}Please double check if you really want to do this since there is no way for FusionDirectory to get your data back.{/t} - </p> + <div> + <p> + <ul> + {foreach from=$objects item=object} + <li style="list-style-image:url('{$object.icon}');" title="{$object.type}"> + {$object.name} (<i>{$object.dn}</i>) + </li> + {/foreach} + </ul> + {t}Any modification made to the object since this snapshot will be lost.{/t} + {t}Please double check if you really want to do this since there is no way for FusionDirectory to get your data back.{/t} + </p> - <p> - {t}So - if you're sure - press 'Continue' to continue or 'Cancel' to abort.{/t} - </p> + <p> + {t}So - if you're sure - press 'Continue' to continue or 'Cancel' to abort.{/t} + </p> - <p class="plugbottom"> - <input type="submit" name="restore_confirmed" value="{t}Continue{/t}"/> - <input type="submit" name="restore_cancel" value="{msgPool type=cancelButton}"/> - </p> + <p class="plugbottom"> + <input type="submit" name="restore_confirmed" value="{t}Continue{/t}"/> + <input type="submit" name="restore_cancel" value="{msgPool type=cancelButton}"/> + </p> + </div> </div> diff --git a/ihtml/themes/default/setup_header.tpl b/ihtml/themes/default/setup_header.tpl index 35887b3c5..14477ccc0 100644 --- a/ihtml/themes/default/setup_header.tpl +++ b/ihtml/themes/default/setup_header.tpl @@ -1,8 +1,12 @@ <div class="setup_header"> - <div style="float:left;"> - <img src="geticon.php?context=applications&icon=fusiondirectory&size=48" class="center" alt="FusionDirectory" /> + <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 style="padding-top:8px;text-align:right;height:38px;color:#000000;font-size:20px">{$version}</div> </div> {* FusionDirectory - smarty template for setup header, which is also used by login and password recovery *} diff --git a/ihtml/themes/default/simple-remove.tpl b/ihtml/themes/default/simple-remove.tpl index ece809fd5..e182eeb36 100644 --- a/ihtml/themes/default/simple-remove.tpl +++ b/ihtml/themes/default/simple-remove.tpl @@ -1,24 +1,28 @@ -<div style="padding:5px;"> - <div style="font-size:18px;"> - <img alt="" src="geticon.php?context=status&icon=dialog-warning&size=32" class="center"/> {t}Warning: you are about to delete the following objects{/t} +<div class="notice"> + <div class="msgtitle"> + <h2> + <img alt="" src="geticon.php?context=status&icon=dialog-warning&size=32" class="center"/> {t}Warning: you are about to delete the following objects{/t} + </h2> </div> - <p> - <ul> - {foreach from=$objects item=object} - <li style="list-style-image:url('{$object.icon}');" title="{$object.type}"> - {$object.name} (<i>{$object.dn}</i>) - </li> - {/foreach} - </ul> - {t}Please double check if you really want to do this since there is no way for FusionDirectory to get your data back.{/t} - </p> + <div> + <p> + <ul> + {foreach from=$objects item=object} + <li style="list-style-image:url('{$object.icon}');" title="{$object.type}"> + {$object.name} (<i>{$object.dn}</i>) + </li> + {/foreach} + </ul> + {t}Please double check if you really want to do this since there is no way for FusionDirectory to get your data back.{/t} + </p> - <p> - {t}So - if you're sure - press 'Delete' to continue or 'Cancel' to abort.{/t} - </p> + <p> + {t}So - if you're sure - press 'Delete' to continue or 'Cancel' to abort.{/t} + </p> - <p class="plugbottom"> - <input type="submit" name="delete_confirmed" value="{msgPool type=delButton}"/> - <input type="submit" name="delete_cancel" value="{msgPool type=cancelButton}"/> - </p> + <p class="plugbottom"> + <input type="submit" name="delete_confirmed" value="{msgPool type=delButton}"/> + <input type="submit" name="delete_cancel" value="{msgPool type=cancelButton}"/> + </p> + </div> </div> diff --git a/setup/setup_frame.tpl b/setup/setup_frame.tpl index 57cc735ec..2a7be1d45 100644 --- a/setup/setup_frame.tpl +++ b/setup/setup_frame.tpl @@ -10,7 +10,7 @@ </a> </div> <div id="header_right"> - <div class="logout-label"> + <div class="version"> {$version} </div> </div> -- GitLab