Merge remote-tracking branch 'origin/master' into postfixadmin_3.3

This commit is contained in:
David Goodwin committed 2021-01-07 20:34:58 +00:00
commit 36fe0a31ba
11 files changed
+27 -24

No files matched your search

+3 -3
View File
@@ -67,6 +67,7 @@ class PFASmarty {
$CONF['theme_favicon'] = $rel_path . htmlentities($CONF['theme_favicon']);
$CONF['theme_logo'] = $rel_path . htmlentities($CONF['theme_logo']);
$this->assign('rel_path', $rel_path);
$this->assign('CONF', $CONF);
}
@@ -92,11 +93,10 @@ class PFASmarty {
* @param string $template
* @return void
*/
public function display($template) {
public function display($template)
{
$CONF = Config::getInstance()->getAll();
$this->assign('CONF', $CONF);
$this->assign('PALANG', $CONF['__LANG'] ?? []);
$this->assign('url_domain', '');
$this->assign('version', $CONF['version'] ?? 'unknown');
+4 -4
View File
@@ -42,7 +42,7 @@ if ($CONF['configured']) {
<title>Welcome to Postfix Admin</title>
</head>
<body>
<img id="login_header_logo" src="images/logo-default.png" />
<img id="login_header_logo" src="{$rel_path}images/logo-default.png" />
<h1>Welcome to Postfix Admin</h1>
<h2>What is it?</h2>
<p>Postfix Admin is a web based interface to configure and manage a Postfix based email server for many users.</p>
@@ -83,9 +83,9 @@ if ($CONF['configured']) {
<h2>Postfix Admin Web sites</h2>
<p>For further help, or documentation please check out -
<ul>
<li><a href="http://github.com/postfixadmin/postfixadmin">GitHub - Postfix Admin</a> web site</li>
<li><a href="http://postfixadmin.org">Postfix Admin</a> web site<br /></li>
<li><a href="http://sourceforge.net/forum/forum.php?forum_id=676076">Knowledge Base</a></li>
<li><a href="https://github.com/postfixadmin/postfixadmin">GitHub - Postfix Admin</a> web site</li>
<li><a href="https://postfixadmin.org">Postfix Admin</a> web site<br /></li>
<li><a href="https://sourceforge.net/forum/forum.php?forum_id=676076">Knowledge Base</a></li>
</ul>
</p>
</p>
+1 -1
View File
@@ -18,10 +18,10 @@
*
*/
$rel_path = '../';
require_once('../common.php');
$smarty = PFASmarty::getInstance();
$smarty->configureTheme('../');
$smarty->assign('smarty_template', 'users_edit-alias');
+1
View File
@@ -31,6 +31,7 @@ $rel_path = '../';
require_once("../common.php");
$smarty = PFASmarty::getInstance();
$smarty->configureTheme('../');
check_db_version(); # check if the database layout is up to date (and error out if not)
+1
View File
@@ -28,6 +28,7 @@ authentication_require_role('user');
$USERID_USERNAME = authentication_get_username();
$smarty = PFASmarty::getInstance();
$smarty->configureTheme('../');
$vh = new VacationHandler($USERID_USERNAME);
if ($vh->check_vacation()) {
+2 -1
View File
@@ -25,6 +25,8 @@
* fUsername
*/
$smarty = PFASmarty::getInstance();
if (preg_match('/\/users\//', $_SERVER['REQUEST_URI'])) {
$rel_path = '../';
$context = 'users';
@@ -35,7 +37,6 @@ if (preg_match('/\/users\//', $_SERVER['REQUEST_URI'])) {
require_once($rel_path . 'common.php');
$CONF = Config::getInstance()->getAll();
$smarty = PFASmarty::getInstance();
$smarty->configureTheme($rel_path);
+2 -2
View File
@@ -26,16 +26,16 @@
* fPassword2
*/
$rel_path = '../';
require_once('../common.php');
$smarty = PFASmarty::getInstance();
$smarty->configureTheme('../');
authentication_require_role('user');
$username = authentication_get_username();
$pPassword_password_text = "";
$pPassword_password_current_text = "";
$smarty = PFASmarty::getInstance();
if ($_SERVER['REQUEST_METHOD'] == "POST") {
if (safepost('token') != $_SESSION['PFA_token']) {
+2 -1
View File
@@ -16,9 +16,10 @@
*
*/
$rel_path = '../';
require_once('../common.php');
$smarty = PFASmarty::getInstance();
$smarty->configureTheme('../');
require_once('../vacation.php');
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
+4 -5
View File
@@ -1,4 +1,3 @@
<!-- {$smarty.template} -->
<!doctype html>
<html lang="{if isset($smarty.session.lang)}{$smarty.session.lang}{/if}">
<head>
@@ -14,9 +13,9 @@
<link rel="stylesheet" type="text/css" href="{$CONF.theme_custom_css}"/>
{/if}
<script src="jquery-1.12.4.min.js"></script>
<script src="css/bootstrap-3.4.1-dist/js/moment-with-locales.min.js"></script>
<script src="css/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
<script src="css/bootstrap-3.4.1-dist/js/bootstrap-datetimepicker.min.js"></script>
<script src="{$rel_path}jquery-1.12.4.min.js"></script>
<script src="{$rel_path}css/bootstrap-3.4.1-dist/js/moment-with-locales.min.js"></script>
<script src="{$rel_path}css/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
<script src="{$rel_path}css/bootstrap-3.4.1-dist/js/bootstrap-datetimepicker.min.js"></script>
</head>
<body class="lang-{if isset($smarty.session.lang)}{$smarty.session.lang}{/if} page-{$smarty_template} {if isset($table)}page-{$smarty_template}-{$table}{/if}">
-1
View File
@@ -1,4 +1,3 @@
<!-- {$smarty.template} -->
{strip}
{include file="header.tpl"}
{if $smarty_template !== 'login' && $smarty_template !== 'password-recover' && $smarty_template !== 'password-change'}
+7 -6
View File
@@ -60,12 +60,13 @@
</div>
<div class="panel-footer">
<div class="btn-toolbar" role="toolbar">
<div class="btn-group pull-right">
<input class="btn btn-primary m-3" type="submit" name="fChange"
value="{$PALANG.pEdit_vacation_set}"/>
<input class="btn btn-primary" type="submit" name="fBack"
value="{$PALANG.pEdit_vacation_remove}"/>
<input class="btn btn-primary" type="submit" name="fCancel" value="{$PALANG.exit}"/>
<div class="pull-right">
<button class="btn btn-secondary" type="submit" name="fCancel">{$PALANG.exit}</button>
<button class="btn btn-primary" type="submit" name="fChange">{$PALANG.pEdit_vacation_set}</button>
<button class="btn btn-primary" type="submit" name="fBack">{$PALANG.pEdit_vacation_remove}</button>
</div>
</div>
</div>