mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-20 07:16:50 +01:00
chore(tests): UT for Theme
Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
@@ -37,7 +37,7 @@ final class CopyController extends AccountViewBase
|
||||
/**
|
||||
* Copy action
|
||||
*
|
||||
* @param int $id Account's ID
|
||||
* @param int $id Account's ID
|
||||
*/
|
||||
public function copyAction(int $id): void
|
||||
{
|
||||
@@ -54,8 +54,8 @@ final class CopyController extends AccountViewBase
|
||||
'title',
|
||||
[
|
||||
'class' => 'titleGreen',
|
||||
'name' => __('New Account'),
|
||||
'icon' => $this->icons->getIconAdd()->getIcon(),
|
||||
'name' => __('New Account'),
|
||||
'icon' => $this->icons->add()->getIcon(),
|
||||
]
|
||||
);
|
||||
$this->view->assign('formRoute', 'account/saveCopy');
|
||||
|
||||
@@ -47,8 +47,8 @@ final class CreateController extends AccountViewBase
|
||||
'title',
|
||||
[
|
||||
'class' => 'titleGreen',
|
||||
'name' => __('New Account'),
|
||||
'icon' => $this->icons->getIconAdd()->getIcon(),
|
||||
'name' => __('New Account'),
|
||||
'icon' => $this->icons->add()->getIcon(),
|
||||
]
|
||||
);
|
||||
$this->view->assign('formRoute', 'account/saveCreate');
|
||||
|
||||
@@ -29,6 +29,7 @@ use SP\Core\Acl\AclActionsInterface;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\Events\Event;
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Domain\Account\Ports\AccountServiceInterface;
|
||||
use SP\Modules\Web\Controllers\Helpers\Account\AccountHelper;
|
||||
use SP\Mvc\Controller\WebControllerHelper;
|
||||
use SP\Util\ErrorUtil;
|
||||
@@ -40,13 +41,13 @@ final class DeleteController extends AccountControllerBase
|
||||
{
|
||||
private AccountHelper $accountHelper;
|
||||
private ThemeIcons $icons;
|
||||
private \SP\Domain\Account\Ports\AccountServiceInterface $accountService;
|
||||
private AccountServiceInterface $accountService;
|
||||
|
||||
public function __construct(
|
||||
Application $application,
|
||||
WebControllerHelper $webControllerHelper,
|
||||
AccountHelper $accountHelper,
|
||||
\SP\Domain\Account\Ports\AccountServiceInterface $accountService
|
||||
Application $application,
|
||||
WebControllerHelper $webControllerHelper,
|
||||
AccountHelper $accountHelper,
|
||||
AccountServiceInterface $accountService
|
||||
) {
|
||||
parent::__construct(
|
||||
$application,
|
||||
@@ -62,7 +63,7 @@ final class DeleteController extends AccountControllerBase
|
||||
/**
|
||||
* Delete action
|
||||
*
|
||||
* @param int|null $id Account's ID
|
||||
* @param int|null $id Account's ID
|
||||
*/
|
||||
public function deleteAction(?int $id = null): void
|
||||
{
|
||||
@@ -79,8 +80,8 @@ final class DeleteController extends AccountControllerBase
|
||||
'title',
|
||||
[
|
||||
'class' => 'titleRed',
|
||||
'name' => __('Remove Account'),
|
||||
'icon' => $this->icons->getIconDelete()->getIcon(),
|
||||
'name' => __('Remove Account'),
|
||||
'icon' => $this->icons->delete()->getIcon(),
|
||||
]
|
||||
);
|
||||
$this->view->assign('formRoute', 'account/saveDelete');
|
||||
|
||||
@@ -38,7 +38,7 @@ final class EditController extends AccountViewBase
|
||||
/**
|
||||
* Edit action
|
||||
*
|
||||
* @param int $id Account's ID
|
||||
* @param int $id Account's ID
|
||||
*/
|
||||
public function editAction(int $id): void
|
||||
{
|
||||
@@ -55,8 +55,8 @@ final class EditController extends AccountViewBase
|
||||
'title',
|
||||
[
|
||||
'class' => 'titleOrange',
|
||||
'name' => __('Edit Account'),
|
||||
'icon' => $this->icons->getIconEdit()->getIcon(),
|
||||
'name' => __('Edit Account'),
|
||||
'icon' => $this->icons->edit()->getIcon(),
|
||||
]
|
||||
);
|
||||
$this->view->assign('formRoute', 'account/saveEdit');
|
||||
|
||||
@@ -39,7 +39,7 @@ final class EditPassController extends AccountViewBase
|
||||
/**
|
||||
* Obtener los datos para mostrar el interface para modificar la clave de cuenta
|
||||
*
|
||||
* @param int $id Account's ID
|
||||
* @param int $id Account's ID
|
||||
*
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
@@ -58,8 +58,8 @@ final class EditPassController extends AccountViewBase
|
||||
'title',
|
||||
[
|
||||
'class' => 'titleOrange',
|
||||
'name' => __('Edit Account Password'),
|
||||
'icon' => $this->icons->getIconEditPass()->getIcon(),
|
||||
'name' => __('Edit Account Password'),
|
||||
'icon' => $this->icons->editPass()->getIcon(),
|
||||
]
|
||||
);
|
||||
$this->view->assign('formRoute', 'account/saveEditPass');
|
||||
|
||||
@@ -39,7 +39,7 @@ final class ViewController extends AccountViewBase
|
||||
/**
|
||||
* View action
|
||||
*
|
||||
* @param int $id Account's ID
|
||||
* @param int $id Account's ID
|
||||
*/
|
||||
public function viewAction(int $id): void
|
||||
{
|
||||
@@ -59,8 +59,8 @@ final class ViewController extends AccountViewBase
|
||||
'title',
|
||||
[
|
||||
'class' => 'titleNormal',
|
||||
'name' => __('Account Details'),
|
||||
'icon' => $this->icons->getIconView()->getIcon(),
|
||||
'name' => __('Account Details'),
|
||||
'icon' => $this->icons->view()->getIcon(),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ use SP\Core\Events\Event;
|
||||
use SP\Core\Events\EventMessage;
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\Domain\Account\Ports\AccountServiceInterface;
|
||||
use SP\Domain\Account\Ports\PublicLinkServiceInterface;
|
||||
use SP\Domain\Account\Services\PublicLinkService;
|
||||
use SP\Http\Uri;
|
||||
use SP\Mvc\Controller\WebControllerHelper;
|
||||
@@ -49,17 +51,17 @@ use SP\Util\Util;
|
||||
*/
|
||||
final class ViewLinkController extends AccountControllerBase
|
||||
{
|
||||
private \SP\Domain\Account\Ports\AccountServiceInterface $accountService;
|
||||
private AccountServiceInterface $accountService;
|
||||
private ThemeIcons $icons;
|
||||
private PublicLinkService $publicLinkService;
|
||||
private ImageUtil $imageUtil;
|
||||
|
||||
public function __construct(
|
||||
Application $application,
|
||||
WebControllerHelper $webControllerHelper,
|
||||
\SP\Domain\Account\Ports\AccountServiceInterface $accountService,
|
||||
\SP\Domain\Account\Ports\PublicLinkServiceInterface $publicLinkService,
|
||||
ImageUtilInterface $imageUtil
|
||||
Application $application,
|
||||
WebControllerHelper $webControllerHelper,
|
||||
AccountServiceInterface $accountService,
|
||||
PublicLinkServiceInterface $publicLinkService,
|
||||
ImageUtilInterface $imageUtil
|
||||
) {
|
||||
parent::__construct(
|
||||
$application,
|
||||
@@ -76,7 +78,7 @@ final class ViewLinkController extends AccountControllerBase
|
||||
/**
|
||||
* View public link action
|
||||
*
|
||||
* @param string $hash Link's hash
|
||||
* @param string $hash Link's hash
|
||||
*/
|
||||
public function viewLinkAction(string $hash): void
|
||||
{
|
||||
@@ -106,8 +108,8 @@ final class ViewLinkController extends AccountControllerBase
|
||||
'title',
|
||||
[
|
||||
'class' => 'titleNormal',
|
||||
'name' => __('Account Details'),
|
||||
'icon' => $this->icons->getIconView()->getIcon(),
|
||||
'name' => __('Account Details'),
|
||||
'icon' => $this->icons->view()->getIcon(),
|
||||
]
|
||||
);
|
||||
|
||||
@@ -136,24 +138,30 @@ final class ViewLinkController extends AccountControllerBase
|
||||
? '***'
|
||||
: $this->request->getClientAddress(true);
|
||||
|
||||
$baseUrl = ($this->configData->getApplicationUrl() ?: BootstrapBase::$WEBURI).BootstrapBase::$SUBURI;
|
||||
$baseUrl = ($this->configData->getApplicationUrl() ?: BootstrapBase::$WEBURI) . BootstrapBase::$SUBURI;
|
||||
|
||||
$deepLink = new Uri($baseUrl);
|
||||
$deepLink->addParam('r', Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW) . '/' . $accountData->getId());
|
||||
$deepLink->addParam(
|
||||
'r',
|
||||
Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW) . '/' . $accountData->getId()
|
||||
);
|
||||
|
||||
$this->eventDispatcher->notify(
|
||||
'show.account.link',
|
||||
new Event(
|
||||
$this, EventMessage::factory()
|
||||
->addDescription(__u('Link viewed'))
|
||||
->addDetail(__u('Account'), $accountData->getName())
|
||||
->addDetail(__u('Client'), $accountData->getClientName())
|
||||
->addDetail(__u('Agent'), $this->request->getHeader('User-Agent'))
|
||||
->addDetail(__u('HTTPS'), $this->request->isHttps() ? __u('ON') : __u('OFF'))
|
||||
->addDetail(__u('IP'), $clientAddress)
|
||||
->addDetail(__u('Link'), $deepLink->getUriSigned($this->configData->getPasswordSalt()))
|
||||
->addExtra('userId', $publicLinkData->getUserId())
|
||||
->addExtra('notify', $publicLinkData->isNotify())
|
||||
->addDescription(__u('Link viewed'))
|
||||
->addDetail(__u('Account'), $accountData->getName())
|
||||
->addDetail(__u('Client'), $accountData->getClientName())
|
||||
->addDetail(__u('Agent'), $this->request->getHeader('User-Agent'))
|
||||
->addDetail(__u('HTTPS'), $this->request->isHttps() ? __u('ON') : __u('OFF'))
|
||||
->addDetail(__u('IP'), $clientAddress)
|
||||
->addDetail(
|
||||
__u('Link'),
|
||||
$deepLink->getUriSigned($this->configData->getPasswordSalt())
|
||||
)
|
||||
->addExtra('userId', $publicLinkData->getUserId())
|
||||
->addExtra('notify', $publicLinkData->isNotify())
|
||||
)
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -41,6 +41,7 @@ use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\Language;
|
||||
use SP\Core\MimeTypesInterface;
|
||||
use SP\Domain\Account\Ports\AccountServiceInterface;
|
||||
use SP\Domain\Common\Services\ServiceException;
|
||||
use SP\Domain\Config\Ports\ConfigServiceInterface;
|
||||
use SP\Domain\Crypt\Services\TemporaryMasterPassService;
|
||||
use SP\Domain\Export\Services\BackupFiles;
|
||||
@@ -180,10 +181,10 @@ final class IndexController extends ControllerBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \SP\Mvc\View\Components\DataTab
|
||||
* @throws \SP\Core\Exceptions\CheckException
|
||||
* @throws \SP\Core\Exceptions\ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @return DataTab
|
||||
* @throws CheckException
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
protected function getConfigGeneral(): DataTab
|
||||
{
|
||||
@@ -200,7 +201,7 @@ final class IndexController extends ControllerBase
|
||||
$template->assign(
|
||||
'themes',
|
||||
SelectItemAdapter::factory(
|
||||
$this->theme->getThemesAvailable()
|
||||
$this->theme->getAvailable()
|
||||
)->getItemsFromArraySelected([$this->configData->getSiteTheme()])
|
||||
);
|
||||
$template->assign(
|
||||
@@ -245,8 +246,8 @@ final class IndexController extends ControllerBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \SP\Mvc\View\Components\DataTab
|
||||
* @throws \SP\Core\Exceptions\CheckException
|
||||
* @return DataTab
|
||||
* @throws CheckException
|
||||
*/
|
||||
protected function getAccountConfig(): DataTab
|
||||
{
|
||||
@@ -294,10 +295,10 @@ final class IndexController extends ControllerBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \SP\Mvc\View\Components\DataTab
|
||||
* @throws \SP\Core\Exceptions\CheckException
|
||||
* @throws \SP\Core\Exceptions\ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @return DataTab
|
||||
* @throws CheckException
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
protected function getLdapConfig(): DataTab
|
||||
{
|
||||
@@ -357,9 +358,9 @@ final class IndexController extends ControllerBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \SP\Mvc\View\Components\DataTab
|
||||
* @throws \SP\Core\Exceptions\ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @return DataTab
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
protected function getMailConfig(): DataTab
|
||||
{
|
||||
@@ -401,7 +402,7 @@ final class IndexController extends ControllerBase
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
* @throws NoSuchItemException
|
||||
* @throws \SP\Domain\Common\Services\ServiceException
|
||||
* @throws ServiceException
|
||||
*/
|
||||
protected function getEncryptionConfig(): DataTab
|
||||
{
|
||||
@@ -521,9 +522,9 @@ final class IndexController extends ControllerBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \SP\Mvc\View\Components\DataTab
|
||||
* @throws \SP\Core\Exceptions\ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @return DataTab
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
protected function getImportConfig(): DataTab
|
||||
{
|
||||
@@ -546,9 +547,9 @@ final class IndexController extends ControllerBase
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \SP\Mvc\View\Components\DataTab
|
||||
* @throws \SP\Domain\Common\Services\ServiceException
|
||||
* @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
|
||||
* @return DataTab
|
||||
* @throws ServiceException
|
||||
* @throws NoSuchItemException
|
||||
*/
|
||||
protected function getInfo(): DataTab
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -30,7 +30,7 @@ use Exception;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\Bootstrap\BootstrapBase;
|
||||
use SP\Core\Context\ContextInterface;
|
||||
use SP\Core\Context\SessionContextInterface;
|
||||
use SP\Core\Crypt\Hash;
|
||||
use SP\Core\Events\EventDispatcher;
|
||||
use SP\Core\Exceptions\FileNotFoundException;
|
||||
@@ -50,6 +50,10 @@ use SP\Mvc\Controller\WebControllerHelper;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
use SP\Providers\Auth\Browser\BrowserAuthInterface;
|
||||
|
||||
use function SP\__;
|
||||
use function SP\logger;
|
||||
use function SP\processException;
|
||||
|
||||
/**
|
||||
* Clase base para los controladores
|
||||
*/
|
||||
@@ -59,21 +63,21 @@ abstract class ControllerBase
|
||||
|
||||
protected const ERR_UNAVAILABLE = 0;
|
||||
|
||||
protected EventDispatcher $eventDispatcher;
|
||||
protected ConfigFileService $config;
|
||||
protected ContextInterface $session;
|
||||
protected ThemeInterface $theme;
|
||||
protected Acl $acl;
|
||||
protected ConfigDataInterface $configData;
|
||||
protected RequestInterface $request;
|
||||
protected PhpExtensionChecker $extensionChecker;
|
||||
protected TemplateInterface $view;
|
||||
protected ?UserLoginResponse $userData = null;
|
||||
protected ?ProfileData $userProfileData = null;
|
||||
protected bool $isAjax;
|
||||
protected LayoutHelper $layoutHelper;
|
||||
private BrowserAuthInterface $browser;
|
||||
protected string $actionName;
|
||||
protected EventDispatcher $eventDispatcher;
|
||||
protected ConfigFileService $config;
|
||||
protected SessionContextInterface $session;
|
||||
protected ThemeInterface $theme;
|
||||
protected Acl $acl;
|
||||
protected ConfigDataInterface $configData;
|
||||
protected RequestInterface $request;
|
||||
protected PhpExtensionChecker $extensionChecker;
|
||||
protected TemplateInterface $view;
|
||||
protected ?UserLoginResponse $userData = null;
|
||||
protected ?ProfileData $userProfileData = null;
|
||||
protected bool $isAjax;
|
||||
protected LayoutHelper $layoutHelper;
|
||||
protected string $actionName;
|
||||
private BrowserAuthInterface $browser;
|
||||
|
||||
public function __construct(
|
||||
Application $application,
|
||||
@@ -119,7 +123,7 @@ abstract class ControllerBase
|
||||
$this->view->assign('timeStart', $this->request->getServer('REQUEST_TIME_FLOAT'));
|
||||
$this->view->assign('queryTimeStart', microtime());
|
||||
$this->view->assign('isDemo', $this->configData->isDemoEnabled());
|
||||
$this->view->assign('themeUri', $this->view->getTheme()->getThemeUri());
|
||||
$this->view->assign('themeUri', $this->view->getTheme()->getUri());
|
||||
$this->view->assign('configData', $this->configData);
|
||||
|
||||
if ($loggedIn) {
|
||||
@@ -183,10 +187,10 @@ abstract class ControllerBase
|
||||
/**
|
||||
* Comprobar si el usuario está logado.
|
||||
*
|
||||
* @param bool $requireAuthCompleted
|
||||
* @param bool $requireAuthCompleted
|
||||
*
|
||||
* @throws \SP\Core\Exceptions\SessionTimeout
|
||||
* @throws \SP\Domain\Auth\Services\AuthException
|
||||
* @throws SessionTimeout
|
||||
* @throws AuthException
|
||||
*/
|
||||
protected function checkLoggedIn(bool $requireAuthCompleted = true): void
|
||||
{
|
||||
@@ -230,7 +234,7 @@ abstract class ControllerBase
|
||||
/**
|
||||
* Comprobar si está permitido el acceso al módulo/página.
|
||||
*
|
||||
* @param int $action La acción a comprobar
|
||||
* @param int $action La acción a comprobar
|
||||
*/
|
||||
protected function checkAccess(int $action): bool
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('Account Details'));
|
||||
$action->setTitle(__('Account Details'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconView());
|
||||
$action->setIcon($this->icons->view());
|
||||
$action->setRuntimeFilter(AccountSearchItem::class, 'isShowView');
|
||||
$action->addData('action-route', Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW));
|
||||
$action->addData('onclick', Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW));
|
||||
@@ -75,8 +75,8 @@ final class AccountActionsHelper extends HelperBase
|
||||
/**
|
||||
* Set icons for view
|
||||
*
|
||||
* @param AccountAcl $accountAcl
|
||||
* @param AccountActionsDto $accountActionsDto
|
||||
* @param AccountAcl $accountAcl
|
||||
* @param AccountActionsDto $accountActionsDto
|
||||
*
|
||||
* @return DataGridAction[]
|
||||
*/
|
||||
@@ -139,7 +139,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('Back'));
|
||||
$action->setTitle(__('Back'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconBack());
|
||||
$action->setIcon($this->icons->back());
|
||||
$action->addData('action-route', Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW));
|
||||
$action->addData('onclick', Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW));
|
||||
$action->addAttribute('type', 'button');
|
||||
@@ -158,7 +158,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('Edit Account Password'));
|
||||
$action->setTitle(__('Edit Account Password'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconEditPass());
|
||||
$action->setIcon($this->icons->editPass());
|
||||
$action->setRuntimeFilter(AccountSearchItem::class, 'isShowViewPass');
|
||||
$action->addData('action-route', Acl::getActionRoute(AclActionsInterface::ACCOUNT_EDIT_PASS));
|
||||
$action->addData('onclick', Acl::getActionRoute(AclActionsInterface::ACCOUNT_EDIT_PASS));
|
||||
@@ -178,7 +178,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('Edit Account'));
|
||||
$action->setTitle(__('Edit Account'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconEdit());
|
||||
$action->setIcon($this->icons->edit());
|
||||
$action->setRuntimeFilter(AccountSearchItem::class, 'isShowEdit');
|
||||
$action->addData('action-route', Acl::getActionRoute(AclActionsInterface::ACCOUNT_EDIT));
|
||||
$action->addData('onclick', Acl::getActionRoute(AclActionsInterface::ACCOUNT_EDIT));
|
||||
@@ -197,7 +197,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('Request Modification'));
|
||||
$action->setTitle(__('Request Modification'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconEmail());
|
||||
$action->setIcon($this->icons->email());
|
||||
$action->setRuntimeFilter(AccountSearchItem::class, 'isShowRequest');
|
||||
$action->addData('action-route', Acl::getActionRoute(AclActionsInterface::ACCOUNT_REQUEST));
|
||||
$action->addData('onclick', Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW));
|
||||
@@ -217,7 +217,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('Restore account from this point'));
|
||||
$action->setTitle(__('Restore account from this point'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconRestore());
|
||||
$action->setIcon($this->icons->restore());
|
||||
$action->addData('action-route', 'account/saveEditRestore');
|
||||
$action->addData('onclick', 'account/saveEditRestore');
|
||||
$action->addAttribute('type', 'button');
|
||||
@@ -236,7 +236,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('Save'));
|
||||
$action->setTitle(__('Save'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconSave());
|
||||
$action->setIcon($this->icons->save());
|
||||
$action->addData('action-route', 'account/save');
|
||||
$action->addData('onclick', 'account/save');
|
||||
$action->addAttribute('type', 'submit');
|
||||
@@ -247,8 +247,8 @@ final class AccountActionsHelper extends HelperBase
|
||||
/**
|
||||
* Set icons for view
|
||||
*
|
||||
* @param AccountAcl $accountAcl
|
||||
* @param AccountActionsDto $accountActionsDto
|
||||
* @param AccountAcl $accountAcl
|
||||
* @param AccountActionsDto $accountActionsDto
|
||||
*
|
||||
* @return DataGridAction[]
|
||||
*/
|
||||
@@ -262,7 +262,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
|
||||
if ($accountAcl->isShowDelete()) {
|
||||
$actions[] = $this->getDeleteAction()
|
||||
->addData('item-id', $accountActionsDto->getAccountId());
|
||||
->addData('item-id', $accountActionsDto->getAccountId());
|
||||
}
|
||||
|
||||
if ($accountActionsDto->isHistory() === false
|
||||
@@ -300,14 +300,14 @@ final class AccountActionsHelper extends HelperBase
|
||||
if ($accountAcl->isShowViewPass()) {
|
||||
if ($accountActionsDto->isHistory()) {
|
||||
$actionViewPass = $this->getViewPassHistoryAction()
|
||||
->addData('item-id', $accountActionsDto->getAccountHistoryId());
|
||||
->addData('item-id', $accountActionsDto->getAccountHistoryId());
|
||||
$actionCopy = $this->getCopyPassHistoryAction()
|
||||
->addData('item-id', $accountActionsDto->getAccountHistoryId());
|
||||
->addData('item-id', $accountActionsDto->getAccountHistoryId());
|
||||
} else {
|
||||
$actionViewPass = $this->getViewPassAction()
|
||||
->addData('item-id', $accountActionsDto->getAccountId());
|
||||
->addData('item-id', $accountActionsDto->getAccountId());
|
||||
$actionCopy = $this->getCopyPassAction()
|
||||
->addData('item-id', $accountActionsDto->getAccountId());
|
||||
->addData('item-id', $accountActionsDto->getAccountId());
|
||||
}
|
||||
|
||||
$actionViewPass->addData('parent-id', $accountActionsDto->getAccountParentId());
|
||||
@@ -319,7 +319,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
|
||||
if ($accountAcl->isShowCopy()) {
|
||||
$actions[] = $this->getCopyAction()
|
||||
->addData('item-id', $accountActionsDto->getAccountId());
|
||||
->addData('item-id', $accountActionsDto->getAccountId());
|
||||
}
|
||||
|
||||
return $actions;
|
||||
@@ -336,7 +336,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('Remove Account'));
|
||||
$action->setTitle(__('Remove Account'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconDelete());
|
||||
$action->setIcon($this->icons->delete());
|
||||
$action->setRuntimeFilter(AccountSearchItem::class, 'isShowDelete');
|
||||
$action->addData('action-route', Acl::getActionRoute(AclActionsInterface::ACCOUNT_DELETE));
|
||||
$action->addData('onclick', Acl::getActionRoute(AclActionsInterface::ACCOUNT_DELETE));
|
||||
@@ -355,7 +355,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('Update Public Link'));
|
||||
$action->setTitle(__('Update Public Link'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconPublicLink());
|
||||
$action->setIcon($this->icons->publicLink());
|
||||
$action->addData('action-route', Acl::getActionRoute(AclActionsInterface::PUBLICLINK_REFRESH));
|
||||
$action->addData('onclick', 'link/refresh');
|
||||
$action->addData('action-next', Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW));
|
||||
@@ -369,7 +369,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
*/
|
||||
public function getPublicLinkDeleteAction(): DataGridAction
|
||||
{
|
||||
$icon = clone $this->icons->getIconPublicLink();
|
||||
$icon = clone $this->icons->publicLink();
|
||||
$icon->setIcon('link_off');
|
||||
|
||||
$action = new DataGridAction();
|
||||
@@ -396,7 +396,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('Create Public Link'));
|
||||
$action->setTitle(__('Create Public Link'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconPublicLink());
|
||||
$action->setIcon($this->icons->publicLink());
|
||||
$action->addData('action-route', 'publicLink/saveCreateFromAccount');
|
||||
$action->addData('onclick', 'link/save');
|
||||
$action->addData('action-next', Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW));
|
||||
@@ -416,7 +416,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('View password'));
|
||||
$action->setTitle(__('View password'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconViewPass());
|
||||
$action->setIcon($this->icons->viewPass());
|
||||
$action->setRuntimeFilter(AccountSearchItem::class, 'isShowViewPass');
|
||||
$action->addData('action-route', Acl::getActionRoute(AclActionsInterface::ACCOUNT_HISTORY_VIEW_PASS));
|
||||
$action->addData('action-full', 1);
|
||||
@@ -438,7 +438,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setTitle(__('Copy Password to Clipboard'));
|
||||
$action->addClass('btn-action');
|
||||
$action->addClass('clip-pass-button');
|
||||
$action->setIcon($this->icons->getIconClipboard());
|
||||
$action->setIcon($this->icons->clipboard());
|
||||
$action->setRuntimeFilter(AccountSearchItem::class, 'isShowCopyPass');
|
||||
$action->addData('action-route', Acl::getActionRoute(AclActionsInterface::ACCOUNT_HISTORY_COPY_PASS));
|
||||
$action->addData('action-full', 0);
|
||||
@@ -459,7 +459,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('View password'));
|
||||
$action->setTitle(__('View password'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconViewPass());
|
||||
$action->setIcon($this->icons->viewPass());
|
||||
$action->setRuntimeFilter(AccountSearchItem::class, 'isShowViewPass');
|
||||
$action->addData('action-route', Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW_PASS));
|
||||
$action->addData('action-full', 1);
|
||||
@@ -481,7 +481,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setTitle(__('Copy Password to Clipboard'));
|
||||
$action->addClass('btn-action');
|
||||
$action->addClass('clip-pass-button');
|
||||
$action->setIcon($this->icons->getIconClipboard());
|
||||
$action->setIcon($this->icons->clipboard());
|
||||
$action->setRuntimeFilter(AccountSearchItem::class, 'isShowCopyPass');
|
||||
$action->addData('action-route', Acl::getActionRoute(AclActionsInterface::ACCOUNT_COPY_PASS));
|
||||
$action->addData('action-full', 0);
|
||||
@@ -502,7 +502,7 @@ final class AccountActionsHelper extends HelperBase
|
||||
$action->setName(__('Copy Account'));
|
||||
$action->setTitle(__('Copy Account'));
|
||||
$action->addClass('btn-action');
|
||||
$action->setIcon($this->icons->getIconCopy());
|
||||
$action->setIcon($this->icons->copy());
|
||||
$action->setRuntimeFilter(AccountSearchItem::class, 'isShowCopy');
|
||||
$action->addData('action-route', Acl::getActionRoute(AclActionsInterface::ACCOUNT_COPY));
|
||||
$action->addData('onclick', Acl::getActionRoute(AclActionsInterface::ACCOUNT_COPY));
|
||||
|
||||
@@ -34,6 +34,7 @@ use SP\Core\Exceptions\QueryException;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\DataModel\ProfileData;
|
||||
use SP\DataModel\UserPreferencesData;
|
||||
use SP\Domain\Account\Ports\AccountSearchServiceInterface;
|
||||
use SP\Domain\Account\Search\AccountSearchConstants;
|
||||
use SP\Domain\Account\Search\AccountSearchFilter;
|
||||
use SP\Domain\Account\Services\AccountSearchItem;
|
||||
@@ -68,20 +69,20 @@ final class AccountSearchHelper extends HelperBase
|
||||
private bool $isIndex;
|
||||
private ?AccountSearchFilter $accountSearchFilter = null;
|
||||
private ClientServiceInterface $clientService;
|
||||
private \SP\Domain\Account\Ports\AccountSearchServiceInterface $accountSearchService;
|
||||
private AccountSearchServiceInterface $accountSearchService;
|
||||
private AccountActionsHelper $accountActionsHelper;
|
||||
private CategoryServiceInterface $categoryService;
|
||||
private TagServiceInterface $tagService;
|
||||
|
||||
public function __construct(
|
||||
Application $application,
|
||||
TemplateInterface $template,
|
||||
RequestInterface $request,
|
||||
ClientServiceInterface $clientService,
|
||||
CategoryServiceInterface $categoryService,
|
||||
TagServiceInterface $tagService,
|
||||
\SP\Domain\Account\Ports\AccountSearchServiceInterface $accountSearchService,
|
||||
AccountActionsHelper $accountActionsHelper
|
||||
Application $application,
|
||||
TemplateInterface $template,
|
||||
RequestInterface $request,
|
||||
ClientServiceInterface $clientService,
|
||||
CategoryServiceInterface $categoryService,
|
||||
TagServiceInterface $tagService,
|
||||
AccountSearchServiceInterface $accountSearchService,
|
||||
AccountActionsHelper $accountActionsHelper
|
||||
) {
|
||||
parent::__construct($application, $template, $request);
|
||||
|
||||
@@ -96,11 +97,76 @@ final class AccountSearchHelper extends HelperBase
|
||||
$this->setVars();
|
||||
}
|
||||
|
||||
/**
|
||||
* Establecer las variables necesarias para las plantillas
|
||||
*/
|
||||
private function setVars(): void
|
||||
{
|
||||
$userData = $this->context->getUserData();
|
||||
|
||||
$this->view->assign('isAdmin', $userData->getIsAdminApp() || $userData->getIsAdminAcc());
|
||||
|
||||
$profileData = $this->context->getUserProfile() ?? new ProfileData();
|
||||
|
||||
$this->view->assign(
|
||||
'showGlobalSearch',
|
||||
$this->configData->isGlobalSearch() && $profileData->isAccGlobalSearch()
|
||||
);
|
||||
|
||||
$this->accountSearchFilter = $this->getFilters();
|
||||
|
||||
$this->view->assign('searchCustomer', $this->accountSearchFilter->getClientId());
|
||||
$this->view->assign('searchCategory', $this->accountSearchFilter->getCategoryId());
|
||||
$this->view->assign('searchTags', $this->accountSearchFilter->getTagsId());
|
||||
$this->view->assign('searchTxt', $this->accountSearchFilter->getTxtSearch());
|
||||
$this->view->assign('searchGlobal', $this->accountSearchFilter->getGlobalSearch());
|
||||
$this->view->assign('searchFavorites', $this->accountSearchFilter->isSearchFavorites());
|
||||
$this->view->assign('searchRoute', Acl::getActionRoute(AclActionsInterface::ACCOUNT_SEARCH));
|
||||
$this->view->assign('favoriteRouteOn', Acl::getActionRoute(AclActionsInterface::ACCOUNT_FAVORITE_ADD));
|
||||
$this->view->assign('favoriteRouteOff', Acl::getActionRoute(AclActionsInterface::ACCOUNT_FAVORITE_DELETE));
|
||||
$this->view->assign('viewAccountRoute', Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set search filters
|
||||
*
|
||||
* @return AccountSearchFilter
|
||||
*/
|
||||
private function getFilters(): AccountSearchFilter
|
||||
{
|
||||
$accountSearchFilter = $this->context->getSearchFilters();
|
||||
|
||||
// Return search filters from session if accessed from menu
|
||||
if ($accountSearchFilter !== null && $this->isIndex) {
|
||||
return $accountSearchFilter;
|
||||
}
|
||||
|
||||
$userPreferences = $this->context->getUserData()->getPreferences() ?? new UserPreferencesData();
|
||||
$limitCount = $userPreferences->getResultsPerPage() > 0
|
||||
? $userPreferences->getResultsPerPage()
|
||||
: $this->configData->getAccountCount();
|
||||
|
||||
$accountSearchFilter = new AccountSearchFilter();
|
||||
$accountSearchFilter->setSortKey($this->request->analyzeInt('skey', 0));
|
||||
$accountSearchFilter->setSortOrder($this->request->analyzeInt('sorder', 0));
|
||||
$accountSearchFilter->setLimitStart($this->request->analyzeInt('start', 0));
|
||||
$accountSearchFilter->setLimitCount($this->request->analyzeInt('rpp', $limitCount));
|
||||
$accountSearchFilter->setGlobalSearch($this->request->analyzeBool('gsearch', false));
|
||||
$accountSearchFilter->setClientId($this->request->analyzeInt('client'));
|
||||
$accountSearchFilter->setCategoryId($this->request->analyzeInt('category'));
|
||||
$accountSearchFilter->setTagsId($this->request->analyzeArray('tags', null, []));
|
||||
$accountSearchFilter->setSearchFavorites($this->request->analyzeBool('searchfav', false));
|
||||
$accountSearchFilter->setTxtSearch($this->request->analyzeString('search'));
|
||||
$accountSearchFilter->setSortViews($userPreferences->isSortViews());
|
||||
|
||||
return $accountSearchFilter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtener los datos para la caja de búsqueda
|
||||
*
|
||||
* @throws \SP\Core\Exceptions\ConstraintException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @throws ConstraintException
|
||||
* @throws QueryException
|
||||
*/
|
||||
public function getSearchBox(): void
|
||||
{
|
||||
@@ -109,19 +175,19 @@ final class AccountSearchHelper extends HelperBase
|
||||
$this->view->assign(
|
||||
'clients',
|
||||
SelectItemAdapter::factory($this->clientService->getAllForUser())
|
||||
->getItemsFromModelSelected(
|
||||
[$this->accountSearchFilter->getClientId()]
|
||||
)
|
||||
->getItemsFromModelSelected(
|
||||
[$this->accountSearchFilter->getClientId()]
|
||||
)
|
||||
);
|
||||
$this->view->assign(
|
||||
'categories',
|
||||
SelectItemAdapter::factory($this->categoryService->getAllBasic())
|
||||
->getItemsFromModelSelected([$this->accountSearchFilter->getCategoryId()])
|
||||
->getItemsFromModelSelected([$this->accountSearchFilter->getCategoryId()])
|
||||
);
|
||||
$this->view->assign(
|
||||
'tags',
|
||||
SelectItemAdapter::factory($this->tagService->getAllBasic())
|
||||
->getItemsFromModelSelected($this->accountSearchFilter->getTagsId())
|
||||
->getItemsFromModelSelected($this->accountSearchFilter->getTagsId())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -203,7 +269,7 @@ final class AccountSearchHelper extends HelperBase
|
||||
$gridActionOptional->setId(0);
|
||||
$gridActionOptional->setName(__('More Actions'));
|
||||
$gridActionOptional->setTitle(__('More Actions'));
|
||||
$gridActionOptional->setIcon($icons->getIconOptional());
|
||||
$gridActionOptional->setIcon($icons->optional());
|
||||
$gridActionOptional->setRuntimeFilter(
|
||||
AccountSearchItem::class,
|
||||
'isShowOptional'
|
||||
@@ -211,10 +277,10 @@ final class AccountSearchHelper extends HelperBase
|
||||
$gridActionOptional->addData('onclick', 'account/menu');
|
||||
|
||||
$gridPager = new DataGridPager();
|
||||
$gridPager->setIconPrev($icons->getIconNavPrev());
|
||||
$gridPager->setIconNext($icons->getIconNavNext());
|
||||
$gridPager->setIconFirst($icons->getIconNavFirst());
|
||||
$gridPager->setIconLast($icons->getIconNavLast());
|
||||
$gridPager->setIconPrev($icons->navPrev());
|
||||
$gridPager->setIconNext($icons->navNext());
|
||||
$gridPager->setIconFirst($icons->navFirst());
|
||||
$gridPager->setIconLast($icons->navLast());
|
||||
$gridPager->setSortKey($this->accountSearchFilter->getSortKey());
|
||||
$gridPager->setSortOrder($this->accountSearchFilter->getSortOrder());
|
||||
$gridPager->setLimitStart($this->accountSearchFilter->getLimitStart());
|
||||
@@ -274,111 +340,46 @@ final class AccountSearchHelper extends HelperBase
|
||||
|
||||
$gridSortCustomer = new DataGridSort();
|
||||
$gridSortCustomer->setName(__('Client'))
|
||||
->setTitle(__('Sort by Client'))
|
||||
->setSortKey(AccountSearchConstants::SORT_CLIENT)
|
||||
->setIconUp($icons->getIconUp())
|
||||
->setIconDown($icons->getIconDown());
|
||||
->setTitle(__('Sort by Client'))
|
||||
->setSortKey(AccountSearchConstants::SORT_CLIENT)
|
||||
->setIconUp($icons->up())
|
||||
->setIconDown($icons->down());
|
||||
|
||||
$gridSortName = new DataGridSort();
|
||||
$gridSortName->setName(__('Name'))
|
||||
->setTitle(__('Sort by Name'))
|
||||
->setSortKey(AccountSearchConstants::SORT_NAME)
|
||||
->setIconUp($icons->getIconUp())
|
||||
->setIconDown($icons->getIconDown());
|
||||
->setTitle(__('Sort by Name'))
|
||||
->setSortKey(AccountSearchConstants::SORT_NAME)
|
||||
->setIconUp($icons->up())
|
||||
->setIconDown($icons->down());
|
||||
|
||||
$gridSortCategory = new DataGridSort();
|
||||
$gridSortCategory->setName(__('Category'))
|
||||
->setTitle(__('Sort by Category'))
|
||||
->setSortKey(AccountSearchConstants::SORT_CATEGORY)
|
||||
->setIconUp($icons->getIconUp())
|
||||
->setIconDown($icons->getIconDown());
|
||||
->setTitle(__('Sort by Category'))
|
||||
->setSortKey(AccountSearchConstants::SORT_CATEGORY)
|
||||
->setIconUp($icons->up())
|
||||
->setIconDown($icons->down());
|
||||
|
||||
$gridSortLogin = new DataGridSort();
|
||||
$gridSortLogin->setName(__('User'))
|
||||
->setTitle(__('Sort by Username'))
|
||||
->setSortKey(AccountSearchConstants::SORT_LOGIN)
|
||||
->setIconUp($icons->getIconUp())
|
||||
->setIconDown($icons->getIconDown());
|
||||
->setTitle(__('Sort by Username'))
|
||||
->setSortKey(AccountSearchConstants::SORT_LOGIN)
|
||||
->setIconUp($icons->up())
|
||||
->setIconDown($icons->down());
|
||||
|
||||
$gridSortUrl = new DataGridSort();
|
||||
$gridSortUrl->setName(__('URL / IP'))
|
||||
->setTitle(__('Sort by URL / IP'))
|
||||
->setSortKey(AccountSearchConstants::SORT_URL)
|
||||
->setIconUp($icons->getIconUp())
|
||||
->setIconDown($icons->getIconDown());
|
||||
->setTitle(__('Sort by URL / IP'))
|
||||
->setSortKey(AccountSearchConstants::SORT_URL)
|
||||
->setIconUp($icons->up())
|
||||
->setIconDown($icons->down());
|
||||
|
||||
$gridHeaderSort = new DataGridHeaderSort();
|
||||
$gridHeaderSort->addSortField($gridSortCustomer)
|
||||
->addSortField($gridSortName)
|
||||
->addSortField($gridSortCategory)
|
||||
->addSortField($gridSortLogin)
|
||||
->addSortField($gridSortUrl);
|
||||
->addSortField($gridSortName)
|
||||
->addSortField($gridSortCategory)
|
||||
->addSortField($gridSortLogin)
|
||||
->addSortField($gridSortUrl);
|
||||
|
||||
return $gridHeaderSort;
|
||||
}
|
||||
|
||||
/**
|
||||
* Establecer las variables necesarias para las plantillas
|
||||
*/
|
||||
private function setVars(): void
|
||||
{
|
||||
$userData = $this->context->getUserData();
|
||||
|
||||
$this->view->assign('isAdmin', $userData->getIsAdminApp() || $userData->getIsAdminAcc());
|
||||
|
||||
$profileData = $this->context->getUserProfile() ?? new ProfileData();
|
||||
|
||||
$this->view->assign(
|
||||
'showGlobalSearch',
|
||||
$this->configData->isGlobalSearch() && $profileData->isAccGlobalSearch()
|
||||
);
|
||||
|
||||
$this->accountSearchFilter = $this->getFilters();
|
||||
|
||||
$this->view->assign('searchCustomer', $this->accountSearchFilter->getClientId());
|
||||
$this->view->assign('searchCategory', $this->accountSearchFilter->getCategoryId());
|
||||
$this->view->assign('searchTags', $this->accountSearchFilter->getTagsId());
|
||||
$this->view->assign('searchTxt', $this->accountSearchFilter->getTxtSearch());
|
||||
$this->view->assign('searchGlobal', $this->accountSearchFilter->getGlobalSearch());
|
||||
$this->view->assign('searchFavorites', $this->accountSearchFilter->isSearchFavorites());
|
||||
$this->view->assign('searchRoute', Acl::getActionRoute(AclActionsInterface::ACCOUNT_SEARCH));
|
||||
$this->view->assign('favoriteRouteOn', Acl::getActionRoute(AclActionsInterface::ACCOUNT_FAVORITE_ADD));
|
||||
$this->view->assign('favoriteRouteOff', Acl::getActionRoute(AclActionsInterface::ACCOUNT_FAVORITE_DELETE));
|
||||
$this->view->assign('viewAccountRoute', Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set search filters
|
||||
*
|
||||
* @return \SP\Domain\Account\Search\AccountSearchFilter
|
||||
*/
|
||||
private function getFilters(): AccountSearchFilter
|
||||
{
|
||||
$accountSearchFilter = $this->context->getSearchFilters();
|
||||
|
||||
// Return search filters from session if accessed from menu
|
||||
if ($accountSearchFilter !== null && $this->isIndex) {
|
||||
return $accountSearchFilter;
|
||||
}
|
||||
|
||||
$userPreferences = $this->context->getUserData()->getPreferences() ?? new UserPreferencesData();
|
||||
$limitCount = $userPreferences->getResultsPerPage() > 0
|
||||
? $userPreferences->getResultsPerPage()
|
||||
: $this->configData->getAccountCount();
|
||||
|
||||
$accountSearchFilter = new AccountSearchFilter();
|
||||
$accountSearchFilter->setSortKey($this->request->analyzeInt('skey', 0));
|
||||
$accountSearchFilter->setSortOrder($this->request->analyzeInt('sorder', 0));
|
||||
$accountSearchFilter->setLimitStart($this->request->analyzeInt('start', 0));
|
||||
$accountSearchFilter->setLimitCount($this->request->analyzeInt('rpp', $limitCount));
|
||||
$accountSearchFilter->setGlobalSearch($this->request->analyzeBool('gsearch', false));
|
||||
$accountSearchFilter->setClientId($this->request->analyzeInt('client'));
|
||||
$accountSearchFilter->setCategoryId($this->request->analyzeInt('category'));
|
||||
$accountSearchFilter->setTagsId($this->request->analyzeArray('tags', null, []));
|
||||
$accountSearchFilter->setSearchFavorites($this->request->analyzeBool('searchfav', false));
|
||||
$accountSearchFilter->setTxtSearch($this->request->analyzeString('search'));
|
||||
$accountSearchFilter->setSortViews($userPreferences->isSortViews());
|
||||
|
||||
return $accountSearchFilter;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,15 +68,17 @@ final class AccountGrid extends GridBase
|
||||
|
||||
$grid->addDataAction(
|
||||
$this->getBulkEditAction()
|
||||
->setIsSelection(true),
|
||||
true);
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true);
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
$grid->setTime(round(getElapsedTime($this->queryTimeStart), 5));
|
||||
|
||||
@@ -163,7 +165,7 @@ final class AccountGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::VIEW_ITEM);
|
||||
$gridAction->setName(__('Account Details'));
|
||||
$gridAction->setTitle(__('Account Details'));
|
||||
$gridAction->setIcon($this->icons->getIconView());
|
||||
$gridAction->setIcon($this->icons->view());
|
||||
$gridAction->setOnClickFunction(Acl::getActionRoute(AclActionsInterface::ACCOUNT_VIEW));
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -183,7 +185,7 @@ final class AccountGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Remove Account'));
|
||||
$gridAction->setTitle(__('Remove Account'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -203,7 +205,7 @@ final class AccountGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(__('Bulk Update'));
|
||||
$gridAction->setTitle(__('Bulk Update'));
|
||||
$gridAction->setIcon($this->icons->getIconEdit());
|
||||
$gridAction->setIcon($this->icons->edit());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -64,10 +64,11 @@ final class AccountHistoryGrid extends GridBase
|
||||
$grid->addDataAction($this->getDeleteAction());
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true);
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
$grid->setTime(round(getElapsedTime($this->queryTimeStart), 5));
|
||||
|
||||
@@ -113,8 +114,8 @@ final class AccountHistoryGrid extends GridBase
|
||||
protected function getData(): DataGridData
|
||||
{
|
||||
// Grid Data
|
||||
$iconEdit = clone $this->icons->getIconEdit();
|
||||
$iconDelete = clone $this->icons->getIconDelete();
|
||||
$iconEdit = clone $this->icons->edit();
|
||||
$iconDelete = clone $this->icons->delete();
|
||||
|
||||
// Grid Data
|
||||
$gridData = new DataGridData();
|
||||
@@ -126,12 +127,12 @@ final class AccountHistoryGrid extends GridBase
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'isModify',
|
||||
$iconEdit->setTitle(__('Modified'))
|
||||
->setClass('opacity50')
|
||||
->setClass('opacity50')
|
||||
);
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'isDeleted',
|
||||
$iconDelete->setTitle(__('Removed'))
|
||||
->setClass('opacity50')
|
||||
->setClass('opacity50')
|
||||
);
|
||||
$gridData->setData($this->queryResult);
|
||||
|
||||
@@ -167,7 +168,7 @@ final class AccountHistoryGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(__('Account Restore'));
|
||||
$gridAction->setTitle(__('Account Restore'));
|
||||
$gridAction->setIcon($this->icons->getIconRestore());
|
||||
$gridAction->setIcon($this->icons->restore());
|
||||
$gridAction->setOnClickFunction('accountManager/restore');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -187,7 +188,7 @@ final class AccountHistoryGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Remove Account'));
|
||||
$gridAction->setTitle(__('Remove Account'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -67,10 +67,11 @@ final class AuthTokenGrid extends GridBase
|
||||
$grid->addDataAction($this->getDeleteAction());
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true);
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
$grid->setTime(round(getElapsedTime($this->queryTimeStart), 5));
|
||||
|
||||
@@ -158,7 +159,7 @@ final class AuthTokenGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::MENUBAR_ITEM);
|
||||
$gridAction->setName(__('New Authorization'));
|
||||
$gridAction->setTitle(__('New Authorization'));
|
||||
$gridAction->setIcon($this->icons->getIconAdd());
|
||||
$gridAction->setIcon($this->icons->add());
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
@@ -179,7 +180,7 @@ final class AuthTokenGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::VIEW_ITEM);
|
||||
$gridAction->setName(__('View Authorization token'));
|
||||
$gridAction->setTitle(__('View Authorization token'));
|
||||
$gridAction->setIcon($this->icons->getIconView());
|
||||
$gridAction->setIcon($this->icons->view());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -199,7 +200,7 @@ final class AuthTokenGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(__('Edit Authorization'));
|
||||
$gridAction->setTitle(__('Edit Authorization'));
|
||||
$gridAction->setIcon($this->icons->getIconEdit());
|
||||
$gridAction->setIcon($this->icons->edit());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -219,7 +220,7 @@ final class AuthTokenGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete Authorization'));
|
||||
$gridAction->setTitle(__('Delete Authorization'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -66,10 +66,11 @@ final class CategoryGrid extends GridBase
|
||||
$grid->addDataAction($this->getDeleteAction());
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true);
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
$grid->setTime(round(getElapsedTime($this->queryTimeStart), 5));
|
||||
|
||||
@@ -151,7 +152,7 @@ final class CategoryGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::MENUBAR_ITEM);
|
||||
$gridAction->setName(__('New Category'));
|
||||
$gridAction->setTitle(__('New Category'));
|
||||
$gridAction->setIcon($this->icons->getIconAdd());
|
||||
$gridAction->setIcon($this->icons->add());
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
@@ -172,7 +173,7 @@ final class CategoryGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(__('Edit Category'));
|
||||
$gridAction->setTitle(__('Edit Category'));
|
||||
$gridAction->setIcon($this->icons->getIconEdit());
|
||||
$gridAction->setIcon($this->icons->edit());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -192,7 +193,7 @@ final class CategoryGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete Category'));
|
||||
$gridAction->setTitle(__('Delete Category'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -65,10 +65,11 @@ final class ClientGrid extends GridBase
|
||||
$grid->addDataAction($this->getDeleteAction());
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true);
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
$grid->setTime(round(getElapsedTime($this->queryTimeStart), 5));
|
||||
|
||||
@@ -158,7 +159,7 @@ final class ClientGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::MENUBAR_ITEM);
|
||||
$gridAction->setName(__('New Client'));
|
||||
$gridAction->setTitle(__('New Client'));
|
||||
$gridAction->setIcon($this->icons->getIconAdd());
|
||||
$gridAction->setIcon($this->icons->add());
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
@@ -179,7 +180,7 @@ final class ClientGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(__('Edit Client'));
|
||||
$gridAction->setTitle(__('Edit Client'));
|
||||
$gridAction->setIcon($this->icons->getIconEdit());
|
||||
$gridAction->setIcon($this->icons->edit());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -199,7 +200,7 @@ final class ClientGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete Client'));
|
||||
$gridAction->setTitle(__('Delete Client'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -66,10 +66,11 @@ final class CustomFieldGrid extends GridBase
|
||||
$grid->addDataAction($this->getDeleteAction());
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true);
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
|
||||
$grid->setTime(round(getElapsedTime($this->queryTimeStart), 5));
|
||||
@@ -128,7 +129,7 @@ final class CustomFieldGrid extends GridBase
|
||||
$gridData->addDataRowSource('typeName');
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'isEncrypted',
|
||||
$this->icons->getIconEditPass()->setTitle(__('Encrypted'))
|
||||
$this->icons->editPass()->setTitle(__('Encrypted'))
|
||||
);
|
||||
$gridData->setData($this->queryResult);
|
||||
|
||||
@@ -165,7 +166,7 @@ final class CustomFieldGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::MENUBAR_ITEM);
|
||||
$gridAction->setName(__('New Field'));
|
||||
$gridAction->setTitle(__('New Field'));
|
||||
$gridAction->setIcon($this->icons->getIconAdd());
|
||||
$gridAction->setIcon($this->icons->add());
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
@@ -186,7 +187,7 @@ final class CustomFieldGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(__('Edit Field'));
|
||||
$gridAction->setTitle(__('Edit Field'));
|
||||
$gridAction->setIcon($this->icons->getIconEdit());
|
||||
$gridAction->setIcon($this->icons->edit());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -206,7 +207,7 @@ final class CustomFieldGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete Field'));
|
||||
$gridAction->setTitle(__('Delete Field'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -119,10 +119,13 @@ final class EventlogGrid extends GridBase
|
||||
$gridData->addDataRowSource('level');
|
||||
$gridData->addDataRowSource('action', null, null, false);
|
||||
$gridData->addDataRowSource('login');
|
||||
$gridData->addDataRowSource('ipAddress', false,
|
||||
$gridData->addDataRowSource(
|
||||
'ipAddress',
|
||||
false,
|
||||
function ($value) use ($isDemoMode) {
|
||||
return $isDemoMode ? '*.*.*.*' : $value;
|
||||
});
|
||||
}
|
||||
);
|
||||
$gridData->addDataRowSource(
|
||||
'description',
|
||||
false,
|
||||
@@ -137,10 +140,11 @@ final class EventlogGrid extends GridBase
|
||||
|
||||
if (preg_match('/^SQL.*/m', $value)) {
|
||||
$value = preg_replace([
|
||||
'/([a-zA-Z_]+),/m',
|
||||
'/(UPDATE|DELETE|TRUNCATE|INSERT|SELECT|WHERE|LEFT|ORDER|LIMIT|FROM)/m'],
|
||||
['\\1,<br>', '<br>\\1'],
|
||||
$value
|
||||
'/([a-zA-Z_]+),/m',
|
||||
'/(UPDATE|DELETE|TRUNCATE|INSERT|SELECT|WHERE|LEFT|ORDER|LIMIT|FROM)/m'
|
||||
],
|
||||
['\\1,<br>', '<br>\\1'],
|
||||
$value
|
||||
);
|
||||
}
|
||||
|
||||
@@ -189,7 +193,7 @@ final class EventlogGrid extends GridBase
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setName(__('Refresh'));
|
||||
$gridAction->setTitle(__('Refresh'));
|
||||
$gridAction->setIcon($this->icons->getIconRefresh());
|
||||
$gridAction->setIcon($this->icons->refresh());
|
||||
$gridAction->setOnClickFunction('eventlog/refresh');
|
||||
$gridAction->addData('action-form', 'frmSearchEvent');
|
||||
$gridAction->addData(
|
||||
@@ -211,7 +215,7 @@ final class EventlogGrid extends GridBase
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setName(__('Clear the event log out'));
|
||||
$gridAction->setTitle(__('Clear the event log out'));
|
||||
$gridAction->setIcon($this->icons->getIconClear());
|
||||
$gridAction->setIcon($this->icons->clear());
|
||||
$gridAction->setOnClickFunction('eventlog/clear');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -65,10 +65,11 @@ final class FileGrid extends GridBase
|
||||
$grid->addDataAction($this->getDeleteAction());
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true);
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
|
||||
$grid->setTime(round(getElapsedTime($this->queryTimeStart), 5));
|
||||
@@ -163,7 +164,7 @@ final class FileGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::VIEW_ITEM);
|
||||
$gridAction->setName(__('View File'));
|
||||
$gridAction->setTitle(__('View File'));
|
||||
$gridAction->setIcon($this->icons->getIconView());
|
||||
$gridAction->setIcon($this->icons->view());
|
||||
$gridAction->setOnClickFunction('file/view');
|
||||
$gridAction->setFilterRowSource('type', 'application/pdf');
|
||||
$gridAction->addData(
|
||||
@@ -184,7 +185,7 @@ final class FileGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::VIEW_ITEM);
|
||||
$gridAction->setName(__('Download File'));
|
||||
$gridAction->setTitle(__('Download File'));
|
||||
$gridAction->setIcon($this->icons->getIconDownload());
|
||||
$gridAction->setIcon($this->icons->download());
|
||||
$gridAction->setOnClickFunction('file/download');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -209,7 +210,7 @@ final class FileGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete File'));
|
||||
$gridAction->setTitle(__('Delete File'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2021, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -52,7 +52,7 @@ abstract class GridBase extends HelperBase implements GridInterface
|
||||
Application $application,
|
||||
TemplateInterface $template,
|
||||
RequestInterface $request,
|
||||
Acl $acl
|
||||
Acl $acl
|
||||
) {
|
||||
parent::__construct($application, $template, $request);
|
||||
|
||||
@@ -65,8 +65,8 @@ abstract class GridBase extends HelperBase implements GridInterface
|
||||
/**
|
||||
* Actualizar los datos del paginador
|
||||
*
|
||||
* @param DataGridInterface $dataGrid
|
||||
* @param ItemSearchData $itemSearchData
|
||||
* @param DataGridInterface $dataGrid
|
||||
* @param ItemSearchData $itemSearchData
|
||||
*
|
||||
* @return DataGridInterface
|
||||
*/
|
||||
@@ -75,9 +75,9 @@ abstract class GridBase extends HelperBase implements GridInterface
|
||||
ItemSearchData $itemSearchData
|
||||
): DataGridInterface {
|
||||
$dataGrid->getPager()
|
||||
->setLimitStart($itemSearchData->getLimitStart())
|
||||
->setLimitCount($itemSearchData->getLimitCount())
|
||||
->setFilterOn(!empty($itemSearchData->getSeachString()));
|
||||
->setLimitStart($itemSearchData->getLimitStart())
|
||||
->setLimitCount($itemSearchData->getLimitCount())
|
||||
->setFilterOn(!empty($itemSearchData->getSeachString()));
|
||||
|
||||
$dataGrid->updatePager();
|
||||
|
||||
@@ -87,7 +87,7 @@ abstract class GridBase extends HelperBase implements GridInterface
|
||||
/**
|
||||
* Devolver el paginador por defecto
|
||||
*
|
||||
* @param DataGridActionSearch $sourceAction
|
||||
* @param DataGridActionSearch $sourceAction
|
||||
*
|
||||
* @return DataGridPager
|
||||
*/
|
||||
@@ -99,10 +99,10 @@ abstract class GridBase extends HelperBase implements GridInterface
|
||||
$gridPager->setOnClickFunction('appMgmt/nav');
|
||||
$gridPager->setLimitStart(0);
|
||||
$gridPager->setLimitCount($this->configData->getAccountCount());
|
||||
$gridPager->setIconPrev($this->icons->getIconNavPrev());
|
||||
$gridPager->setIconNext($this->icons->getIconNavNext());
|
||||
$gridPager->setIconFirst($this->icons->getIconNavFirst());
|
||||
$gridPager->setIconLast($this->icons->getIconNavLast());
|
||||
$gridPager->setIconPrev($this->icons->navPrev());
|
||||
$gridPager->setIconNext($this->icons->navNext());
|
||||
$gridPager->setIconFirst($this->icons->navFirst());
|
||||
$gridPager->setIconLast($this->icons->navLast());
|
||||
|
||||
return $gridPager;
|
||||
}
|
||||
@@ -121,4 +121,4 @@ abstract class GridBase extends HelperBase implements GridInterface
|
||||
* @return DataGridData
|
||||
*/
|
||||
abstract protected function getData(): DataGridData;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,10 +69,11 @@ final class ItemPresetGrid extends GridBase
|
||||
$grid->addDataAction($this->getDeleteAction());
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setName(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true);
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setName(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
$grid->setTime(round(getElapsedTime($this->queryTimeStart), 5));
|
||||
|
||||
@@ -126,7 +127,7 @@ final class ItemPresetGrid extends GridBase
|
||||
$gridData->addDataRowSource('userGroupName');
|
||||
$gridData->addDataRowSource('userProfileName');
|
||||
$gridData->addDataRowSource('priority');
|
||||
$gridData->addDataRowSourceWithIcon('fixed', $this->icons->getIconEnabled());
|
||||
$gridData->addDataRowSourceWithIcon('fixed', $this->icons->enabled());
|
||||
$gridData->setData($this->queryResult);
|
||||
|
||||
return $gridData;
|
||||
@@ -163,13 +164,14 @@ final class ItemPresetGrid extends GridBase
|
||||
$gridAction->setName(__('Permission Preset'));
|
||||
$gridAction->setTitle(__('New Permission Preset'));
|
||||
|
||||
$icon = clone $this->icons->getIconAdd();
|
||||
$icon = clone $this->icons->add();
|
||||
|
||||
$gridAction->setIcon($icon->setIcon('add_circle'));
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
|
||||
$route = Acl::getActionRoute(AclActionsInterface::ITEMPRESET_CREATE) . '/' . ItemPresetInterface::ITEM_TYPE_ACCOUNT_PERMISSION;
|
||||
$route = Acl::getActionRoute(AclActionsInterface::ITEMPRESET_CREATE) . '/' .
|
||||
ItemPresetInterface::ITEM_TYPE_ACCOUNT_PERMISSION;
|
||||
|
||||
$gridAction->addData('action-route', $route);
|
||||
|
||||
@@ -187,13 +189,14 @@ final class ItemPresetGrid extends GridBase
|
||||
$gridAction->setName(__('Private Account Preset'));
|
||||
$gridAction->setTitle(__('New Private Account Preset'));
|
||||
|
||||
$icon = clone $this->icons->getIconAdd();
|
||||
$icon = clone $this->icons->add();
|
||||
|
||||
$gridAction->setIcon($icon->setIcon('add_circle'));
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
|
||||
$route = Acl::getActionRoute(AclActionsInterface::ITEMPRESET_CREATE) . '/' . ItemPresetInterface::ITEM_TYPE_ACCOUNT_PRIVATE;
|
||||
$route = Acl::getActionRoute(AclActionsInterface::ITEMPRESET_CREATE) . '/' .
|
||||
ItemPresetInterface::ITEM_TYPE_ACCOUNT_PRIVATE;
|
||||
|
||||
$gridAction->addData('action-route', $route);
|
||||
|
||||
@@ -211,13 +214,14 @@ final class ItemPresetGrid extends GridBase
|
||||
$gridAction->setName(__('Session Timeout Preset'));
|
||||
$gridAction->setTitle(__('New Session Timeout Preset'));
|
||||
|
||||
$icon = clone $this->icons->getIconAdd();
|
||||
$icon = clone $this->icons->add();
|
||||
|
||||
$gridAction->setIcon($icon->setIcon('add_circle'));
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
|
||||
$route = Acl::getActionRoute(AclActionsInterface::ITEMPRESET_CREATE) . '/' . ItemPresetInterface::ITEM_TYPE_SESSION_TIMEOUT;
|
||||
$route = Acl::getActionRoute(AclActionsInterface::ITEMPRESET_CREATE) . '/' .
|
||||
ItemPresetInterface::ITEM_TYPE_SESSION_TIMEOUT;
|
||||
|
||||
$gridAction->addData('action-route', $route);
|
||||
|
||||
@@ -235,13 +239,14 @@ final class ItemPresetGrid extends GridBase
|
||||
$gridAction->setName(__('Account Password Preset'));
|
||||
$gridAction->setTitle(__('New Account Password Preset'));
|
||||
|
||||
$icon = clone $this->icons->getIconAdd();
|
||||
$icon = clone $this->icons->add();
|
||||
|
||||
$gridAction->setIcon($icon->setIcon('add_circle'));
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
|
||||
$route = Acl::getActionRoute(AclActionsInterface::ITEMPRESET_CREATE) . '/' . ItemPresetInterface::ITEM_TYPE_ACCOUNT_PASSWORD;
|
||||
$route = Acl::getActionRoute(AclActionsInterface::ITEMPRESET_CREATE) . '/' .
|
||||
ItemPresetInterface::ITEM_TYPE_ACCOUNT_PASSWORD;
|
||||
|
||||
$gridAction->addData('action-route', $route);
|
||||
|
||||
@@ -258,7 +263,7 @@ final class ItemPresetGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(__('Edit Value'));
|
||||
$gridAction->setTitle(__('Edit Value'));
|
||||
$gridAction->setIcon($this->icons->getIconEdit());
|
||||
$gridAction->setIcon($this->icons->edit());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -278,7 +283,7 @@ final class ItemPresetGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete Value'));
|
||||
$gridAction->setTitle(__('Delete Value'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -82,10 +82,12 @@ final class NotificationGrid extends GridBase
|
||||
$grid->addDataAction(
|
||||
$this->setNonAdminFilter(
|
||||
$this->getDeleteAction()
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setName(__('Delete Selected'))
|
||||
->setIsSelection(true)),
|
||||
true);
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setName(__('Delete Selected'))
|
||||
->setIsSelection(true)
|
||||
),
|
||||
true
|
||||
);
|
||||
|
||||
|
||||
$grid->setTime(round(getElapsedTime($this->queryTimeStart), 5));
|
||||
@@ -153,15 +155,15 @@ final class NotificationGrid extends GridBase
|
||||
);
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'checked',
|
||||
$this->icons->getIconEnabled()->setTitle(__('Read'))
|
||||
$this->icons->enabled()->setTitle(__('Read'))
|
||||
);
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'onlyAdmin',
|
||||
$this->icons->getIconAppAdmin()->setTitle(__('Only Admins'))
|
||||
$this->icons->appAdmin()->setTitle(__('Only Admins'))
|
||||
);
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'sticky',
|
||||
$this->icons->getIconGroup()->setTitle(__('Global'))
|
||||
$this->icons->group()->setTitle(__('Global'))
|
||||
);
|
||||
$gridData->setData($this->queryResult);
|
||||
|
||||
@@ -198,7 +200,7 @@ final class NotificationGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::MENUBAR_ITEM);
|
||||
$gridAction->setName(__('New Notification'));
|
||||
$gridAction->setTitle(__('New Notification'));
|
||||
$gridAction->setIcon($this->icons->getIconAdd());
|
||||
$gridAction->setIcon($this->icons->add());
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('notification/show');
|
||||
$gridAction->addData(
|
||||
@@ -219,7 +221,7 @@ final class NotificationGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::VIEW_ITEM);
|
||||
$gridAction->setName(__('View Notification'));
|
||||
$gridAction->setTitle(__('View Notification'));
|
||||
$gridAction->setIcon($this->icons->getIconView());
|
||||
$gridAction->setIcon($this->icons->view());
|
||||
$gridAction->setOnClickFunction('notification/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -236,8 +238,7 @@ final class NotificationGrid extends GridBase
|
||||
*/
|
||||
private function setNonAdminFilter(
|
||||
DataGridActionInterface $gridAction
|
||||
): DataGridActionInterface
|
||||
{
|
||||
): DataGridActionInterface {
|
||||
if (!$this->isAdminApp) {
|
||||
$gridAction->setFilterRowSource('sticky');
|
||||
}
|
||||
@@ -254,7 +255,7 @@ final class NotificationGrid extends GridBase
|
||||
$gridAction->setId(AclActionsInterface::NOTIFICATION_CHECK);
|
||||
$gridAction->setName(__('Checkout Notification'));
|
||||
$gridAction->setTitle(__('Checkout Notification'));
|
||||
$gridAction->setIcon($this->icons->getIconEnabled());
|
||||
$gridAction->setIcon($this->icons->enabled());
|
||||
$gridAction->setOnClickFunction('notification/check');
|
||||
$gridAction->setFilterRowSource('checked');
|
||||
$gridAction->addData(
|
||||
@@ -278,7 +279,7 @@ final class NotificationGrid extends GridBase
|
||||
$gridAction->setId(AclActionsInterface::NOTIFICATION_EDIT);
|
||||
$gridAction->setName(__('Edit Notification'));
|
||||
$gridAction->setTitle(__('Edit Notification'));
|
||||
$gridAction->setIcon($this->icons->getIconEdit());
|
||||
$gridAction->setIcon($this->icons->edit());
|
||||
$gridAction->setOnClickFunction('notification/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -298,7 +299,7 @@ final class NotificationGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete Notification'));
|
||||
$gridAction->setTitle(__('Delete Notification'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('notification/delete');
|
||||
$gridAction->setFilterRowSource('checked', 0);
|
||||
$gridAction->addData(
|
||||
|
||||
@@ -113,16 +113,16 @@ final class PluginGrid extends GridBase
|
||||
$gridData->addDataRowSource('name');
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'enabled',
|
||||
$this->icons->getIconEnabled()
|
||||
$this->icons->enabled()
|
||||
);
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'enabled',
|
||||
$this->icons->getIconDisabled(),
|
||||
$this->icons->disabled(),
|
||||
0
|
||||
);
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'available',
|
||||
$this->icons->getIconDelete()->setTitle(__('Unavailable')),
|
||||
$this->icons->delete()->setTitle(__('Unavailable')),
|
||||
0
|
||||
);
|
||||
$gridData->setData($this->queryResult);
|
||||
@@ -160,7 +160,7 @@ final class PluginGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::VIEW_ITEM);
|
||||
$gridAction->setName(__('View Plugin'));
|
||||
$gridAction->setTitle(__('View Plugin'));
|
||||
$gridAction->setIcon($this->icons->getIconView());
|
||||
$gridAction->setIcon($this->icons->view());
|
||||
$gridAction->setOnClickFunction('plugin/show');
|
||||
$gridAction->setFilterRowSource('available', 0);
|
||||
$gridAction->addData(
|
||||
@@ -180,7 +180,7 @@ final class PluginGrid extends GridBase
|
||||
$gridAction->setId(AclActionsInterface::PLUGIN_ENABLE);
|
||||
$gridAction->setName(__('Enable'));
|
||||
$gridAction->setTitle(__('Enable'));
|
||||
$gridAction->setIcon($this->icons->getIconEnabled());
|
||||
$gridAction->setIcon($this->icons->enabled());
|
||||
$gridAction->setOnClickFunction('plugin/toggle');
|
||||
$gridAction->setFilterRowSource('enabled');
|
||||
$gridAction->setFilterRowSource('available', 0);
|
||||
@@ -202,7 +202,7 @@ final class PluginGrid extends GridBase
|
||||
$gridAction->setId(AclActionsInterface::PLUGIN_DISABLE);
|
||||
$gridAction->setName(__('Disable'));
|
||||
$gridAction->setTitle(__('Disable'));
|
||||
$gridAction->setIcon($this->icons->getIconDisabled());
|
||||
$gridAction->setIcon($this->icons->disabled());
|
||||
$gridAction->setOnClickFunction('plugin/toggle');
|
||||
$gridAction->setFilterRowSource('enabled', 0);
|
||||
$gridAction->setFilterRowSource('available', 0);
|
||||
@@ -224,7 +224,7 @@ final class PluginGrid extends GridBase
|
||||
$gridAction->setId(AclActionsInterface::PLUGIN_RESET);
|
||||
$gridAction->setName(__('Reset Data'));
|
||||
$gridAction->setTitle(__('Reset Data'));
|
||||
$gridAction->setIcon($this->icons->getIconRefresh());
|
||||
$gridAction->setIcon($this->icons->refresh());
|
||||
$gridAction->setOnClickFunction('plugin/reset');
|
||||
$gridAction->setFilterRowSource('available', 0);
|
||||
$gridAction->addData(
|
||||
@@ -250,7 +250,7 @@ final class PluginGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete Plugin'));
|
||||
$gridAction->setTitle(__('Delete Plugin'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setFilterRowSource('available');
|
||||
$gridAction->setOnClickFunction('plugin/delete');
|
||||
$gridAction->addData(
|
||||
|
||||
@@ -67,9 +67,9 @@ final class PublicLinkGrid extends GridBase
|
||||
$grid->addDataAction($this->getDeleteAction());
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
@@ -170,7 +170,7 @@ final class PublicLinkGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::MENUBAR_ITEM);
|
||||
$gridAction->setName(__('New Link'));
|
||||
$gridAction->setTitle(__('New Link'));
|
||||
$gridAction->setIcon($this->icons->getIconAdd());
|
||||
$gridAction->setIcon($this->icons->add());
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
@@ -191,7 +191,7 @@ final class PublicLinkGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::VIEW_ITEM);
|
||||
$gridAction->setName(__('View Link'));
|
||||
$gridAction->setTitle(__('View Link'));
|
||||
$gridAction->setIcon($this->icons->getIconView());
|
||||
$gridAction->setIcon($this->icons->view());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -210,7 +210,7 @@ final class PublicLinkGrid extends GridBase
|
||||
$gridAction->setId(AclActionsInterface::PUBLICLINK_REFRESH);
|
||||
$gridAction->setName(__('Renew Link'));
|
||||
$gridAction->setTitle(__('Renew Link'));
|
||||
$gridAction->setIcon($this->icons->getIconRefresh());
|
||||
$gridAction->setIcon($this->icons->refresh());
|
||||
$gridAction->setOnClickFunction('link/refresh');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -230,7 +230,7 @@ final class PublicLinkGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete Link'));
|
||||
$gridAction->setTitle(__('Delete Link'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -66,9 +66,9 @@ final class TagGrid extends GridBase
|
||||
$grid->addDataAction($this->getDeleteAction());
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
@@ -150,7 +150,7 @@ final class TagGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::MENUBAR_ITEM);
|
||||
$gridAction->setName(__('New Tag'));
|
||||
$gridAction->setTitle(__('New Tag'));
|
||||
$gridAction->setIcon($this->icons->getIconAdd());
|
||||
$gridAction->setIcon($this->icons->add());
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
@@ -171,7 +171,7 @@ final class TagGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(__('Edit Tag'));
|
||||
$gridAction->setTitle(__('Edit Tag'));
|
||||
$gridAction->setIcon($this->icons->getIconEdit());
|
||||
$gridAction->setIcon($this->icons->edit());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -191,7 +191,7 @@ final class TagGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete Tag'));
|
||||
$gridAction->setTitle(__('Delete Tag'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -190,7 +190,7 @@ final class TrackGrid extends GridBase
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setName(__('Refresh'));
|
||||
$gridAction->setTitle(__('Refresh'));
|
||||
$gridAction->setIcon($this->icons->getIconRefresh());
|
||||
$gridAction->setIcon($this->icons->refresh());
|
||||
$gridAction->setOnClickFunction('track/refresh');
|
||||
$gridAction->addData('action-form', 'frmSearchTrack');
|
||||
$gridAction->addData(
|
||||
@@ -212,7 +212,7 @@ final class TrackGrid extends GridBase
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setName(Acl::getActionInfo(AclActionsInterface::TRACK_CLEAR));
|
||||
$gridAction->setTitle(Acl::getActionInfo(AclActionsInterface::TRACK_CLEAR));
|
||||
$gridAction->setIcon($this->icons->getIconClear());
|
||||
$gridAction->setIcon($this->icons->clear());
|
||||
$gridAction->setOnClickFunction('track/clear');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -232,7 +232,7 @@ final class TrackGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(Acl::getActionInfo(AclActionsInterface::TRACK_UNLOCK));
|
||||
$gridAction->setTitle(Acl::getActionInfo(AclActionsInterface::TRACK_UNLOCK));
|
||||
$gridAction->setIcon($this->icons->getIconCheck());
|
||||
$gridAction->setIcon($this->icons->check());
|
||||
$gridAction->setOnClickFunction('track/unlock');
|
||||
$gridAction->setFilterRowSource('tracked', 0);
|
||||
$gridAction->addData(
|
||||
|
||||
@@ -68,9 +68,9 @@ final class UserGrid extends GridBase
|
||||
$grid->addDataAction($this->getDeleteAction());
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
@@ -126,19 +126,19 @@ final class UserGrid extends GridBase
|
||||
$gridData->addDataRowSource('userGroupName');
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'isAdminApp',
|
||||
$this->icons->getIconAppAdmin()
|
||||
$this->icons->appAdmin()
|
||||
);
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'isAdminAcc',
|
||||
$this->icons->getIconAccAdmin()
|
||||
$this->icons->accAdmin()
|
||||
);
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'isLdap',
|
||||
$this->icons->getIconLdapUser()
|
||||
$this->icons->ldapUser()
|
||||
);
|
||||
$gridData->addDataRowSourceWithIcon(
|
||||
'isDisabled',
|
||||
$this->icons->getIconDisabled()
|
||||
$this->icons->disabled()
|
||||
);
|
||||
$gridData->setData($this->queryResult);
|
||||
|
||||
@@ -175,7 +175,7 @@ final class UserGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::MENUBAR_ITEM);
|
||||
$gridAction->setName(__('New User'));
|
||||
$gridAction->setTitle(__('New User'));
|
||||
$gridAction->setIcon($this->icons->getIconAdd());
|
||||
$gridAction->setIcon($this->icons->add());
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
@@ -196,7 +196,7 @@ final class UserGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::VIEW_ITEM);
|
||||
$gridAction->setName(__('View User Details'));
|
||||
$gridAction->setTitle(__('View User Details'));
|
||||
$gridAction->setIcon($this->icons->getIconView());
|
||||
$gridAction->setIcon($this->icons->view());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -216,7 +216,7 @@ final class UserGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(__('Edit User'));
|
||||
$gridAction->setTitle(__('Edit User'));
|
||||
$gridAction->setIcon($this->icons->getIconEdit());
|
||||
$gridAction->setIcon($this->icons->edit());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -236,7 +236,7 @@ final class UserGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(__('Change User\'s Password'));
|
||||
$gridAction->setTitle(__('Change User\'s Password'));
|
||||
$gridAction->setIcon($this->icons->getIconEditPass());
|
||||
$gridAction->setIcon($this->icons->editPass());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->setFilterRowSource('isLdap');
|
||||
$gridAction->addData(
|
||||
@@ -257,7 +257,7 @@ final class UserGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete User'));
|
||||
$gridAction->setTitle(__('Delete User'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -67,9 +67,9 @@ final class UserGroupGrid extends GridBase
|
||||
$grid->addDataAction($this->getDeleteAction());
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
@@ -153,7 +153,7 @@ final class UserGroupGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::MENUBAR_ITEM);
|
||||
$gridAction->setName(__('New Group'));
|
||||
$gridAction->setTitle(__('New Group'));
|
||||
$gridAction->setIcon($this->icons->getIconAdd());
|
||||
$gridAction->setIcon($this->icons->add());
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
@@ -174,7 +174,7 @@ final class UserGroupGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::VIEW_ITEM);
|
||||
$gridAction->setName(__('View Group'));
|
||||
$gridAction->setTitle(__('View Group'));
|
||||
$gridAction->setIcon($this->icons->getIconView());
|
||||
$gridAction->setIcon($this->icons->view());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -194,7 +194,7 @@ final class UserGroupGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(__('Edit Group'));
|
||||
$gridAction->setTitle(__('Edit Group'));
|
||||
$gridAction->setIcon($this->icons->getIconEdit());
|
||||
$gridAction->setIcon($this->icons->edit());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -214,7 +214,7 @@ final class UserGroupGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete Group'));
|
||||
$gridAction->setTitle(__('Delete Group'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -67,9 +67,9 @@ final class UserProfileGrid extends GridBase
|
||||
$grid->addDataAction($this->getDeleteAction());
|
||||
$grid->addDataAction(
|
||||
$this->getDeleteAction()
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
->setName(__('Delete Selected'))
|
||||
->setTitle(__('Delete Selected'))
|
||||
->setIsSelection(true),
|
||||
true
|
||||
);
|
||||
|
||||
@@ -151,7 +151,7 @@ final class UserProfileGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::MENUBAR_ITEM);
|
||||
$gridAction->setName(__('New Profile'));
|
||||
$gridAction->setTitle(__('New Profile'));
|
||||
$gridAction->setIcon($this->icons->getIconAdd());
|
||||
$gridAction->setIcon($this->icons->add());
|
||||
$gridAction->setSkip(true);
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
@@ -172,7 +172,7 @@ final class UserProfileGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::VIEW_ITEM);
|
||||
$gridAction->setName(__('View Profile Details'));
|
||||
$gridAction->setTitle(__('View Profile Details'));
|
||||
$gridAction->setIcon($this->icons->getIconView());
|
||||
$gridAction->setIcon($this->icons->view());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -192,7 +192,7 @@ final class UserProfileGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::EDIT_ITEM);
|
||||
$gridAction->setName(__('Edit Profile'));
|
||||
$gridAction->setTitle(__('Edit Profile'));
|
||||
$gridAction->setIcon($this->icons->getIconEdit());
|
||||
$gridAction->setIcon($this->icons->edit());
|
||||
$gridAction->setOnClickFunction('appMgmt/show');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
@@ -212,7 +212,7 @@ final class UserProfileGrid extends GridBase
|
||||
$gridAction->setType(DataGridActionType::DELETE_ITEM);
|
||||
$gridAction->setName(__('Delete Profile'));
|
||||
$gridAction->setTitle(__('Delete Profile'));
|
||||
$gridAction->setIcon($this->icons->getIconDelete());
|
||||
$gridAction->setIcon($this->icons->delete());
|
||||
$gridAction->setOnClickFunction('appMgmt/delete');
|
||||
$gridAction->addData(
|
||||
'action-route',
|
||||
|
||||
@@ -54,12 +54,12 @@ final class LayoutHelper extends HelperBase
|
||||
private bool $loggedIn;
|
||||
|
||||
public function __construct(
|
||||
Application $application,
|
||||
Application $application,
|
||||
TemplateInterface $template,
|
||||
RequestInterface $request,
|
||||
ThemeInterface $theme,
|
||||
CryptPKIInterface $cryptPKI,
|
||||
PluginManager $pluginManager
|
||||
PluginManager $pluginManager
|
||||
) {
|
||||
parent::__construct($application, $template, $request);
|
||||
|
||||
@@ -74,8 +74,8 @@ final class LayoutHelper extends HelperBase
|
||||
/**
|
||||
* Sets a full layout page
|
||||
*
|
||||
* @param string $page Page/view name
|
||||
* @param Acl|null $acl
|
||||
* @param string $page Page/view name
|
||||
* @param Acl|null $acl
|
||||
*
|
||||
* @return LayoutHelper
|
||||
*/
|
||||
@@ -119,9 +119,9 @@ final class LayoutHelper extends HelperBase
|
||||
$this->view->assign('app_website_url', AppInfoInterface::APP_WEBSITE_URL);
|
||||
$this->view->assign('app_blog_url', AppInfoInterface::APP_BLOG_URL);
|
||||
$this->view->assign('app_version', InstallerService::VERSION_TEXT);
|
||||
$this->view->assign('logo_icon', $baseUrl.'/public/images/logo_icon.png');
|
||||
$this->view->assign('logo_no_bg_color', $baseUrl.'/public/images/logo_full_nobg_outline_color.png');
|
||||
$this->view->assign('logo_no_bg', $baseUrl.'/public/images/logo_full_nobg_outline.png');
|
||||
$this->view->assign('logo_icon', $baseUrl . '/public/images/logo_icon.png');
|
||||
$this->view->assign('logo_no_bg_color', $baseUrl . '/public/images/logo_full_nobg_outline_color.png');
|
||||
$this->view->assign('logo_no_bg', $baseUrl . '/public/images/logo_full_nobg_outline.png');
|
||||
$this->view->assign('httpsEnabled', $this->request->isHttps());
|
||||
$this->view->assign('homeRoute', Acl::getActionRoute(AclActionsInterface::ACCOUNT));
|
||||
|
||||
@@ -148,7 +148,7 @@ final class LayoutHelper extends HelperBase
|
||||
protected function getResourcesLinks(): void
|
||||
{
|
||||
$version = VersionUtil::getVersionStringNormalized();
|
||||
$baseUrl = ($this->configData->getApplicationUrl() ?? BootstrapBase::$WEBURI).BootstrapBase::$SUBURI;
|
||||
$baseUrl = ($this->configData->getApplicationUrl() ?? BootstrapBase::$WEBURI) . BootstrapBase::$SUBURI;
|
||||
|
||||
$jsUri = new Uri($baseUrl);
|
||||
$jsUri->addParam('_r', 'resource/js');
|
||||
@@ -160,12 +160,12 @@ final class LayoutHelper extends HelperBase
|
||||
|
||||
$this->view->append('jsLinks', $jsUri->getUriSigned($this->configData->getPasswordSalt()));
|
||||
|
||||
$themeInfo = $this->theme->getThemeInfo();
|
||||
$themeInfo = $this->theme->getInfo();
|
||||
|
||||
if (isset($themeInfo['js'])) {
|
||||
$jsUri->resetParams()
|
||||
->addParam('b', $this->theme->getThemePath().DIRECTORY_SEPARATOR.'js')
|
||||
->addParam('f', implode(',', $themeInfo['js']));
|
||||
->addParam('b', $this->theme->getPath() . DIRECTORY_SEPARATOR . 'js')
|
||||
->addParam('f', implode(',', $themeInfo['js']));
|
||||
|
||||
$this->view->append('jsLinks', $jsUri->getUriSigned($this->configData->getPasswordSalt()));
|
||||
}
|
||||
@@ -174,7 +174,8 @@ final class LayoutHelper extends HelperBase
|
||||
|
||||
if ($this->loggedIn
|
||||
&& $userPreferences
|
||||
&& $userPreferences->getUserId() > 0) {
|
||||
&& $userPreferences->getUserId() > 0
|
||||
) {
|
||||
$resultsAsCards = $userPreferences->isResultsAsCards();
|
||||
} else {
|
||||
$resultsAsCards = $this->configData->isResultsAsCards();
|
||||
@@ -182,7 +183,7 @@ final class LayoutHelper extends HelperBase
|
||||
|
||||
$cssUri = (new Uri($baseUrl))
|
||||
->addParam('_r', 'resource/css')
|
||||
->addParam('_v', md5($version.$resultsAsCards));
|
||||
->addParam('_v', md5($version . $resultsAsCards));
|
||||
|
||||
$this->view->append('cssLinks', $cssUri->getUriSigned($this->configData->getPasswordSalt()));
|
||||
|
||||
@@ -196,8 +197,8 @@ final class LayoutHelper extends HelperBase
|
||||
}
|
||||
|
||||
$cssUri->resetParams()
|
||||
->addParam('b', $this->theme->getThemePath().DIRECTORY_SEPARATOR.'css')
|
||||
->addParam('f', implode(',', $themeInfo['css']));
|
||||
->addParam('b', $this->theme->getPath() . DIRECTORY_SEPARATOR . 'css')
|
||||
->addParam('f', implode(',', $themeInfo['css']));
|
||||
|
||||
$this->view->append('cssLinks', $cssUri->getUriSigned($this->configData->getPasswordSalt()));
|
||||
}
|
||||
@@ -207,23 +208,23 @@ final class LayoutHelper extends HelperBase
|
||||
|
||||
foreach ($loadedPlugins as $plugin) {
|
||||
$base = str_replace(APP_ROOT, '', $plugin->getBase());
|
||||
$base .= DIRECTORY_SEPARATOR.'public';
|
||||
$base .= DIRECTORY_SEPARATOR . 'public';
|
||||
|
||||
$jsResources = $plugin->getJsResources();
|
||||
$cssResources = $plugin->getCssResources();
|
||||
|
||||
if (count($jsResources) > 0) {
|
||||
$jsUri->resetParams()
|
||||
->addParam('b', $base.DIRECTORY_SEPARATOR.'js')
|
||||
->addParam('f', implode(',', $jsResources));
|
||||
->addParam('b', $base . DIRECTORY_SEPARATOR . 'js')
|
||||
->addParam('f', implode(',', $jsResources));
|
||||
|
||||
$this->view->append('jsLinks', $jsUri->getUriSigned($this->configData->getPasswordSalt()));
|
||||
}
|
||||
|
||||
if (count($cssResources) > 0) {
|
||||
$cssUri->resetParams()
|
||||
->addParam('b', $base.DIRECTORY_SEPARATOR.'css')
|
||||
->addParam('f', implode(',', $cssResources));
|
||||
->addParam('b', $base . DIRECTORY_SEPARATOR . 'css')
|
||||
->addParam('f', implode(',', $cssResources));
|
||||
|
||||
$this->view->append('cssLinks', $cssUri->getUriSigned($this->configData->getPasswordSalt()));
|
||||
}
|
||||
@@ -254,9 +255,9 @@ final class LayoutHelper extends HelperBase
|
||||
$icons = $this->theme->getIcons();
|
||||
|
||||
if ($userData->getIsAdminApp()) {
|
||||
$userType = $icons->getIconAppAdmin();
|
||||
$userType = $icons->appAdmin();
|
||||
} elseif ($userData->getIsAdminAcc()) {
|
||||
$userType = $icons->getIconAccAdmin();
|
||||
$userType = $icons->accAdmin();
|
||||
}
|
||||
|
||||
$this->view->assign('ctx_userType', $userType);
|
||||
@@ -269,7 +270,7 @@ final class LayoutHelper extends HelperBase
|
||||
/**
|
||||
* Obtener los datos para mostrar el menú de acciones
|
||||
*
|
||||
* @param Acl $acl
|
||||
* @param Acl $acl
|
||||
*/
|
||||
public function getMenu(Acl $acl): void
|
||||
{
|
||||
@@ -279,12 +280,12 @@ final class LayoutHelper extends HelperBase
|
||||
$actionSearch = new DataGridAction();
|
||||
$actionSearch->setId(AclActionsInterface::ACCOUNT);
|
||||
$actionSearch->setTitle(__('Search'));
|
||||
$actionSearch->setIcon($icons->getIconSearch());
|
||||
$actionSearch->setIcon($icons->search());
|
||||
$actionSearch->setData([
|
||||
'historyReset' => 1,
|
||||
'view' => 'search',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::ACCOUNT),
|
||||
]);
|
||||
'historyReset' => 1,
|
||||
'view' => 'search',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::ACCOUNT),
|
||||
]);
|
||||
|
||||
$actions[] = $actionSearch;
|
||||
|
||||
@@ -292,12 +293,12 @@ final class LayoutHelper extends HelperBase
|
||||
$actionNewAccount = new DataGridAction();
|
||||
$actionNewAccount->setId(AclActionsInterface::ACCOUNT_CREATE);
|
||||
$actionNewAccount->setTitle(__('New Account'));
|
||||
$actionNewAccount->setIcon($icons->getIconAdd());
|
||||
$actionNewAccount->setIcon($icons->add());
|
||||
$actionNewAccount->setData([
|
||||
'historyReset' => 0,
|
||||
'view' => 'account',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::ACCOUNT_CREATE),
|
||||
]);
|
||||
'historyReset' => 0,
|
||||
'view' => 'account',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::ACCOUNT_CREATE),
|
||||
]);
|
||||
|
||||
$actions[] = $actionNewAccount;
|
||||
}
|
||||
@@ -306,12 +307,12 @@ final class LayoutHelper extends HelperBase
|
||||
$actionAccessManager = new DataGridAction();
|
||||
$actionAccessManager->setId(AclActionsInterface::ACCESS_MANAGE);
|
||||
$actionAccessManager->setTitle(Acl::getActionInfo(AclActionsInterface::ACCESS_MANAGE));
|
||||
$actionAccessManager->setIcon($icons->getIconAccount());
|
||||
$actionAccessManager->setIcon($icons->account());
|
||||
$actionAccessManager->setData([
|
||||
'historyReset' => 0,
|
||||
'view' => 'datatabs',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::ACCESS_MANAGE),
|
||||
]);
|
||||
'historyReset' => 0,
|
||||
'view' => 'datatabs',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::ACCESS_MANAGE),
|
||||
]);
|
||||
|
||||
$actions[] = $actionAccessManager;
|
||||
}
|
||||
@@ -320,12 +321,12 @@ final class LayoutHelper extends HelperBase
|
||||
$actionItemManager = new DataGridAction();
|
||||
$actionItemManager->setId(AclActionsInterface::ITEMS_MANAGE);
|
||||
$actionItemManager->setTitle(Acl::getActionInfo(AclActionsInterface::ITEMS_MANAGE));
|
||||
$actionItemManager->setIcon($icons->getIconGroup());
|
||||
$actionItemManager->setIcon($icons->group());
|
||||
$actionItemManager->setData([
|
||||
'historyReset' => 0,
|
||||
'view' => 'datatabs',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::ITEMS_MANAGE),
|
||||
]);
|
||||
'historyReset' => 0,
|
||||
'view' => 'datatabs',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::ITEMS_MANAGE),
|
||||
]);
|
||||
|
||||
$actions[] = $actionItemManager;
|
||||
}
|
||||
@@ -336,10 +337,10 @@ final class LayoutHelper extends HelperBase
|
||||
$actionSecurityManager->setTitle(Acl::getActionInfo(AclActionsInterface::SECURITY_MANAGE));
|
||||
$actionSecurityManager->setIcon($icons->getIconByName('security'));
|
||||
$actionSecurityManager->setData([
|
||||
'historyReset' => 0,
|
||||
'view' => 'datatabs',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::SECURITY_MANAGE),
|
||||
]);
|
||||
'historyReset' => 0,
|
||||
'view' => 'datatabs',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::SECURITY_MANAGE),
|
||||
]);
|
||||
|
||||
$actions[] = $actionSecurityManager;
|
||||
}
|
||||
@@ -350,10 +351,10 @@ final class LayoutHelper extends HelperBase
|
||||
$actionPlugins->setTitle(__('Plugins'));
|
||||
$actionPlugins->setIcon($icons->getIconByName('extension'));
|
||||
$actionPlugins->setData([
|
||||
'historyReset' => 1,
|
||||
'view' => 'plugin',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::PLUGIN),
|
||||
]);
|
||||
'historyReset' => 1,
|
||||
'view' => 'plugin',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::PLUGIN),
|
||||
]);
|
||||
|
||||
$actions[] = $actionPlugins;
|
||||
}
|
||||
@@ -362,12 +363,12 @@ final class LayoutHelper extends HelperBase
|
||||
$actionConfigManager = new DataGridAction();
|
||||
$actionConfigManager->setId('config');
|
||||
$actionConfigManager->setTitle(__('Configuration'));
|
||||
$actionConfigManager->setIcon($icons->getIconSettings());
|
||||
$actionConfigManager->setIcon($icons->settings());
|
||||
$actionConfigManager->setData([
|
||||
'historyReset' => 1,
|
||||
'view' => 'config',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::CONFIG),
|
||||
]);
|
||||
'historyReset' => 1,
|
||||
'view' => 'config',
|
||||
'route' => Acl::getActionRoute(AclActionsInterface::CONFIG),
|
||||
]);
|
||||
|
||||
$actions[] = $actionConfigManager;
|
||||
}
|
||||
@@ -379,8 +380,8 @@ final class LayoutHelper extends HelperBase
|
||||
/**
|
||||
* Sets a full layout page
|
||||
*
|
||||
* @param string $template
|
||||
* @param string $page Page/view name
|
||||
* @param string $template
|
||||
* @param string $page Page/view name
|
||||
*
|
||||
* @return LayoutHelper
|
||||
*/
|
||||
@@ -399,8 +400,8 @@ final class LayoutHelper extends HelperBase
|
||||
/**
|
||||
* Sets a custom layout page
|
||||
*
|
||||
* @param string $template
|
||||
* @param string $page Page/view name
|
||||
* @param string $template
|
||||
* @param string $page Page/view name
|
||||
*
|
||||
* @return LayoutHelper
|
||||
*/
|
||||
|
||||
@@ -83,7 +83,7 @@ final class IndexController extends ControllerBase implements ExtensibleTabContr
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DataTab $tab
|
||||
* @param DataTab $tab
|
||||
*/
|
||||
public function addTab(DataTab $tab): void
|
||||
{
|
||||
@@ -105,16 +105,16 @@ final class IndexController extends ControllerBase implements ExtensibleTabContr
|
||||
$template->assign(
|
||||
'langs',
|
||||
SelectItemAdapter::factory(Language::getAvailableLanguages())
|
||||
->getItemsFromArraySelected(
|
||||
[$userPreferences->getLang() ?: $this->configData->getSiteLang()]
|
||||
)
|
||||
->getItemsFromArraySelected(
|
||||
[$userPreferences->getLang() ?: $this->configData->getSiteLang()]
|
||||
)
|
||||
);
|
||||
$template->assign(
|
||||
'themes',
|
||||
SelectItemAdapter::factory($this->theme->getThemesAvailable())
|
||||
->getItemsFromArraySelected(
|
||||
[$userPreferences->getTheme() ?: $this->configData->getSiteTheme()]
|
||||
)
|
||||
SelectItemAdapter::factory($this->theme->getAvailable())
|
||||
->getItemsFromArraySelected(
|
||||
[$userPreferences->getTheme() ?: $this->configData->getSiteTheme()]
|
||||
)
|
||||
);
|
||||
$template->assign('userPreferences', $userPreferences);
|
||||
$template->assign('route', 'userSettingsGeneral/save');
|
||||
|
||||
@@ -25,23 +25,25 @@
|
||||
namespace SP\Modules\Web;
|
||||
|
||||
use Defuse\Crypto\Exception\CryptoException;
|
||||
use Defuse\Crypto\Exception\EnvironmentIsBrokenException;
|
||||
use Exception;
|
||||
use JsonException;
|
||||
use Klein\Klein;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\Bootstrap\BootstrapBase;
|
||||
use SP\Core\Bootstrap\BootstrapWeb;
|
||||
use SP\Core\Bootstrap\UriContextInterface;
|
||||
use SP\Core\Context\ContextBase;
|
||||
use SP\Core\Context\SessionContext;
|
||||
use SP\Core\Crypt\CryptSessionHandler;
|
||||
use SP\Core\Crypt\Csrf;
|
||||
use SP\Core\Crypt\CsrfInterface;
|
||||
use SP\Core\Crypt\Session as CryptSession;
|
||||
use SP\Core\Crypt\UuidCookie;
|
||||
use SP\Core\Exceptions\ConstraintException;
|
||||
use SP\Core\Exceptions\InitializationException;
|
||||
use SP\Core\Exceptions\InvalidArgumentException;
|
||||
use SP\Core\Exceptions\NoSuchPropertyException;
|
||||
use SP\Core\Exceptions\QueryException;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\HttpModuleBase;
|
||||
use SP\Core\Language;
|
||||
use SP\Core\LanguageInterface;
|
||||
@@ -60,6 +62,7 @@ use SP\Domain\User\Services\UserProfileService;
|
||||
use SP\Http\Address;
|
||||
use SP\Http\RequestInterface;
|
||||
use SP\Http\Uri;
|
||||
use SP\Infrastructure\Common\Repositories\NoSuchItemException;
|
||||
use SP\Infrastructure\Database\DatabaseUtil;
|
||||
use SP\Infrastructure\File\FileException;
|
||||
use SP\Modules\Web\Controllers\Bootstrap\GetEnvironmentController;
|
||||
@@ -83,6 +86,9 @@ use SP\Modules\Web\Controllers\Upgrade\UpgradeController;
|
||||
use SP\Plugin\PluginManager;
|
||||
use SP\Util\HttpUtil;
|
||||
|
||||
use function SP\logger;
|
||||
use function SP\processException;
|
||||
|
||||
/**
|
||||
* Class Init
|
||||
*/
|
||||
@@ -142,18 +148,19 @@ final class Init extends HttpModuleBase
|
||||
private bool $isIndex = false;
|
||||
|
||||
public function __construct(
|
||||
Application $application,
|
||||
ProvidersHelper $providersHelper,
|
||||
RequestInterface $request,
|
||||
Klein $router,
|
||||
CsrfInterface $csrf,
|
||||
ThemeInterface $theme,
|
||||
LanguageInterface $language,
|
||||
SecureSessionServiceInterface $secureSessionService,
|
||||
PluginManager $pluginManager,
|
||||
ItemPresetService $itemPresetService,
|
||||
DatabaseUtil $databaseUtil,
|
||||
UserProfileServiceInterface $userProfileService
|
||||
Application $application,
|
||||
ProvidersHelper $providersHelper,
|
||||
RequestInterface $request,
|
||||
Klein $router,
|
||||
CsrfInterface $csrf,
|
||||
ThemeInterface $theme,
|
||||
LanguageInterface $language,
|
||||
SecureSessionServiceInterface $secureSessionService,
|
||||
PluginManager $pluginManager,
|
||||
ItemPresetService $itemPresetService,
|
||||
DatabaseUtil $databaseUtil,
|
||||
UserProfileServiceInterface $userProfileService,
|
||||
private readonly UriContextInterface $uriContext
|
||||
) {
|
||||
parent::__construct(
|
||||
$application,
|
||||
@@ -175,17 +182,17 @@ final class Init extends HttpModuleBase
|
||||
/**
|
||||
* Initialize Web App
|
||||
*
|
||||
* @param string $controller
|
||||
* @param string $controller
|
||||
*
|
||||
* @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException
|
||||
* @throws \JsonException
|
||||
* @throws \SP\Core\Exceptions\ConstraintException
|
||||
* @throws \SP\Core\Exceptions\InitializationException
|
||||
* @throws \SP\Core\Exceptions\QueryException
|
||||
* @throws \SP\Core\Exceptions\SPException
|
||||
* @throws \SP\Infrastructure\Common\Repositories\NoSuchItemException
|
||||
* @throws \SP\Infrastructure\File\FileException
|
||||
* @throws \Exception
|
||||
* @throws EnvironmentIsBrokenException
|
||||
* @throws JsonException
|
||||
* @throws ConstraintException
|
||||
* @throws InitializationException
|
||||
* @throws QueryException
|
||||
* @throws SPException
|
||||
* @throws NoSuchItemException
|
||||
* @throws FileException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function initialize(string $controller): void
|
||||
{
|
||||
@@ -211,9 +218,6 @@ final class Init extends HttpModuleBase
|
||||
// Setup language
|
||||
$this->language->setLanguage($isReload);
|
||||
|
||||
// Setup theme
|
||||
$this->theme->initTheme($isReload);
|
||||
|
||||
// Comprobar si es necesario cambiar a HTTPS
|
||||
HttpUtil::checkHttps($this->configData, $this->request);
|
||||
|
||||
@@ -227,7 +231,7 @@ final class Init extends HttpModuleBase
|
||||
if (!$this->checkInstalled()) {
|
||||
logger('Not installed', 'ERROR');
|
||||
|
||||
$this->router->response()->redirect(self::getUriFor(self::ROUTE_INSTALL))->send();
|
||||
$this->router->response()->redirect($this->getUriFor(self::ROUTE_INSTALL))->send();
|
||||
|
||||
throw new InitializationException('Not installed');
|
||||
}
|
||||
@@ -236,7 +240,7 @@ final class Init extends HttpModuleBase
|
||||
if (!$this->databaseUtil->checkDatabaseConnection()) {
|
||||
logger('Database connection error', 'ERROR');
|
||||
|
||||
$this->router->response()->redirect(self::getUriFor(self::ROUTE_ERROR_DATABASE_CONNECTION))->send();
|
||||
$this->router->response()->redirect($this->getUriFor(self::ROUTE_ERROR_DATABASE_CONNECTION))->send();
|
||||
|
||||
throw new InitializationException('Database connection error');
|
||||
}
|
||||
@@ -245,7 +249,7 @@ final class Init extends HttpModuleBase
|
||||
if ($this->checkMaintenanceMode()) {
|
||||
logger('Maintenance mode', 'INFO');
|
||||
|
||||
$this->router->response()->redirect(self::getUriFor(self::ROUTE_ERROR_MAINTENANCE))->send();
|
||||
$this->router->response()->redirect($this->getUriFor(self::ROUTE_ERROR_MAINTENANCE))->send();
|
||||
|
||||
throw new InitializationException('Maintenance mode');
|
||||
}
|
||||
@@ -256,7 +260,7 @@ final class Init extends HttpModuleBase
|
||||
|
||||
$this->config->generateUpgradeKey();
|
||||
|
||||
$this->router->response()->redirect(self::getUriFor(self::ROUTE_UPGRADE))->send();
|
||||
$this->router->response()->redirect($this->getUriFor(self::ROUTE_UPGRADE))->send();
|
||||
|
||||
throw new InitializationException('Upgrade needed');
|
||||
}
|
||||
@@ -265,7 +269,7 @@ final class Init extends HttpModuleBase
|
||||
if (!$this->databaseUtil->checkDatabaseTables($this->configData->getDbName())) {
|
||||
logger('Database checking error', 'ERROR');
|
||||
|
||||
$this->router->response()->redirect(self::getUriFor(self::ROUTE_ERROR_DATABASE))->send();
|
||||
$this->router->response()->redirect($this->getUriFor(self::ROUTE_ERROR_DATABASE))->send();
|
||||
|
||||
throw new InitializationException('Database checking error');
|
||||
}
|
||||
@@ -312,7 +316,8 @@ final class Init extends HttpModuleBase
|
||||
{
|
||||
if ($encrypt === true
|
||||
&& BootstrapBase::$checkPhpVersion
|
||||
&& ($key = $this->secureSessionService->getKey()) !== false) {
|
||||
&& ($key = $this->secureSessionService->getKey()) !== false
|
||||
) {
|
||||
session_set_save_handler(new CryptSessionHandler($key), true);
|
||||
}
|
||||
|
||||
@@ -336,6 +341,11 @@ final class Init extends HttpModuleBase
|
||||
&& $this->router->request()->param('r') !== 'install/index';
|
||||
}
|
||||
|
||||
private function getUriFor(string $route): string
|
||||
{
|
||||
return (new Uri($this->uriContext->getWebRoot()))->addParam('r', $route)->getUri();
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprobar si es necesario actualizar componentes
|
||||
*
|
||||
@@ -408,7 +418,7 @@ final class Init extends HttpModuleBase
|
||||
if ($this->isIndex || $timeout === null) {
|
||||
$userTimeout = $this->getSessionTimeoutForUser($timeout) ?: $this->configData->getSessionTimeout();
|
||||
|
||||
logger('Session timeout: '.$userTimeout);
|
||||
logger('Session timeout: ' . $userTimeout);
|
||||
|
||||
return $this->context->setSessionTimeout($userTimeout);
|
||||
}
|
||||
@@ -437,7 +447,8 @@ final class Init extends HttpModuleBase
|
||||
$this->request->getClientAddress(),
|
||||
$sessionTimeout->getAddress(),
|
||||
$sessionTimeout->getMask()
|
||||
)) {
|
||||
)
|
||||
) {
|
||||
return $sessionTimeout->getTimeout();
|
||||
}
|
||||
}
|
||||
@@ -445,9 +456,4 @@ final class Init extends HttpModuleBase
|
||||
|
||||
return $default;
|
||||
}
|
||||
|
||||
private static function getUriFor(string $route): string
|
||||
{
|
||||
return (new Uri(BootstrapWeb::$WEBROOT))->addParam('r', $route)->getUri();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,16 +23,17 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIcons $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var ConfigDataInterface $configData
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\Domain\Account\Services\AccountAcl;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
|
||||
/** @var AccountExtData $accountData */
|
||||
$accountData = $_getvar('accountData');
|
||||
@@ -43,70 +44,87 @@ $accountAcl = $_getvar('accountAcl');
|
||||
|
||||
<div class="data-container">
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons"><?php echo $_getvar('title')['icon']; ?></i>
|
||||
<?php echo $_getvar('title')['name']; ?>
|
||||
<i class="material-icons"><?php
|
||||
echo $_getvar('title')['icon']; ?></i>
|
||||
<?php
|
||||
echo $_getvar('title')['name']; ?>
|
||||
</div>
|
||||
|
||||
<form method="post" name="editpass" id="frmEditPass" class="form-action"
|
||||
data-onsubmit="account/save"
|
||||
data-action-route="<?php echo $_getvar('formRoute', ''); ?>"
|
||||
data-item-id="<?php echo $_getvar('accountId', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('formRoute', ''); ?>"
|
||||
data-item-id="<?php
|
||||
echo $_getvar('accountId', ''); ?>"
|
||||
data-hash="">
|
||||
<table class="data">
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="name" name="name" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($accountData->getName(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getName(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Account name'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Account name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Client'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Client'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="client" name="client" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($accountData->getClientName(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getClientName(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="client"><?php echo __('Client'); ?></label>
|
||||
for="client"><?php
|
||||
echo __('Client'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('URL / IP'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('URL / IP'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="url" name="url" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($accountData->getUrl(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getUrl(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="url"><?php echo __('URL / IP'); ?></label>
|
||||
for="url"><?php
|
||||
echo __('URL / IP'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('User'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('User'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="login" name="login" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($accountData->getLogin(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getLogin(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="login"><?php echo __('User'); ?></label>
|
||||
for="login"><?php
|
||||
echo __('User'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="password" name="password" type="password"
|
||||
@@ -114,12 +132,14 @@ $accountAcl = $_getvar('accountAcl');
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__input"
|
||||
maxlength="255" autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="password"><?php echo __('Password'); ?></label>
|
||||
for="password"><?php
|
||||
echo __('Password'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password (repeat)'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password (repeat)'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="password_repeat" name="password_repeat"
|
||||
@@ -127,30 +147,37 @@ $accountAcl = $_getvar('accountAcl');
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255" autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="password_repeat"><?php echo __('Password'); ?></label>
|
||||
for="password_repeat"><?php
|
||||
echo __('Password'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($configData->isAccountExpireEnabled()): ?>
|
||||
<?php
|
||||
if ($configData->isAccountExpireEnabled()): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password Expiry Date'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password Expiry Date'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="password_date_expire"
|
||||
name="password_date_expire" type="date"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 password-datefield__input"
|
||||
value="<?php echo $_getvar('accountPassDateChange'); ?>"
|
||||
value="<?php
|
||||
echo $_getvar('accountPassDateChange'); ?>"
|
||||
data-dst-unix="password_date_expire_unix">
|
||||
<input type='hidden'
|
||||
name='password_date_expire_unix' value=""/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="password_date_expire"><?php echo __('Date'); ?></label>
|
||||
for="password_date_expire"><?php
|
||||
echo __('Date'); ?></label>
|
||||
</div>
|
||||
<i class="material-icons btn-action"
|
||||
title="<?php echo __('Select date'); ?>">date_range</i>
|
||||
title="<?php
|
||||
echo __('Select date'); ?>">date_range</i>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
@@ -159,17 +186,23 @@ $accountAcl = $_getvar('accountAcl');
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="btnSave" name="btnSave" type="submit"
|
||||
form="frmEditPass"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo __('Save'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Save'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,16 +23,17 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIcons $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var ConfigDataInterface $configData
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\Domain\Account\Services\AccountAcl;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
|
||||
/** @var AccountExtData $accountData */
|
||||
@@ -45,130 +46,167 @@ $accountAcl = $_getvar('accountAcl');
|
||||
<div class="data-container">
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('History'); ?>"><?php echo $_getvar('title')['icon']; ?></i>
|
||||
<?php echo $_getvar('title')['name']; ?>
|
||||
title="<?php
|
||||
echo __('History'); ?>"><?php
|
||||
echo $_getvar('title')['icon']; ?></i>
|
||||
<?php
|
||||
echo $_getvar('title')['name']; ?>
|
||||
</div>
|
||||
|
||||
<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
|
||||
<div class="mdl-tabs__tab-bar">
|
||||
<a href="#account-panel"
|
||||
class="mdl-tabs__tab is-active"><?php echo __('Account'); ?></a>
|
||||
class="mdl-tabs__tab is-active"><?php
|
||||
echo __('Account'); ?></a>
|
||||
|
||||
<?php if ($accountAcl->isShowDetails()): ?>
|
||||
<?php
|
||||
if ($accountAcl->isShowDetails()): ?>
|
||||
<a href="#detail-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Details'); ?></a>
|
||||
<?php endif; ?>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Details'); ?></a>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="mdl-tabs__panel is-active" id="account-panel">
|
||||
<form method="post" name="frmaccount" id="frmAccount"
|
||||
class="form-action"
|
||||
data-onsubmit="account/save"
|
||||
data-action-route="<?php echo $_getvar('formRoute', ''); ?>"
|
||||
data-item-id="<?php echo $_getvar('accountId', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('formRoute', ''); ?>"
|
||||
data-item-id="<?php
|
||||
echo $_getvar('accountId', ''); ?>"
|
||||
data-hash="">
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
|
||||
<table class="data">
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="name" name="name" type="text"
|
||||
required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50"
|
||||
value="<?php echo htmlspecialchars($accountData->getName(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getName(), ENT_QUOTES); ?>"
|
||||
tabindex="1" readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Account name'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Account name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Client'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Client'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Client'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Client'); ?></div>
|
||||
|
||||
<select id="client_id" name="client_id"
|
||||
class="select-box sel-chosen-client"
|
||||
tabindex="2" required disabled>
|
||||
<?php /** @var SelectItem $client */
|
||||
<?php
|
||||
/** @var SelectItem $client */
|
||||
foreach ($_getvar('clients') as $client): ?>
|
||||
<option
|
||||
value="<?php echo $client->getId(); ?>"
|
||||
<?php echo $client->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars($client->getName(), ENT_QUOTES); ?>
|
||||
value="<?php
|
||||
echo $client->getId(); ?>"
|
||||
<?php
|
||||
echo $client->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo htmlspecialchars($client->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Category'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Category'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Category'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Category'); ?></div>
|
||||
|
||||
<select id="category_id" name="category_id"
|
||||
class="select-box"
|
||||
tabindex="3" required disabled>
|
||||
<option value=""><?php echo __('Select Category'); ?></option>
|
||||
<?php /** @var SelectItem $category */
|
||||
<option value=""><?php
|
||||
echo __('Select Category'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $category */
|
||||
foreach ($_getvar('categories') as $category): ?>
|
||||
<option
|
||||
value="<?php echo $category->getId(); ?>"
|
||||
<?php echo $category->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars($category->getName(), ENT_QUOTES); ?>
|
||||
value="<?php
|
||||
echo $category->getId(); ?>"
|
||||
<?php
|
||||
echo $category->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo htmlspecialchars($category->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('URL / IP'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('URL / IP'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="url" name="url" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255" tabindex="4"
|
||||
value="<?php echo htmlspecialchars($accountData->getUrl(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getUrl(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Access URL or IP'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Access URL or IP'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('User'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('User'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="login" name="login" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50" tabindex="5"
|
||||
value="<?php echo htmlspecialchars($accountData->getLogin(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getLogin(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Access user'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Access user'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password Expiry Date'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password Expiry Date'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="password_date_expire"
|
||||
name="password_date_expire" type="date"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 password-datefield__input"
|
||||
tabindex="8"
|
||||
value="<?php echo $_getvar('accountPassDateChange'); ?>"
|
||||
value="<?php
|
||||
echo $_getvar('accountPassDateChange'); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="password_date_expire"><?php echo __('Date'); ?></label>
|
||||
for="password_date_expire"><?php
|
||||
echo __('Date'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Notes'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Notes'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<textarea
|
||||
@@ -176,45 +214,61 @@ $accountAcl = $_getvar('accountAcl');
|
||||
rows="3" id="notes"
|
||||
name="notes" tabindex="9"
|
||||
maxlength="5000"
|
||||
readonly><?php echo htmlspecialchars($accountData->getNotes(), ENT_QUOTES); ?>
|
||||
readonly><?php
|
||||
echo htmlspecialchars($accountData->getNotes(), ENT_QUOTES); ?>
|
||||
</textarea>
|
||||
<label class="mdl-textfield__label"
|
||||
for="notes"><?php echo __('Notes about the account'); ?></label>
|
||||
for="notes"><?php
|
||||
echo __('Notes about the account'); ?></label>
|
||||
</div>
|
||||
</tr>
|
||||
<?php if ($accountAcl->isShowHistory()
|
||||
&& count($_getvar('historyData', [])) > 0): ?>
|
||||
<?php
|
||||
if ($accountAcl->isShowHistory()
|
||||
&& count($_getvar('historyData', [])) > 0
|
||||
): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('History'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('History'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('History'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('History'); ?></div>
|
||||
|
||||
<select id="history_id" name="history_id"
|
||||
class="select-box" tabindex="12"
|
||||
data-action-route="account/viewHistory"
|
||||
data-onchange="account/viewHistory">
|
||||
<option value=""><?php echo __('Select date'); ?></option>
|
||||
<?php /** @var SelectItem $history */
|
||||
<option value=""><?php
|
||||
echo __('Select date'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $history */
|
||||
foreach ($_getvar('historyData') as $history): ?>
|
||||
<option
|
||||
value="<?php echo $history->getId(); ?>"
|
||||
<?php echo $history->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars($history->getName(), ENT_QUOTES); ?>
|
||||
value="<?php
|
||||
echo $history->getId(); ?>"
|
||||
<?php
|
||||
echo $history->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo htmlspecialchars($history->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Last Modification'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Last Modification'); ?></td>
|
||||
<td class="valField">
|
||||
<?php printf(
|
||||
'%s (%s)',
|
||||
$accountData->getDateEdit(),
|
||||
htmlspecialchars($accountData->getUserEditName(), ENT_QUOTES)
|
||||
?: htmlspecialchars($accountData->getUserEditLogin(), ENT_QUOTES)); ?>
|
||||
<?php
|
||||
printf(
|
||||
'%s (%s)',
|
||||
$accountData->getDateEdit(),
|
||||
htmlspecialchars($accountData->getUserEditName(), ENT_QUOTES)
|
||||
?: htmlspecialchars($accountData->getUserEditLogin(), ENT_QUOTES)
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -223,10 +277,12 @@ $accountAcl = $_getvar('accountAcl');
|
||||
</div>
|
||||
|
||||
<div class="mdl-tabs__panel" id="detail-panel">
|
||||
<?php if ($accountAcl->isShowDetails()): include $this->includeTemplate('details'); endif; ?>
|
||||
<?php
|
||||
if ($accountAcl->isShowDetails()): include $this->includeTemplate('details'); endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php include $this->includeTemplate('actions'); ?>
|
||||
<?php
|
||||
include $this->includeTemplate('actions'); ?>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,16 +23,17 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIcons $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var ConfigDataInterface $configData
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\Domain\Account\Services\AccountAcl;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
|
||||
/** @var AccountExtData $accountData */
|
||||
$accountData = $_getvar('accountData');
|
||||
@@ -41,78 +42,96 @@ $accountData = $_getvar('accountData');
|
||||
<div id="actions" class="public-link" align="center">
|
||||
<div id="content" class="public-link">
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons"><?php echo $_getvar('title')['icon']; ?></i>
|
||||
<?php echo $_getvar('title')['name']; ?>
|
||||
<i class="material-icons"><?php
|
||||
echo $_getvar('title')['icon']; ?></i>
|
||||
<?php
|
||||
echo $_getvar('title')['name']; ?>
|
||||
</div>
|
||||
<table class="data">
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="name" name="name" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50"
|
||||
value="<?php echo htmlspecialchars($accountData->getName(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getName(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Account name'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Account name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Client'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Client'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="client" name="client" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($accountData->getClientName(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getClientName(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="client"><?php echo __('Client'); ?></label>
|
||||
for="client"><?php
|
||||
echo __('Client'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Category'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Category'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="category" name="category" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($accountData->getCategoryName(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getCategoryName(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="category"><?php echo __('Category'); ?></label>
|
||||
for="category"><?php
|
||||
echo __('Category'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('URL / IP'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('URL / IP'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="url" name="url" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($accountData->getUrl(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getUrl(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="url"><?php echo __('URL / IP'); ?></label>
|
||||
for="url"><?php
|
||||
echo __('URL / IP'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('User'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('User'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="login" name="login" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($accountData->getLogin(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getLogin(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="login"><?php echo __('User'); ?></label>
|
||||
for="login"><?php
|
||||
echo __('User'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Notes'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Notes'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<textarea
|
||||
@@ -120,46 +139,59 @@ $accountData = $_getvar('accountData');
|
||||
rows="3" id="notes"
|
||||
name="notes"
|
||||
maxlength="1000"
|
||||
readonly><?php echo htmlspecialchars($accountData->getNotes(), ENT_QUOTES); ?></textarea>
|
||||
readonly><?php
|
||||
echo htmlspecialchars($accountData->getNotes(), ENT_QUOTES); ?></textarea>
|
||||
<label class="mdl-textfield__label"
|
||||
for="notes"><?php echo __('Notes about the account'); ?></label>
|
||||
for="notes"><?php
|
||||
echo __('Notes about the account'); ?></label>
|
||||
</div>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password'); ?></td>
|
||||
<td class="valField">
|
||||
<?php if ($_getvar('useImage')): ?>
|
||||
<div class="lowres-title"><?php echo __('Password'); ?></div>
|
||||
<?php
|
||||
if ($_getvar('useImage')): ?>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Password'); ?></div>
|
||||
|
||||
<img class="account-pass-image"
|
||||
src="data:image/png;base64,<?php echo $_getvar('accountPassImage'); ?>"/>
|
||||
<?php else: ?>
|
||||
src="data:image/png;base64,<?php
|
||||
echo $_getvar('accountPassImage'); ?>"/>
|
||||
<?php
|
||||
else: ?>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="password" name="password" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo $accountData->getPass(); ?>"
|
||||
value="<?php
|
||||
echo $accountData->getPass(); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="password"><?php echo __('Password'); ?></label>
|
||||
for="password"><?php
|
||||
echo __('Password'); ?></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="item-actions">
|
||||
<ul>
|
||||
<?php if (!$_getvar('useImage')): ?>
|
||||
<?php
|
||||
if (!$_getvar('useImage')): ?>
|
||||
<li>
|
||||
<button id="btnClipPass"
|
||||
class="clip-pass-icon mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored mdl-color--indigo-A200"
|
||||
data-clipboard-target="#password"
|
||||
data-item-id="<?php echo $accountData->getId(); ?>"
|
||||
data-item-id="<?php
|
||||
echo $accountData->getId(); ?>"
|
||||
data-history="0"
|
||||
data-onclick="account/copypass">
|
||||
<i class="material-icons">content_paste</i>
|
||||
</button>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,203 +23,308 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIcons $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var AccountPrivate $accountPrivate
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var AccountPrivate $accountPrivate
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\DataModel\ItemPreset\AccountPrivate;
|
||||
use SP\Domain\Account\Services\AccountAcl;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
|
||||
?>
|
||||
|
||||
<div id="data-accesses">
|
||||
<table class="data">
|
||||
<?php if ($accountAcl->isShowPermission()): ?>
|
||||
<?php
|
||||
if ($accountAcl->isShowPermission()): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Users'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Users'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="account-permissions">
|
||||
<div class="tag-list-box">
|
||||
<?php if (!$_getvar('isView')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView')): ?>
|
||||
<select id="other_users_view"
|
||||
name="other_users_view[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags" <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Users'); ?></option>
|
||||
<?php /** @var SelectItem $otherUser */
|
||||
class="select-box-tags" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Users'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $otherUser */
|
||||
foreach ($_getvar('otherUsersView') as $otherUser): ?>
|
||||
<?php if ($otherUser->isSkip()): continue; endif; ?>
|
||||
<?php
|
||||
if ($otherUser->isSkip()): continue; endif; ?>
|
||||
<option
|
||||
value="<?php echo $otherUser->getId(); ?>"
|
||||
<?php echo $otherUser->isSelected() ? 'selected' : '' ?>><?php echo htmlspecialchars($otherUser->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $otherUser->getId(); ?>"
|
||||
<?php
|
||||
echo $otherUser->isSelected() ? 'selected' : '' ?>><?php
|
||||
echo htmlspecialchars($otherUser->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('View'); ?>"><?php echo $icons->getIconView()->getIcon(); ?></i>
|
||||
<?php else: ?>
|
||||
title="<?php
|
||||
echo __('View'); ?>"><?php
|
||||
echo $icons->view()->getIcon(); ?></i>
|
||||
<?php
|
||||
else: ?>
|
||||
<div class="tag-list-body">
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('View'); ?>"><?php echo $icons->getIconView()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('View'); ?>"><?php
|
||||
echo $icons->view()->getIcon(); ?></i>
|
||||
<div class="tags-list-items">
|
||||
<?php /** @var SelectItem $otherUser */
|
||||
<?php
|
||||
/** @var SelectItem $otherUser */
|
||||
foreach ($_getvar('otherUsersView') as $otherUser): ?>
|
||||
<?php if ($otherUser->isSelected()): ?>
|
||||
<span class="tag"><?php echo htmlspecialchars($otherUser->getName(), ENT_QUOTES); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
if ($otherUser->isSelected()): ?>
|
||||
<span class="tag"><?php
|
||||
echo htmlspecialchars($otherUser->getName(), ENT_QUOTES); ?></span>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="tag-list-box">
|
||||
<?php if (!$_getvar('isView')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView')): ?>
|
||||
<select id="other_users_edit"
|
||||
name="other_users_edit[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags" <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Users'); ?></option>
|
||||
<?php /** @var SelectItem $otherUser */
|
||||
class="select-box-tags" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Users'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $otherUser */
|
||||
foreach ($_getvar('otherUsersEdit') as $otherUser): ?>
|
||||
<?php if ($otherUser->isSkip()): continue; endif; ?>
|
||||
<?php
|
||||
if ($otherUser->isSkip()): continue; endif; ?>
|
||||
<option
|
||||
value="<?php echo $otherUser->getId(); ?>"
|
||||
<?php echo $otherUser->isSelected() ? 'selected' : '' ?>><?php echo htmlspecialchars($otherUser->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $otherUser->getId(); ?>"
|
||||
<?php
|
||||
echo $otherUser->isSelected() ? 'selected' : '' ?>><?php
|
||||
echo htmlspecialchars($otherUser->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('Edit'); ?>"><?php echo $icons->getIconEdit()->getIcon(); ?></i>
|
||||
<?php else: ?>
|
||||
title="<?php
|
||||
echo __('Edit'); ?>"><?php
|
||||
echo $icons->edit()->getIcon(); ?></i>
|
||||
<?php
|
||||
else: ?>
|
||||
<div class="tag-list-body">
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('Edit'); ?>"><?php echo $icons->getIconEdit()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Edit'); ?>"><?php
|
||||
echo $icons->edit()->getIcon(); ?></i>
|
||||
<div class="tags-list-items">
|
||||
<?php /** @var SelectItem $otherUser */
|
||||
<?php
|
||||
/** @var SelectItem $otherUser */
|
||||
foreach ($_getvar('otherUsersEdit') as $otherUser): ?>
|
||||
<?php if ($otherUser->isSelected()): ?>
|
||||
<span class="tag"><?php echo htmlspecialchars($otherUser->getName(), ENT_QUOTES); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
if ($otherUser->isSelected()): ?>
|
||||
<span class="tag"><?php
|
||||
echo htmlspecialchars($otherUser->getName(), ENT_QUOTES); ?></span>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Groups'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Groups'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="account-permissions">
|
||||
<div class="tag-list-box">
|
||||
<?php if (!$_getvar('isView')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView')): ?>
|
||||
<select id="other_usergroups_view"
|
||||
name="other_usergroups_view[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags" <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Groups'); ?></option>
|
||||
<?php /** @var SelectItem $otherUserGroup */
|
||||
class="select-box-tags" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Groups'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $otherUserGroup */
|
||||
foreach ($_getvar('otherUserGroupsView') as $otherUserGroup): ?>
|
||||
<?php if ($otherUserGroup->isSkip()): continue; endif; ?>
|
||||
<?php
|
||||
if ($otherUserGroup->isSkip()): continue; endif; ?>
|
||||
<option
|
||||
value="<?php echo $otherUserGroup->getId(); ?>"
|
||||
<?php echo $otherUserGroup->isSelected() ? 'selected' : '' ?>><?php echo htmlspecialchars($otherUserGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $otherUserGroup->getId(); ?>"
|
||||
<?php
|
||||
echo $otherUserGroup->isSelected() ? 'selected' : '' ?>><?php
|
||||
echo htmlspecialchars($otherUserGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('View'); ?>"><?php echo $icons->getIconView()->getIcon(); ?></i>
|
||||
<?php else: ?>
|
||||
title="<?php
|
||||
echo __('View'); ?>"><?php
|
||||
echo $icons->view()->getIcon(); ?></i>
|
||||
<?php
|
||||
else: ?>
|
||||
<div class="tag-list-body">
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('View'); ?>"><?php echo $icons->getIconView()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('View'); ?>"><?php
|
||||
echo $icons->view()->getIcon(); ?></i>
|
||||
<div class="tags-list-items">
|
||||
<?php /** @var SelectItem $otherUserGroup */
|
||||
<?php
|
||||
/** @var SelectItem $otherUserGroup */
|
||||
foreach ($_getvar('otherUserGroupsView') as $otherUserGroup): ?>
|
||||
<?php if ($otherUserGroup->isSelected()): ?>
|
||||
<span class="tag"><?php echo htmlspecialchars($otherUserGroup->getName(), ENT_QUOTES); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
if ($otherUserGroup->isSelected()): ?>
|
||||
<span class="tag"><?php
|
||||
echo htmlspecialchars(
|
||||
$otherUserGroup->getName(),
|
||||
ENT_QUOTES
|
||||
); ?></span>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="tag-list-box">
|
||||
<?php if (!$_getvar('isView')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView')): ?>
|
||||
<select id="other_usergroups_edit"
|
||||
name="other_usergroups_edit[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags" <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Groups'); ?></option>
|
||||
<?php /** @var SelectItem $otherUserGroup */
|
||||
class="select-box-tags" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Groups'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $otherUserGroup */
|
||||
foreach ($_getvar('otherUserGroupsEdit') as $otherUserGroup): ?>
|
||||
<?php if ($otherUserGroup->isSkip()): continue; endif; ?>
|
||||
<?php
|
||||
if ($otherUserGroup->isSkip()): continue; endif; ?>
|
||||
<option
|
||||
value="<?php echo $otherUserGroup->getId(); ?>"
|
||||
<?php echo $otherUserGroup->isSelected() ? 'selected' : '' ?>><?php echo htmlspecialchars($otherUserGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $otherUserGroup->getId(); ?>"
|
||||
<?php
|
||||
echo $otherUserGroup->isSelected() ? 'selected' : '' ?>><?php
|
||||
echo htmlspecialchars($otherUserGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('Edit'); ?>"><?php echo $icons->getIconEdit()->getIcon(); ?></i>
|
||||
<?php else: ?>
|
||||
title="<?php
|
||||
echo __('Edit'); ?>"><?php
|
||||
echo $icons->edit()->getIcon(); ?></i>
|
||||
<?php
|
||||
else: ?>
|
||||
<div class="tag-list-body">
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('Edit'); ?>"><?php echo $icons->getIconEdit()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Edit'); ?>"><?php
|
||||
echo $icons->edit()->getIcon(); ?></i>
|
||||
<div class="tags-list-items">
|
||||
<?php /** @var SelectItem $otherUserGroup */
|
||||
<?php
|
||||
/** @var SelectItem $otherUserGroup */
|
||||
foreach ($_getvar('otherUserGroupsEdit') as $otherUserGroup): ?>
|
||||
<?php if ($otherUserGroup->isSelected()): ?>
|
||||
<span class="tag"><?php echo htmlspecialchars($otherUserGroup->getName(), ENT_QUOTES); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
if ($otherUserGroup->isSelected()): ?>
|
||||
<span class="tag"><?php
|
||||
echo htmlspecialchars(
|
||||
$otherUserGroup->getName(),
|
||||
ENT_QUOTES
|
||||
); ?></span>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($_getvar('copyAction')): // Forces an update of permissions when copying from another account ?>
|
||||
<?php
|
||||
if ($_getvar('copyAction')): // Forces an update of permissions when copying from another account
|
||||
?>
|
||||
<input type="hidden" name="other_users_view_update" value="1">
|
||||
<input type="hidden" name="other_users_edit_update" value="1">
|
||||
<input type="hidden" name="other_usergroups_view_update"
|
||||
value="1">
|
||||
<input type="hidden" name="other_usergroups_edit_update"
|
||||
value="1">
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if (!$_getvar('isView')
|
||||
<?php
|
||||
if (!$_getvar('isView')
|
||||
&& ($_getvar('ctx_userIsAdminApp')
|
||||
|| $_getvar('ctx_userIsAdminAcc')
|
||||
|| ($gotData && $_getvar('ctx_userId') === $accountData->getUserId()))
|
||||
): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Owner'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Owner'); ?></td>
|
||||
<td class="valField">
|
||||
<select id="owner_id" name="owner_id"
|
||||
class="select-box" <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select User'); ?></option>
|
||||
<?php /** @var SelectItem $user */
|
||||
class="select-box" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select User'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $user */
|
||||
foreach ($_getvar('users') as $user): ?>
|
||||
<option
|
||||
value="<?php echo $user->getId(); ?>"
|
||||
<?php echo $user->isSelected() ? 'selected' : ''; ?>><?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $user->getId(); ?>"
|
||||
<?php
|
||||
echo $user->isSelected() ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if (!$_getvar('isView')
|
||||
<?php
|
||||
if (!$_getvar('isView')
|
||||
&& ($_getvar('ctx_userIsAdminApp')
|
||||
|| $_getvar('ctx_userIsAdminAcc')
|
||||
|| ($gotData
|
||||
@@ -227,57 +332,76 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
|| $_getvar('ctx_userGroupId') === $accountData->getUserGroupId())))
|
||||
): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Main Group'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Main Group'); ?></td>
|
||||
<td class="valField">
|
||||
<select id="main_usergroup_id" name="main_usergroup_id"
|
||||
class="select-box" <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Group'); ?></option>
|
||||
<?php /** @var SelectItem $userGroup */
|
||||
class="select-box" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Group'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $userGroup */
|
||||
foreach ($_getvar('userGroups') as $userGroup): ?>
|
||||
<option
|
||||
value="<?php echo $userGroup->getId(); ?>"
|
||||
<?php echo $userGroup->isSelected() ? 'selected' : ''; ?>><?php echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $userGroup->getId(); ?>"
|
||||
<?php
|
||||
echo $userGroup->isSelected() ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($_getvar('allowPrivate') === true):
|
||||
<?php
|
||||
if ($_getvar('allowPrivate') === true):
|
||||
$checked = ($gotData && $accountData->getIsPrivate()) || $_getvar('privateUserCheck');
|
||||
?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Private Account'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Private Account'); ?></td>
|
||||
<td class="valField">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect"
|
||||
for="private_enabled">
|
||||
<input name="private_enabled" type="checkbox"
|
||||
id="private_enabled"
|
||||
class="mdl-switch__input" <?php echo $checked ? 'checked' : '';
|
||||
class="mdl-switch__input" <?php
|
||||
echo $checked ? 'checked' : '';
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
<span class="mdl-switch__label"><?php echo __('Private'); ?></span>
|
||||
<span class="mdl-switch__label"><?php
|
||||
echo __('Private'); ?></span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($_getvar('allowPrivateGroup') === true):
|
||||
<?php
|
||||
if ($_getvar('allowPrivateGroup') === true):
|
||||
$checked = ($gotData && $accountData->getIsPrivateGroup()) || $_getvar('privateUserGroupCheck');
|
||||
?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Private Account for Group'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Private Account for Group'); ?></td>
|
||||
<td class="valField">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect"
|
||||
for="private_group_enabled">
|
||||
<input name="private_group_enabled" type="checkbox"
|
||||
id="private_group_enabled"
|
||||
class="mdl-switch__input" <?php echo $checked ? 'checked' : '';
|
||||
class="mdl-switch__input" <?php
|
||||
echo $checked ? 'checked' : '';
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
<span class="mdl-switch__label"><?php echo __('Private for Group'); ?></span>
|
||||
<span class="mdl-switch__label"><?php
|
||||
echo __('Private for Group'); ?></span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,16 +23,17 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIcons $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var ConfigDataInterface $configData
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\Domain\Account\Services\AccountAcl;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
|
||||
/** @var AccountExtData $accountData */
|
||||
$accountData = $_getvar('accountData');
|
||||
@@ -40,43 +41,53 @@ $accountData = $_getvar('accountData');
|
||||
|
||||
<div class="data-container">
|
||||
<div id="title"
|
||||
class="titleNormal"><?php echo __('Request Account Modification'); ?></div>
|
||||
class="titleNormal"><?php
|
||||
echo __('Request Account Modification'); ?></div>
|
||||
|
||||
<form method="post" name="requestmodify" id="frmRequestModify"
|
||||
class="form-action"
|
||||
data-onsubmit="account/request"
|
||||
data-action-route="<?php echo $_getvar('formRoute', ''); ?>"
|
||||
data-item-id="<?php echo $_getvar('accountId', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('formRoute', ''); ?>"
|
||||
data-item-id="<?php
|
||||
echo $_getvar('accountId', ''); ?>"
|
||||
data-hash="">
|
||||
<table class="data">
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="name" name="name" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($accountData->getName(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getName(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Account name'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Account name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Client'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Client'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="client" name="client" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($accountData->getClientName(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($accountData->getClientName(), ENT_QUOTES); ?>"
|
||||
readonly>
|
||||
<label class="mdl-textfield__label"
|
||||
for="client"><?php echo __('Client'); ?></label>
|
||||
for="client"><?php
|
||||
echo __('Client'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Request'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Request'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<textarea
|
||||
@@ -84,7 +95,8 @@ $accountData = $_getvar('accountData');
|
||||
rows="3" id="description"
|
||||
name="description" maxlength="1000"></textarea>
|
||||
<label class="mdl-textfield__label"
|
||||
for="description"><?php echo __('Request description'); ?></label>
|
||||
for="description"><?php
|
||||
echo __('Request description'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -97,16 +109,22 @@ $accountData = $_getvar('accountData');
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="btnSave" form="frmRequestModify"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo __('Send'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Send'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,18 +23,18 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIcons $icons
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var ConfigData $configData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var ConfigDataInterface $configData
|
||||
*/
|
||||
|
||||
use SP\Config\ConfigData;
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\Domain\Account\Services\AccountAcl;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Services\Account\AccountAcl;
|
||||
|
||||
$accountData = $_getvar('accountData');
|
||||
$accountAcl = $_getvar('accountAcl');
|
||||
@@ -43,179 +43,242 @@ $showLinked = $gotData && count($_getvar('linkedAccounts', [])) > 0;
|
||||
$showFiles = $gotData && $configData->isFilesEnabled() && $accountAcl->isShowFiles();
|
||||
$showDetails = $gotData && $accountAcl->isShowDetails();
|
||||
$showPermissions = $accountAcl->isShowPermission()
|
||||
|| $_getvar('allowPrivate', false)
|
||||
|| $_getvar('allowPrivateGroup', false);
|
||||
|| $_getvar('allowPrivate', false)
|
||||
|| $_getvar('allowPrivateGroup', false);
|
||||
$showCustomFields = count($_getvar('customFields', 0)) > 0;
|
||||
?>
|
||||
|
||||
<div class="data-container">
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons"><?php echo $_getvar('title')['icon']; ?></i>
|
||||
<?php echo $_getvar('title')['name']; ?>
|
||||
<i class="material-icons"><?php
|
||||
echo $_getvar('title')['icon']; ?></i>
|
||||
<?php
|
||||
echo $_getvar('title')['name']; ?>
|
||||
</div>
|
||||
|
||||
<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
|
||||
<div class="mdl-tabs__tab-bar">
|
||||
<a href="#account-panel"
|
||||
class="mdl-tabs__tab is-active"><?php echo __('Account'); ?></a>
|
||||
class="mdl-tabs__tab is-active"><?php
|
||||
echo __('Account'); ?></a>
|
||||
|
||||
<?php if ($showCustomFields): ?>
|
||||
<?php
|
||||
if ($showCustomFields): ?>
|
||||
<a href="#customfield-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Custom Fields'); ?></a>
|
||||
<?php endif; ?>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Custom Fields'); ?></a>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($showPermissions): ?>
|
||||
<?php
|
||||
if ($showPermissions): ?>
|
||||
<a href="#permission-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Permissions'); ?></a>
|
||||
<?php endif; ?>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Permissions'); ?></a>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($showFiles): ?>
|
||||
<?php
|
||||
if ($showFiles): ?>
|
||||
<a href="#file-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Files'); ?></a>
|
||||
<?php endif; ?>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Files'); ?></a>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($showDetails): ?>
|
||||
<?php
|
||||
if ($showDetails): ?>
|
||||
<a href="#detail-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Details'); ?></a>
|
||||
<?php endif; ?>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Details'); ?></a>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($showLinked): ?>
|
||||
<?php
|
||||
if ($showLinked): ?>
|
||||
<a href="#linked-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Links'); ?></a>
|
||||
<?php endif; ?>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Links'); ?></a>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
<form method="post" name="frmaccount" id="frmAccount"
|
||||
class="form-action"
|
||||
data-onsubmit="account/save"
|
||||
data-action-route="<?php echo $_getvar('formRoute') ?: ''; ?>"
|
||||
data-item-id="<?php echo $_getvar('accountId') ?: ''; ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('formRoute') ?: ''; ?>"
|
||||
data-item-id="<?php
|
||||
echo $_getvar('accountId') ?: ''; ?>"
|
||||
data-hash="">
|
||||
|
||||
<input type="hidden" name="sk" value="<?php echo $sk; ?>">
|
||||
<input type="hidden" name="sk" value="<?php
|
||||
echo $sk; ?>">
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
|
||||
<div class="mdl-tabs__panel is-active" id="account-panel">
|
||||
<table class="data">
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="name" name="name" type="text"
|
||||
required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="100"
|
||||
value="<?php echo $gotData
|
||||
value="<?php
|
||||
echo $gotData
|
||||
? htmlspecialchars($accountData->getName(), ENT_QUOTES)
|
||||
: ''; ?>"
|
||||
<?php echo $_getvar('readonly'); ?>
|
||||
<?php
|
||||
echo $_getvar('readonly'); ?>
|
||||
>
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Account name'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Account name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Client'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Client'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Client'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Client'); ?></div>
|
||||
|
||||
<select id="client_id" name="client_id"
|
||||
class="select-box"
|
||||
required <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Client'); ?></option>
|
||||
<?php /** @var SelectItem $client */
|
||||
required <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Client'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $client */
|
||||
foreach ($_getvar('clients') as $client): ?>
|
||||
<option
|
||||
value="<?php echo $client->getId(); ?>"
|
||||
<?php echo ($gotData && $client->getId() === $accountData->getClientId())
|
||||
value="<?php
|
||||
echo $client->getId(); ?>"
|
||||
<?php
|
||||
echo ($gotData && $client->getId() === $accountData->getClientId())
|
||||
? 'selected'
|
||||
: ''; ?>
|
||||
>
|
||||
<?php echo htmlspecialchars($client->getName(), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars($client->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
<?php if ($_getvar('addClientEnabled')): ?>
|
||||
<?php
|
||||
if ($_getvar('addClientEnabled')): ?>
|
||||
<i class="material-icons btn-action btn-add-select"
|
||||
title="<?php echo __('New Client'); ?>"
|
||||
data-action-route="<?php echo $_getvar('addClientRoute'); ?>"
|
||||
title="<?php
|
||||
echo __('New Client'); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('addClientRoute'); ?>"
|
||||
data-item-route="items/clients"
|
||||
data-item-dst="client_id"
|
||||
data-item-id="0"
|
||||
data-onclick="appMgmt/show"><?php echo $icons->getIconAdd()->getIcon(); ?></i>
|
||||
<?php endif; ?>
|
||||
data-onclick="appMgmt/show"><?php
|
||||
echo $icons->add()->getIcon(); ?></i>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Category'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Category'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Category'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Category'); ?></div>
|
||||
|
||||
<select id="category_id" name="category_id"
|
||||
class="select-box"
|
||||
required <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Category'); ?></option>
|
||||
<?php /** @var SelectItem $category */
|
||||
required <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Category'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $category */
|
||||
foreach ($_getvar('categories') as $category): ?>
|
||||
<option
|
||||
value="<?php echo $category->getId(); ?>"
|
||||
<?php echo ($gotData && $category->getId() === $accountData->getCategoryId())
|
||||
value="<?php
|
||||
echo $category->getId(); ?>"
|
||||
<?php
|
||||
echo ($gotData && $category->getId() === $accountData->getCategoryId())
|
||||
? 'selected'
|
||||
: ''; ?>
|
||||
>
|
||||
<?php echo htmlspecialchars($category->getName(), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars($category->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
<?php if ($_getvar('addCategoryEnabled')): ?>
|
||||
<?php
|
||||
if ($_getvar('addCategoryEnabled')): ?>
|
||||
<i class="material-icons btn-action btn-add-select"
|
||||
title="<?php echo __('New Category'); ?>"
|
||||
data-action-route="<?php echo $_getvar('addCategoryRoute'); ?>"
|
||||
title="<?php
|
||||
echo __('New Category'); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('addCategoryRoute'); ?>"
|
||||
data-item-route="items/categories"
|
||||
data-item-dst="category_id"
|
||||
data-item-id="0"
|
||||
data-onclick="appMgmt/show"><?php echo $icons->getIconAdd()->getIcon(); ?></i>
|
||||
<?php endif; ?>
|
||||
data-onclick="appMgmt/show"><?php
|
||||
echo $icons->add()->getIcon(); ?></i>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('URL / IP'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('URL / IP'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="url" name="url" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255"
|
||||
value="<?php echo $gotData
|
||||
value="<?php
|
||||
echo $gotData
|
||||
? htmlspecialchars($accountData->getUrl(), ENT_QUOTES)
|
||||
: ''; ?>"
|
||||
<?php echo $_getvar('readonly'); ?>
|
||||
<?php
|
||||
echo $_getvar('readonly'); ?>
|
||||
>
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Access URL or IP'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Access URL or IP'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('User'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('User'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="login" name="login" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50"
|
||||
value="<?php echo $gotData
|
||||
value="<?php
|
||||
echo $gotData
|
||||
? htmlspecialchars($accountData->getLogin(), ENT_QUOTES)
|
||||
: ''; ?>"
|
||||
<?php echo $_getvar('readonly'); ?>
|
||||
<?php
|
||||
echo $_getvar('readonly'); ?>
|
||||
>
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Access user'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Access user'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($accountAcl->isShowPass()): ?>
|
||||
<?php
|
||||
if ($accountAcl->isShowPass()): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="password" name="password"
|
||||
@@ -224,12 +287,14 @@ $showCustomFields = count($_getvar('customFields', 0)) > 0;
|
||||
maxlength="255"
|
||||
autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="password"><?php echo __('Password'); ?></label>
|
||||
for="password"><?php
|
||||
echo __('Password'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password (repeat)'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password (repeat)'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="password_repeat"
|
||||
@@ -238,223 +303,308 @@ $showCustomFields = count($_getvar('customFields', 0)) > 0;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255" autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="password_repeat"><?php echo __('Password (repeat)'); ?></label>
|
||||
for="password_repeat"><?php
|
||||
echo __('Password (repeat)'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($configData->isAccountExpireEnabled()): ?>
|
||||
<?php
|
||||
if ($configData->isAccountExpireEnabled()): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password Expiry Date'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password Expiry Date'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="password_date_expire"
|
||||
name="password_date_expire"
|
||||
type="date"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 password-datefield__input"
|
||||
value="<?php echo $_getvar('accountPassDateChange'); ?>"
|
||||
value="<?php
|
||||
echo $_getvar('accountPassDateChange'); ?>"
|
||||
data-dst-unix="password_date_expire_unix"
|
||||
<?php echo $_getvar('readonly'); ?>
|
||||
<?php
|
||||
echo $_getvar('readonly'); ?>
|
||||
>
|
||||
<input type='hidden'
|
||||
name='password_date_expire_unix'
|
||||
value=""/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="password_date_expire"><?php echo __('Date'); ?></label>
|
||||
for="password_date_expire"><?php
|
||||
echo __('Date'); ?></label>
|
||||
</div>
|
||||
|
||||
<i class="material-icons btn-action"
|
||||
title="<?php echo __('Select date'); ?>">date_range</i>
|
||||
title="<?php
|
||||
echo __('Select date'); ?>">date_range</i>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Notes'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Notes'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<textarea
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
rows="3" id="notes"
|
||||
name="notes"
|
||||
maxlength="5000" <?php echo $_getvar('readonly'); ?>><?php echo $gotData
|
||||
maxlength="5000" <?php
|
||||
echo $_getvar('readonly'); ?>><?php
|
||||
echo $gotData
|
||||
? htmlspecialchars($accountData->getNotes(), ENT_QUOTES) : ''; ?></textarea>
|
||||
<label class="mdl-textfield__label"
|
||||
for="notes"><?php echo __('Notes about the account'); ?></label>
|
||||
for="notes"><?php
|
||||
echo __('Notes about the account'); ?></label>
|
||||
</div>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Tags'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Tags'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Tags'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Tags'); ?></div>
|
||||
|
||||
<?php if (!$_getvar('isView')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView')): ?>
|
||||
<select id="tags" name="tags[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags">
|
||||
<option value=""><?php echo __('Select Tags'); ?></option>
|
||||
<?php /** @var SelectItem $tag */
|
||||
<option value=""><?php
|
||||
echo __('Select Tags'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $tag */
|
||||
foreach ($_getvar('tags') as $tag): ?>
|
||||
<option value="<?php echo $tag->getId(); ?>"
|
||||
<?php echo $tag->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars($tag->getName(), ENT_QUOTES); ?>
|
||||
<option value="<?php
|
||||
echo $tag->getId(); ?>"
|
||||
<?php
|
||||
echo $tag->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo htmlspecialchars($tag->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
<?php if ($_getvar('addTagEnabled')): ?>
|
||||
<?php
|
||||
if ($_getvar('addTagEnabled')): ?>
|
||||
<i class="material-icons btn-action btn-add-select"
|
||||
title="<?php echo __('New Tag'); ?>"
|
||||
data-action-route="<?php echo $_getvar('addTagRoute'); ?>"
|
||||
title="<?php
|
||||
echo __('New Tag'); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('addTagRoute'); ?>"
|
||||
data-item-route="items/tags"
|
||||
data-item-dst="tags"
|
||||
data-item-id="0"
|
||||
data-onclick="appMgmt/show">
|
||||
<?php echo $icons->getIconAdd()->getIcon(); ?>
|
||||
<?php
|
||||
echo $icons->add()->getIcon(); ?>
|
||||
</i>
|
||||
<?php endif; ?>
|
||||
<?php if ($_getvar('copyAction')): ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
if ($_getvar('copyAction')): ?>
|
||||
<input type="hidden" name="tags_update"
|
||||
value="1">
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<div class="tag-list-box">
|
||||
<div class="tag-list-body">
|
||||
<div class="tags-list-items">
|
||||
<?php /** @var SelectItem $tag */
|
||||
<?php
|
||||
/** @var SelectItem $tag */
|
||||
foreach ($_getvar('tags') as $tag): ?>
|
||||
<?php if ($tag->isSelected()): ?>
|
||||
<span class="tag"><?php echo htmlspecialchars($tag->getName(), ENT_QUOTES); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
if ($tag->isSelected()): ?>
|
||||
<span class="tag"><?php
|
||||
echo htmlspecialchars($tag->getName(), ENT_QUOTES); ?></span>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if (!$showLinked): ?>
|
||||
<?php
|
||||
if (!$showLinked): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Linked Account'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Linked Account'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Linked Account'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Linked Account'); ?></div>
|
||||
|
||||
<select id="parent_account_id"
|
||||
name="parent_account_id"
|
||||
class="select-box select-box-deselect" <?php echo $_getvar('disabled'); ?>
|
||||
data-sk="<?php echo $_getvar('sk'); ?>"
|
||||
class="select-box select-box-deselect" <?php
|
||||
echo $_getvar('disabled'); ?>
|
||||
data-sk="<?php
|
||||
echo $_getvar('sk'); ?>"
|
||||
data-action-route="items/accountsUser"
|
||||
data-item-id="<?php echo $gotData ? $_getvar('accountId') : ''; ?>"
|
||||
data-selected-id="<?php echo $gotData ? $accountData->getParentId() : ''; ?>">
|
||||
<option value=""><?php echo __('Select Account'); ?></option>
|
||||
data-item-id="<?php
|
||||
echo $gotData ? $_getvar('accountId') : ''; ?>"
|
||||
data-selected-id="<?php
|
||||
echo $gotData ? $accountData->getParentId() : ''; ?>">
|
||||
<option value=""><?php
|
||||
echo __('Select Account'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($accountAcl->isShowHistory()
|
||||
&& count($_getvar('historyData', [])) > 0): ?>
|
||||
<?php
|
||||
if ($accountAcl->isShowHistory()
|
||||
&& count($_getvar('historyData', [])) > 0
|
||||
): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('History'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('History'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('History'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('History'); ?></div>
|
||||
|
||||
<select id="history_id" name="history_id"
|
||||
class="select-box"
|
||||
data-action-route="account/viewHistory"
|
||||
data-onchange="account/viewHistory">
|
||||
<option value=""><?php echo __('Select date'); ?></option>
|
||||
<?php /** @var SelectItem $history */
|
||||
<option value=""><?php
|
||||
echo __('Select date'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $history */
|
||||
foreach ($_getvar('historyData') as $history): ?>
|
||||
<option
|
||||
value="<?php echo $history->getId(); ?>">
|
||||
<?php echo htmlspecialchars($history->getName(), ENT_QUOTES); ?>
|
||||
value="<?php
|
||||
echo $history->getId(); ?>">
|
||||
<?php
|
||||
echo htmlspecialchars($history->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($_getvar('editAction')
|
||||
<?php
|
||||
if ($_getvar('editAction')
|
||||
&& $_getvar('isModified', false)
|
||||
&& $accountData->getUserEditName()): ?>
|
||||
&& $accountData->getUserEditName()
|
||||
): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Last Modification'); ?></td>
|
||||
<td class="valField"><?php printf('%s (%s)',
|
||||
<td class="descField"><?php
|
||||
echo __('Last Modification'); ?></td>
|
||||
<td class="valField"><?php
|
||||
printf(
|
||||
'%s (%s)',
|
||||
$accountData->getDateEdit(),
|
||||
htmlspecialchars($accountData->getUserEditName(), ENT_QUOTES)); ?>
|
||||
htmlspecialchars($accountData->getUserEditName(), ENT_QUOTES)
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($_getvar('publicLinkShow', false) === true
|
||||
&& $_getvar('publicLinkUrl') !== null): ?>
|
||||
<?php
|
||||
if ($_getvar('publicLinkShow', false) === true
|
||||
&& $_getvar('publicLinkUrl') !== null
|
||||
): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Public Link'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Public Link'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Public Link'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Public Link'); ?></div>
|
||||
|
||||
<a href="<?php echo $_getvar('publicLinkUrl'); ?>"
|
||||
<a href="<?php
|
||||
echo $_getvar('publicLinkUrl'); ?>"
|
||||
target="_blank"
|
||||
title="<?php echo __('Public Link'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconPublicLink()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Public Link'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->publicLink()->getIcon(); ?></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($_getvar('accountId')): ?>
|
||||
<?php
|
||||
if ($_getvar('accountId')): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Direct Link'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Direct Link'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Direct Link'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Direct Link'); ?></div>
|
||||
|
||||
<a href="<?php echo $_getvar('deepLink'); ?>"
|
||||
<a href="<?php
|
||||
echo $_getvar('deepLink'); ?>"
|
||||
target="_blank"
|
||||
title="<?php echo __('Direct Link'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconPublicLink()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Direct Link'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->publicLink()->getIcon(); ?></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="mdl-tabs__panel" id="customfield-panel">
|
||||
<?php if ($showCustomFields): ?>
|
||||
<?php
|
||||
if ($showCustomFields): ?>
|
||||
<div id="data-customfields">
|
||||
<table class="data">
|
||||
<?php include $this->includeTemplate('aux-customfields', 'common'); ?>
|
||||
<?php
|
||||
include $this->includeTemplate('aux-customfields', 'common'); ?>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="mdl-tabs__panel" id="permission-panel">
|
||||
<?php if ($showPermissions):
|
||||
<?php
|
||||
if ($showPermissions):
|
||||
include $this->includeTemplate('account-permissions');
|
||||
endif; ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="mdl-tabs__panel" id="file-panel">
|
||||
<?php if ($showFiles) :
|
||||
<?php
|
||||
if ($showFiles) :
|
||||
include $this->includeTemplate('files');
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="mdl-tabs__panel" id="detail-panel">
|
||||
<?php if ($showDetails):
|
||||
<?php
|
||||
if ($showDetails):
|
||||
include $this->includeTemplate('details');
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="mdl-tabs__panel" id="linked-panel">
|
||||
<?php if ($showLinked):
|
||||
<?php
|
||||
if ($showLinked):
|
||||
include $this->includeTemplate('linkedAccounts');
|
||||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include $this->includeTemplate('actions'); ?>
|
||||
</div>
|
||||
<?php
|
||||
include $this->includeTemplate('actions'); ?>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,34 +23,45 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var callable $_getvar
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var callable $_getvar
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var ConfigDataInterface $configData
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\Domain\Account\Services\AccountAcl;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Html\DataGrid\Action\DataGridActionInterface;
|
||||
|
||||
?>
|
||||
|
||||
<div class="item-actions">
|
||||
<ul>
|
||||
<?php /** @var DataGridActionInterface $action */
|
||||
<?php
|
||||
/** @var DataGridActionInterface $action */
|
||||
foreach ($_getvar('accountActions') as $action): ?>
|
||||
<li>
|
||||
<button id="<?php echo $action->getId(); ?>"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $action->getClassesAsString(), ' ', $action->getIcon()->getClassButton(); ?>"
|
||||
<?php foreach ($action->getData() as $key => $value): echo 'data-', $key, '="', $value, '"'; endforeach; ?>
|
||||
<?php foreach ($action->getAttributes() as $key => $value): echo $key, '="', $value, '"'; endforeach; ?>
|
||||
title="<?php echo $action->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $action->getIcon()->getIcon(); ?></i>
|
||||
<button id="<?php
|
||||
echo $action->getId(); ?>"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $action->getClassesAsString(), ' ', $action->getIcon()->getClassButton(); ?>"
|
||||
<?php
|
||||
foreach (
|
||||
$action->getData() as $key => $value
|
||||
): echo 'data-', $key, '="', $value, '"'; endforeach; ?>
|
||||
<?php
|
||||
foreach ($action->getAttributes() as $key => $value): echo $key, '="', $value, '"'; endforeach; ?>
|
||||
title="<?php
|
||||
echo $action->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $action->getIcon()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
<?php
|
||||
$accountActionsMenu = $_getvar('accountActionsMenu');
|
||||
@@ -62,17 +73,32 @@ use SP\Html\DataGrid\Action\DataGridActionInterface;
|
||||
</button>
|
||||
<ul class="mdl-menu mdl-menu--top-right mdl-js-menu mdl-js-ripple-effect"
|
||||
for="actions-menu-account">
|
||||
<?php foreach ($accountActionsMenu as $action): ?>
|
||||
<li class="mdl-menu__item btn-action <?php echo $action->getClassesAsString(); ?>"
|
||||
id="<?php echo $action->getId(); ?>"
|
||||
<?php foreach ($action->getData() as $key => $value): echo 'data-', $key, '="', $value, '"'; endforeach; ?>
|
||||
<?php foreach ($action->getAttributes() as $key => $value): echo $key, '="', $value, '"'; endforeach; ?>
|
||||
title="<?php echo $action->getTitle(); ?>">
|
||||
<i class="material-icons <?php echo $action->getIcon()->getClass(); ?>"><?php echo $action->getIcon()->getIcon(); ?></i>
|
||||
<?php echo $action->getName(); ?>
|
||||
<?php
|
||||
foreach ($accountActionsMenu as $action): ?>
|
||||
<li class="mdl-menu__item btn-action <?php
|
||||
echo $action->getClassesAsString(); ?>"
|
||||
id="<?php
|
||||
echo $action->getId(); ?>"
|
||||
<?php
|
||||
foreach (
|
||||
$action->getData() as $key => $value
|
||||
): echo 'data-', $key, '="', $value, '"'; endforeach; ?>
|
||||
<?php
|
||||
foreach (
|
||||
$action->getAttributes() as $key => $value
|
||||
): echo $key, '="', $value, '"'; endforeach; ?>
|
||||
title="<?php
|
||||
echo $action->getTitle(); ?>">
|
||||
<i class="material-icons <?php
|
||||
echo $action->getIcon()->getClass(); ?>"><?php
|
||||
echo $action->getIcon()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo $action->getName(); ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,110 +23,157 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var callable $_getvar
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var callable $_getvar
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var ConfigDataInterface $configData
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\Domain\Account\Services\AccountAcl;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
|
||||
?>
|
||||
|
||||
<div id="data-details">
|
||||
<table class="data">
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Visits'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Visits'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Visits'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Visits'); ?></div>
|
||||
|
||||
<?php echo $accountData->getCountView() . '(' . $accountData->getCountDecrypt() . ')'; ?>
|
||||
<?php
|
||||
echo $accountData->getCountView() . '(' . $accountData->getCountDecrypt() . ')'; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Date Added'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Date Added'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Date Added'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Date Added'); ?></div>
|
||||
|
||||
<?php echo $accountData->getDateAdd() ?>
|
||||
<?php
|
||||
echo $accountData->getDateAdd() ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($_getvar('isModified') && $accountData->getUserEditName()): ?>
|
||||
<?php
|
||||
if ($_getvar('isModified') && $accountData->getUserEditName()): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Last Modification'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Last Modification'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Last Modification'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Last Modification'); ?></div>
|
||||
|
||||
<?php printf('%s (%s)', $accountData->getDateEdit(), htmlspecialchars($accountData->getUserEditName(), ENT_QUOTES)); ?>
|
||||
<?php
|
||||
printf(
|
||||
'%s (%s)',
|
||||
$accountData->getDateEdit(),
|
||||
htmlspecialchars($accountData->getUserEditName(), ENT_QUOTES)
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Owner'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Owner'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Owner'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Owner'); ?></div>
|
||||
|
||||
<?php echo htmlspecialchars($accountData->getUserName(), ENT_QUOTES) ?: htmlspecialchars($accountData->getUserLogin(), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars($accountData->getUserName(), ENT_QUOTES) ?: htmlspecialchars(
|
||||
$accountData->getUserLogin(),
|
||||
ENT_QUOTES
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Main Group'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Main Group'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Main Group'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Main Group'); ?></div>
|
||||
|
||||
<?php echo htmlspecialchars($accountData->getUserGroupName(), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars($accountData->getUserGroupName(), ENT_QUOTES); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($accountAcl->isModified()): ?>
|
||||
<?php
|
||||
if ($accountAcl->isModified()): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Date Modified'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Date Modified'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Date Modified'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Date Modified'); ?></div>
|
||||
|
||||
<?php echo $accountData->getDateEdit(); ?>
|
||||
<?php
|
||||
echo $accountData->getDateEdit(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Editor'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Editor'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Editor'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Editor'); ?></div>
|
||||
|
||||
<?php echo htmlspecialchars($accountData->getUserEditName(), ENT_QUOTES) ?: htmlspecialchars($accountData->getUserEditLogin(), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars($accountData->getUserEditName(), ENT_QUOTES) ?: htmlspecialchars(
|
||||
$accountData->getUserEditLogin(),
|
||||
ENT_QUOTES
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password Date'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password Date'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Password Date'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Password Date'); ?></div>
|
||||
|
||||
<?php echo $_getvar('accountPassDate'); ?>
|
||||
<?php
|
||||
echo $_getvar('accountPassDate'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($_getvar('accountPassDateChange', 0) > 0): ?>
|
||||
<?php
|
||||
if ($_getvar('accountPassDateChange', 0) > 0): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password Expiry Date'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password Expiry Date'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Password Expiry Date'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Password Expiry Date'); ?></div>
|
||||
|
||||
<?php echo $_getvar('accountPassDateChange'); ?>
|
||||
<?php
|
||||
echo $_getvar('accountPassDateChange'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('ID'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('ID'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('ID'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('ID'); ?></div>
|
||||
|
||||
<?php echo $accountData->getId(); ?>
|
||||
<?php
|
||||
echo $accountData->getId(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,69 +23,100 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var FileData $file
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var callable $_getvar
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var FileData $file
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\FileData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Html\Html;
|
||||
|
||||
?>
|
||||
|
||||
<div id="files-wrap">
|
||||
<ul id="files-list " class="mdl-list">
|
||||
<?php foreach ($_getvar('files') as $file):
|
||||
<?php
|
||||
foreach ($_getvar('files') as $file):
|
||||
$extension = mb_strtoupper($file->getExtension());
|
||||
?>
|
||||
<li class="mdl-list__item">
|
||||
<span class="mdl-list__item-primary-content"
|
||||
title="<?php echo htmlspecialchars($file->getName(), ENT_QUOTES); ?>">
|
||||
title="<?php
|
||||
echo htmlspecialchars($file->getName(), ENT_QUOTES); ?>">
|
||||
<i class="material-icons mdl-list__item-icon">attachment</i>
|
||||
<span><?php printf('%s (%d KB)', Html::truncate($file->getName(), 50), $file->getSize() / 1024); ?></span>
|
||||
<span><?php
|
||||
printf('%s (%d KB)', Html::truncate($file->getName(), 50), $file->getSize() / 1024); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="list-actions">
|
||||
<?php if ($file->getThumb() !== 'no_thumb'): ?>
|
||||
<span title="<?php echo htmlspecialchars($file->getName(), ENT_QUOTES); ?>"
|
||||
<?php
|
||||
if ($file->getThumb() !== 'no_thumb'): ?>
|
||||
<span title="<?php
|
||||
echo htmlspecialchars($file->getName(), ENT_QUOTES); ?>"
|
||||
class="btn-action"
|
||||
data-item-id="<?php echo $file->getId(); ?>"
|
||||
data-action-route="<?php echo $_getvar('fileViewRoute'); ?>"
|
||||
data-item-id="<?php
|
||||
echo $file->getId(); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('fileViewRoute'); ?>"
|
||||
data-onclick="file/view">
|
||||
<img src="data:image/png;base64,<?php echo $file->getThumb(); ?>"
|
||||
<img src="data:image/png;base64,<?php
|
||||
echo $file->getThumb(); ?>"
|
||||
alt="thumbnail"/>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($_getvar('deleteEnabled') === 1): ?>
|
||||
<i class="material-icons btn-action <?php echo $icons->getIconDelete()->getClass(); ?>"
|
||||
title="<?php echo __('Delete File'); ?>"
|
||||
data-item-id="<?php echo $file->getId(); ?>"
|
||||
data-action-route="<?php echo $_getvar('fileDeleteRoute'); ?>"
|
||||
<?php
|
||||
if ($_getvar('deleteEnabled') === 1): ?>
|
||||
<i class="material-icons btn-action <?php
|
||||
echo $icons->delete()->getClass(); ?>"
|
||||
title="<?php
|
||||
echo __('Delete File'); ?>"
|
||||
data-item-id="<?php
|
||||
echo $file->getId(); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('fileDeleteRoute'); ?>"
|
||||
data-onclick="file/delete">
|
||||
<?php echo $icons->getIconDelete()->getIcon(); ?></i>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
echo $icons->delete()->getIcon(); ?></i>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<i class="material-icons btn-action mdl-list__item-icon <?php echo $icons->getIconDownload()->getClass(); ?>"
|
||||
title="<?php echo __('Download File'); ?>"
|
||||
data-item-id="<?php echo $file->getId(); ?>"
|
||||
data-action-route="<?php echo $_getvar('fileDownloadRoute'); ?>"
|
||||
data-item-type="<?php echo $extension; ?>"
|
||||
<i class="material-icons btn-action mdl-list__item-icon <?php
|
||||
echo $icons->download()->getClass(); ?>"
|
||||
title="<?php
|
||||
echo __('Download File'); ?>"
|
||||
data-item-id="<?php
|
||||
echo $file->getId(); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('fileDownloadRoute'); ?>"
|
||||
data-item-type="<?php
|
||||
echo $extension; ?>"
|
||||
data-onclick="file/download">
|
||||
<?php echo $icons->getIconDownload()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo $icons->download()->getIcon(); ?></i>
|
||||
|
||||
<?php if ($extension !== 'PDF'): ?>
|
||||
<i class="material-icons btn-action mdl-list__item-icon <?php echo $icons->getIconView()->getClass(); ?>"
|
||||
title="<?php echo __('View File'); ?>"
|
||||
data-item-id="<?php echo $file->getId(); ?>"
|
||||
data-action-route="<?php echo $_getvar('fileViewRoute'); ?>"
|
||||
<?php
|
||||
if ($extension !== 'PDF'): ?>
|
||||
<i class="material-icons btn-action mdl-list__item-icon <?php
|
||||
echo $icons->view()->getClass(); ?>"
|
||||
title="<?php
|
||||
echo __('View File'); ?>"
|
||||
data-item-id="<?php
|
||||
echo $file->getId(); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('fileViewRoute'); ?>"
|
||||
data-onclick="file/view">
|
||||
<?php echo $icons->getIconView()->getIcon(); ?></i>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
echo $icons->view()->getIcon(); ?></i>
|
||||
<?php
|
||||
endif; ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,36 +23,46 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var callable $_getvar
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var callable $_getvar
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var ConfigDataInterface $configData
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\Domain\Account\Services\AccountAcl;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
|
||||
?>
|
||||
|
||||
<div id="data-files">
|
||||
<div class="data">
|
||||
<div id="list-account-files"
|
||||
data-action-route="<?php echo $_getvar('fileListRoute'); ?>"
|
||||
data-item-id="<?php echo $_getvar('accountId'); ?>"
|
||||
data-history="<?php echo $_getvar('accountIsHistory', false); ?>"
|
||||
data-delete="<?php echo (int)$accountAcl->isShowDelete(); ?>">
|
||||
data-action-route="<?php
|
||||
echo $_getvar('fileListRoute'); ?>"
|
||||
data-item-id="<?php
|
||||
echo $_getvar('accountId'); ?>"
|
||||
data-history="<?php
|
||||
echo $_getvar('accountIsHistory', false); ?>"
|
||||
data-delete="<?php
|
||||
echo (int)$accountAcl->isShowDelete(); ?>">
|
||||
</div>
|
||||
|
||||
<?php if ($_getvar('editAction')): ?>
|
||||
<?php
|
||||
if ($_getvar('editAction')): ?>
|
||||
<div id="box-upload-files">
|
||||
<div id="drop-account-files"
|
||||
class="round active-tooltip dropzone"
|
||||
data-files-ext="<?php echo $_getvar('filesAllowedExts'); ?>"
|
||||
data-item-id="<?php echo $_getvar('accountId'); ?>"
|
||||
data-action-route="<?php echo $_getvar('fileUploadRoute'); ?>"
|
||||
data-delete="<?php echo (int)$accountAcl->isShowDelete(); ?>">
|
||||
data-files-ext="<?php
|
||||
echo $_getvar('filesAllowedExts'); ?>"
|
||||
data-item-id="<?php
|
||||
echo $_getvar('accountId'); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('fileUploadRoute'); ?>"
|
||||
data-delete="<?php
|
||||
echo (int)$accountAcl->isShowDelete(); ?>">
|
||||
<i class="material-icons md-60 mdl-color-text--teal-500">cloud_upload</i>
|
||||
</div>
|
||||
<form method="post" enctype="multipart/form-data"
|
||||
@@ -61,13 +71,16 @@ use SP\Domain\Account\Services\AccountAcl;
|
||||
<input type="file" id="inFile" multiple name="inFile"/>
|
||||
</form>
|
||||
<div class="mdl-tooltip" for="drop-account-files">
|
||||
<?php printf(
|
||||
<?php
|
||||
printf(
|
||||
__('Drop files here (max. 5) or click to select')
|
||||
. '<br><br>'
|
||||
. __('Maximum file size: %d MB'),
|
||||
$_getvar('maxFileSize')); ?>
|
||||
$_getvar('maxFileSize')
|
||||
); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,41 +23,57 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var callable $_getvar
|
||||
* @var ConfigDataInterface $configData
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
|
||||
?>
|
||||
|
||||
<div id="data-linkedAccounts">
|
||||
<div class="data">
|
||||
<ul class="mdl-list">
|
||||
<?php foreach ($_getvar('linkedAccounts') as $account): ?>
|
||||
<?php
|
||||
foreach ($_getvar('linkedAccounts') as $account): ?>
|
||||
<li class="mdl-list__item">
|
||||
<span class="btn-action mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">layers</i>
|
||||
<?php printf('%s (%s)', htmlspecialchars($account->name, ENT_QUOTES), htmlspecialchars($account->clientName, ENT_QUOTES)); ?>
|
||||
<?php
|
||||
printf(
|
||||
'%s (%s)',
|
||||
htmlspecialchars($account->name, ENT_QUOTES),
|
||||
htmlspecialchars($account->clientName, ENT_QUOTES)
|
||||
); ?>
|
||||
</span>
|
||||
<span class="list-actions">
|
||||
<i class="material-icons btn-action mdl-list__item-icon <?php echo $icons->getIconEdit()->getClass(); ?>"
|
||||
title="<?php echo __('Edit Account'); ?>"
|
||||
<i class="material-icons btn-action mdl-list__item-icon <?php
|
||||
echo $icons->edit()->getClass(); ?>"
|
||||
title="<?php
|
||||
echo __('Edit Account'); ?>"
|
||||
data-action-route="account/edit"
|
||||
data-item-id="<?php echo $account->id; ?>"
|
||||
data-item-id="<?php
|
||||
echo $account->id; ?>"
|
||||
data-onclick="account/edit">
|
||||
<?php echo $icons->getIconEdit()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo $icons->edit()->getIcon(); ?></i>
|
||||
|
||||
<i class="material-icons btn-action mdl-list__item-icon <?php echo $icons->getIconView()->getClass(); ?>"
|
||||
title="<?php echo __('Account Details'); ?>"
|
||||
<i class="material-icons btn-action mdl-list__item-icon <?php
|
||||
echo $icons->view()->getClass(); ?>"
|
||||
title="<?php
|
||||
echo __('Account Details'); ?>"
|
||||
data-action-route="account/view"
|
||||
data-item-id="<?php echo $account->id; ?>"
|
||||
data-item-id="<?php
|
||||
echo $account->id; ?>"
|
||||
data-onclick="account/view">
|
||||
<?php echo $icons->getIconView()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo $icons->view()->getIcon(); ?></i>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,15 +23,16 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var AccountSearchItem $account
|
||||
* @var DataGridTab $data
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var callable $_getvar
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var AccountSearchItem $account
|
||||
* @var DataGridTab $data
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Account\Services\AccountSearchItem;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Html\DataGrid\DataGridTab;
|
||||
|
||||
if (!isset($data)) {
|
||||
@@ -41,36 +42,53 @@ if (!isset($data)) {
|
||||
|
||||
<div id="data-search-header" class="data-header data-header-minimal">
|
||||
<ul>
|
||||
<?php foreach ($data->getHeader()->getSortFields() as $field): ?>
|
||||
<?php
|
||||
foreach ($data->getHeader()->getSortFields() as $field): ?>
|
||||
<li>
|
||||
<a id="btn-order-<?php echo $field->getSortKey(); ?>"
|
||||
class="round <?php echo ($data->getPager()->getSortKey() == $field->getSortKey()) ? 'filterOn' : ''; ?>">
|
||||
<?php echo $field->getName(); ?>
|
||||
<a id="btn-order-<?php
|
||||
echo $field->getSortKey(); ?>"
|
||||
class="round <?php
|
||||
echo ($data->getPager()->getSortKey() == $field->getSortKey()) ? 'filterOn' : ''; ?>">
|
||||
<?php
|
||||
echo $field->getName(); ?>
|
||||
</a>
|
||||
<span for="btn-order-<?php echo $field->getSortKey(); ?>"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php echo $field->getTitle(); ?></span>
|
||||
<span for="btn-order-<?php
|
||||
echo $field->getSortKey(); ?>"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php
|
||||
echo $field->getTitle(); ?></span>
|
||||
<?php
|
||||
$classDown = ($data->getPager()->getSortKey() == $field->getSortKey()
|
||||
&& $data->getPager()->getSortOrder() === 0) ? 'mdl-color--amber-A200' : 'md-dark md-inactive';
|
||||
&& $data->getPager()->getSortOrder() ===
|
||||
0) ? 'mdl-color--amber-A200' : 'md-dark md-inactive';
|
||||
$classUp = ($data->getPager()->getSortKey() == $field->getSortKey()
|
||||
&& $data->getPager()->getSortOrder() === 1) ? 'mdl-color--amber-A200' : 'md-dark md-inactive';
|
||||
&&
|
||||
$data->getPager()->getSortOrder() === 1) ? 'mdl-color--amber-A200' : 'md-dark md-inactive';
|
||||
?>
|
||||
<div
|
||||
class="icon material-icons sort-down cursor-pointer <?php echo $classDown; ?>"
|
||||
data-start="<?php echo $data->getPager()->getLimitStart(); ?>"
|
||||
data-key="<?php echo $field->getSortKey(); ?>"
|
||||
class="icon material-icons sort-down cursor-pointer <?php
|
||||
echo $classDown; ?>"
|
||||
data-start="<?php
|
||||
echo $data->getPager()->getLimitStart(); ?>"
|
||||
data-key="<?php
|
||||
echo $field->getSortKey(); ?>"
|
||||
data-dir="0">
|
||||
<?php echo $field->getIconDown()->getIcon(); ?>
|
||||
<?php
|
||||
echo $field->getIconDown()->getIcon(); ?>
|
||||
</div>
|
||||
<div
|
||||
class="icon material-icons sort-up cursor-pointer <?php echo $classUp; ?>"
|
||||
data-start="<?php echo $data->getPager()->getLimitStart(); ?>"
|
||||
data-key="<?php echo $field->getSortKey(); ?>"
|
||||
class="icon material-icons sort-up cursor-pointer <?php
|
||||
echo $classUp; ?>"
|
||||
data-start="<?php
|
||||
echo $data->getPager()->getLimitStart(); ?>"
|
||||
data-key="<?php
|
||||
echo $field->getSortKey(); ?>"
|
||||
data-dir="1">
|
||||
<?php echo $field->getIconUp()->getIcon(); ?>
|
||||
<?php
|
||||
echo $field->getIconUp()->getIcon(); ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
<li class="search-filter-spacer"></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,15 +23,16 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var AccountSearchItem $account
|
||||
* @var DataGrid $data
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var callable $_getvar
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var AccountSearchItem $account
|
||||
* @var DataGrid $data
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Account\Services\AccountSearchItem;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Html\DataGrid\DataGrid;
|
||||
|
||||
if (!isset($data)) {
|
||||
@@ -40,29 +41,39 @@ if (!isset($data)) {
|
||||
?>
|
||||
|
||||
<div id="res-content">
|
||||
<?php if ($data->getData()->getDataCount() === 0): ?>
|
||||
<div class="noRes round"><?php echo __('No records found'); ?></div>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
if ($data->getData()->getDataCount() === 0): ?>
|
||||
<div class="noRes round"><?php
|
||||
echo __('No records found'); ?></div>
|
||||
<?php
|
||||
else: ?>
|
||||
<!-- Data Header-->
|
||||
<div id="search-header">
|
||||
<?php include $data->getDataHeaderTemplate(); ?>
|
||||
<?php
|
||||
include $data->getDataHeaderTemplate(); ?>
|
||||
</div>
|
||||
|
||||
<?php if (AccountSearchItem::$topNavbar): ?>
|
||||
<?php
|
||||
if (AccountSearchItem::$topNavbar): ?>
|
||||
<!-- Data Pager -->
|
||||
<div id="search-pager-top">
|
||||
<?php include $data->getDataPagerTemplate(); ?>
|
||||
<?php
|
||||
include $data->getDataPagerTemplate(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<!-- Data Rows-->
|
||||
<div id="search-rows">
|
||||
<?php include $data->getDataRowTemplate(); ?>
|
||||
<?php
|
||||
include $data->getDataRowTemplate(); ?>
|
||||
</div>
|
||||
|
||||
<!-- Data Pager -->
|
||||
<div id="search-pager-bottom">
|
||||
<?php include $data->getDataPagerTemplate(); ?>
|
||||
<?php
|
||||
include $data->getDataPagerTemplate(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -23,19 +23,20 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var AccountSearchItem $account
|
||||
* @var DataGridTab $data
|
||||
* @var DataGridActionBase $actionMenu
|
||||
* @var DataGridActionBase $action
|
||||
* @var AccountSearchItem $accountSearchItem
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var callable $_getvar
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var AccountSearchItem $account
|
||||
* @var DataGridTab $data
|
||||
* @var DataGridActionBase $actionMenu
|
||||
* @var DataGridActionBase $action
|
||||
* @var AccountSearchItem $accountSearchItem
|
||||
*/
|
||||
|
||||
use SP\Core\Acl\AclActionsInterface;
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Account\Services\AccountSearchItem;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Html\DataGrid\Action\DataGridActionBase;
|
||||
use SP\Html\DataGrid\DataGridTab;
|
||||
use SP\Util\DateUtil;
|
||||
@@ -50,7 +51,8 @@ $favoriteRouteOff = $_getvar('favoriteRouteOff');
|
||||
?>
|
||||
|
||||
<div id="data-search">
|
||||
<?php foreach ($data->getData()->getData() as $index => $accountSearchItem):
|
||||
<?php
|
||||
foreach ($data->getData()->getData() as $index => $accountSearchItem):
|
||||
if ($index === 'count'): continue; endif;
|
||||
$accountSearchData = $accountSearchItem->getAccountSearchView();
|
||||
?>
|
||||
@@ -59,308 +61,459 @@ $favoriteRouteOff = $_getvar('favoriteRouteOff');
|
||||
<div class="label-left">
|
||||
<div class="label-row-up">
|
||||
<div class="field-customer label-field">
|
||||
<div class="field-name-hidden"><?php echo __('Client'); ?></div>
|
||||
<?php if (null !== $accountSearchItem->getClientLink()): ?>
|
||||
<a href="<?php echo $accountSearchItem->getClientLink(); ?>"
|
||||
<div class="field-name-hidden"><?php
|
||||
echo __('Client'); ?></div>
|
||||
<?php
|
||||
if (null !== $accountSearchItem->getClientLink()): ?>
|
||||
<a href="<?php
|
||||
echo $accountSearchItem->getClientLink(); ?>"
|
||||
target="blank"
|
||||
title="<?php echo __('Search in Wiki'); ?>">
|
||||
title="<?php
|
||||
echo __('Search in Wiki'); ?>">
|
||||
<span class="mdl-chip mdl-chip--contact">
|
||||
<span style="background-color: <?php echo $accountSearchItem->getColor(); ?>;"
|
||||
<span style="background-color: <?php
|
||||
echo $accountSearchItem->getColor(); ?>;"
|
||||
class="mdl-chip__contact mdl-color-text--white">
|
||||
<?php echo htmlspecialchars(mb_ucfirst($accountSearchData->getClientName()), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars(
|
||||
mb_ucfirst($accountSearchData->getClientName()),
|
||||
ENT_QUOTES
|
||||
); ?>
|
||||
</span>
|
||||
<span class="mdl-chip__text"
|
||||
title="<?php echo htmlspecialchars($accountSearchData->getClientName(), ENT_QUOTES); ?>">
|
||||
<?php echo htmlspecialchars($accountSearchItem->getShortClientName(), ENT_QUOTES); ?>
|
||||
title="<?php
|
||||
echo htmlspecialchars($accountSearchData->getClientName(), ENT_QUOTES); ?>">
|
||||
<?php
|
||||
echo htmlspecialchars($accountSearchItem->getShortClientName(), ENT_QUOTES); ?>
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<span class="mdl-chip mdl-chip--contact">
|
||||
<span style="background-color: <?php echo $accountSearchItem->getColor(); ?>;"
|
||||
<span style="background-color: <?php
|
||||
echo $accountSearchItem->getColor(); ?>;"
|
||||
class="mdl-chip__contact mdl-color-text--white">
|
||||
<?php echo htmlspecialchars(mb_ucfirst($accountSearchData->getClientName()), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars(
|
||||
mb_ucfirst($accountSearchData->getClientName()),
|
||||
ENT_QUOTES
|
||||
); ?>
|
||||
</span>
|
||||
<span class="mdl-chip__text"
|
||||
title="<?php echo htmlspecialchars($accountSearchData->getClientName(), ENT_QUOTES); ?>">
|
||||
<?php echo htmlspecialchars($accountSearchItem->getShortClientName(), ENT_QUOTES); ?>
|
||||
title="<?php
|
||||
echo htmlspecialchars($accountSearchData->getClientName(), ENT_QUOTES); ?>">
|
||||
<?php
|
||||
echo htmlspecialchars($accountSearchItem->getShortClientName(), ENT_QUOTES); ?>
|
||||
</span>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="field-account field-text label-field">
|
||||
<div class="field-name"><?php echo __('Name'); ?></div>
|
||||
<?php if ($accountSearchItem->isShow()
|
||||
<div class="field-name"><?php
|
||||
echo __('Name'); ?></div>
|
||||
<?php
|
||||
if ($accountSearchItem->isShow()
|
||||
&& $accountSearchItem::$accountLink
|
||||
&& $accountSearchItem->getLink()): ?>
|
||||
<a title="<?php echo __('Account Details'); ?>"
|
||||
&& $accountSearchItem->getLink()
|
||||
): ?>
|
||||
<a title="<?php
|
||||
echo __('Account Details'); ?>"
|
||||
class="btn-action"
|
||||
data-action-route="<?php echo $_getvar('viewAccountRoute'); ?>"
|
||||
data-item-id="<?php echo $accountSearchData->getId(); ?>"
|
||||
data-onclick="account/view"><?php echo htmlspecialchars($accountSearchData->getName(), ENT_QUOTES); ?></a>
|
||||
<?php else: ?>
|
||||
data-action-route="<?php
|
||||
echo $_getvar('viewAccountRoute'); ?>"
|
||||
data-item-id="<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
data-onclick="account/view"><?php
|
||||
echo htmlspecialchars($accountSearchData->getName(), ENT_QUOTES); ?></a>
|
||||
<?php
|
||||
else: ?>
|
||||
<div class="field-text">
|
||||
<?php echo htmlspecialchars($accountSearchData->getName(), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars($accountSearchData->getName(), ENT_QUOTES); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="field-category field-text label-field">
|
||||
<div class="field-name"><?php echo __('Category'); ?></div>
|
||||
<div class="field-name"><?php
|
||||
echo __('Category'); ?></div>
|
||||
<div class="field-text">
|
||||
<?php echo htmlspecialchars($accountSearchData->getCategoryName(), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars($accountSearchData->getCategoryName(), ENT_QUOTES); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($accountSearchItem->isShow()): ?>
|
||||
<?php
|
||||
if ($accountSearchItem->isShow()): ?>
|
||||
<div class="field-user field-text label-field">
|
||||
<div class="field-name"><?php echo __('User'); ?></div>
|
||||
<div class="field-name"><?php
|
||||
echo __('User'); ?></div>
|
||||
<div class="field-text">
|
||||
<?php echo htmlspecialchars($accountSearchItem->getShortLogin(), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars($accountSearchItem->getShortLogin(), ENT_QUOTES); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field-url field-text label-field">
|
||||
<div class="field-name"><?php echo __('URL / IP'); ?></div>
|
||||
<?php if ($accountSearchItem->isUrlIslink()): ?>
|
||||
<a href="<?php echo $accountSearchItem->getSafeUrl(); ?>"
|
||||
<div class="field-name"><?php
|
||||
echo __('URL / IP'); ?></div>
|
||||
<?php
|
||||
if ($accountSearchItem->isUrlIslink()): ?>
|
||||
<a href="<?php
|
||||
echo $accountSearchItem->getSafeUrl(); ?>"
|
||||
target="_blank"
|
||||
title="<?php printf(
|
||||
title="<?php
|
||||
printf(
|
||||
__('Open link to: %s'),
|
||||
htmlspecialchars($accountSearchData->getUrl(), ENT_QUOTES)
|
||||
); ?>">
|
||||
<?php echo htmlspecialchars($accountSearchItem->getShortUrl(), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars($accountSearchItem->getShortUrl(), ENT_QUOTES); ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<div class="field-text"><?php echo htmlspecialchars(
|
||||
<?php
|
||||
else: ?>
|
||||
<div class="field-text"><?php
|
||||
echo htmlspecialchars(
|
||||
$accountSearchItem->getShortUrl(),
|
||||
ENT_QUOTES
|
||||
); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<div class="field-user field-text label-field"></div>
|
||||
<div class="field-url field-text label-field"></div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
<div class="label-row-down">
|
||||
<div class="tags-box">
|
||||
<?php foreach ($accountSearchItem->getTags() as $tag): ?>
|
||||
<?php
|
||||
foreach ($accountSearchItem->getTags() as $tag): ?>
|
||||
<span class="tag"
|
||||
data-tag-id="<?php echo $tag->id; ?>">
|
||||
<?php echo htmlspecialchars($tag->name, ENT_QUOTES); ?>
|
||||
data-tag-id="<?php
|
||||
echo $tag->id; ?>">
|
||||
<?php
|
||||
echo htmlspecialchars($tag->name, ENT_QUOTES); ?>
|
||||
</span>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="label-right">
|
||||
<div class="account-info">
|
||||
<?php if ($accountSearchItem->isShow()): ?>
|
||||
<?php if ($accountSearchItem->isPasswordExpired()): ?>
|
||||
<i id="icon-expired-<?php echo $accountSearchData->getId(); ?>"
|
||||
class="material-icons <?php echo $icons->getIconWarning()->getClass(); ?>">
|
||||
<?php echo $icons->getIconWarning()->getIcon(); ?></i>
|
||||
<?php
|
||||
if ($accountSearchItem->isShow()): ?>
|
||||
<?php
|
||||
if ($accountSearchItem->isPasswordExpired()): ?>
|
||||
<i id="icon-expired-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="material-icons <?php
|
||||
echo $icons->warning()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->warning()->getIcon(); ?></i>
|
||||
<span
|
||||
for="icon-expired-<?php echo $accountSearchData->getId(); ?>"
|
||||
for="icon-expired-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="mdl-tooltip mdl-tooltip--top">
|
||||
<?php echo __('Password Expired'); ?>
|
||||
<?php
|
||||
echo __('Password Expired'); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($accountSearchData->getIsPrivate() === 1): ?>
|
||||
<i id="icon-private-<?php echo $accountSearchData->getId(); ?>"
|
||||
<?php
|
||||
if ($accountSearchData->getIsPrivate() === 1): ?>
|
||||
<i id="icon-private-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="material-icons">lock</i>
|
||||
<span
|
||||
for="icon-private-<?php echo $accountSearchData->getId(); ?>"
|
||||
for="icon-private-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="mdl-tooltip mdl-tooltip--top">
|
||||
<?php echo __('Private Account'); ?>
|
||||
<?php
|
||||
echo __('Private Account'); ?>
|
||||
</span>
|
||||
<?php elseif ($accountSearchData->getIsPrivateGroup() === 1): ?>
|
||||
<i id="icon-private-<?php echo $accountSearchData->getId(); ?>"
|
||||
<?php
|
||||
elseif ($accountSearchData->getIsPrivateGroup() === 1): ?>
|
||||
<i id="icon-private-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="material-icons">lock_open</i>
|
||||
<span
|
||||
for="icon-private-<?php echo $accountSearchData->getId(); ?>"
|
||||
for="icon-private-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="mdl-tooltip mdl-tooltip--top">
|
||||
<?php echo __('Private Account (Group)'); ?>
|
||||
<?php
|
||||
echo __('Private Account (Group)'); ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<i id="accesses-<?php echo $accountSearchData->getId(); ?>"
|
||||
<?php
|
||||
else: ?>
|
||||
<i id="accesses-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="material-icons">face</i>
|
||||
|
||||
<div class="mdl-tooltip mdl-tooltip--top"
|
||||
for="accesses-<?php echo $accountSearchData->getId(); ?>">
|
||||
for="accesses-<?php
|
||||
echo $accountSearchData->getId(); ?>">
|
||||
<div class="tooltip-text">
|
||||
<p class="tooltip-header"><?php echo __('Permissions'); ?></p>
|
||||
<p class="tooltip-header"><?php
|
||||
echo __('Permissions'); ?></p>
|
||||
<p>
|
||||
<?php echo implode('<br>', $accountSearchItem->getAccesses()); ?>
|
||||
<?php
|
||||
echo implode('<br>', $accountSearchItem->getAccesses()); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($accountSearchItem->isFavorite()): ?>
|
||||
<i id="btn-favorite-<?php echo $accountSearchData->getId(); ?>"
|
||||
<?php
|
||||
if ($accountSearchItem->isFavorite()): ?>
|
||||
<i id="btn-favorite-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="material-icons icon-favorite mdl-color-text--amber-A100"
|
||||
data-action-route-on="<?php echo $favoriteRouteOn; ?>"
|
||||
data-action-route-off="<?php echo $favoriteRouteOff; ?>"
|
||||
data-item-id="<?php echo $accountSearchData->getId(); ?>"
|
||||
data-status="<?php echo 'on'; ?>">star</i>
|
||||
data-action-route-on="<?php
|
||||
echo $favoriteRouteOn; ?>"
|
||||
data-action-route-off="<?php
|
||||
echo $favoriteRouteOff; ?>"
|
||||
data-item-id="<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
data-status="<?php
|
||||
echo 'on'; ?>">star</i>
|
||||
<span
|
||||
for="btn-favorite-<?php echo $accountSearchData->getId(); ?>"
|
||||
for="btn-favorite-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="mdl-tooltip mdl-tooltip--top">
|
||||
<?php echo __('Delete Favorite'); ?>
|
||||
<?php
|
||||
echo __('Delete Favorite'); ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<i id="btn-favorite-<?php echo $accountSearchData->getId(); ?>"
|
||||
<?php
|
||||
else: ?>
|
||||
<i id="btn-favorite-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="material-icons icon-favorite"
|
||||
data-action-route-on="<?php echo $favoriteRouteOn; ?>"
|
||||
data-action-route-off="<?php echo $favoriteRouteOff; ?>"
|
||||
data-item-id="<?php echo $accountSearchData->getId(); ?>"
|
||||
data-status="<?php echo 'off'; ?>">star_border</i>
|
||||
data-action-route-on="<?php
|
||||
echo $favoriteRouteOn; ?>"
|
||||
data-action-route-off="<?php
|
||||
echo $favoriteRouteOff; ?>"
|
||||
data-item-id="<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
data-status="<?php
|
||||
echo 'off'; ?>">star_border</i>
|
||||
<span
|
||||
for="btn-favorite-<?php echo $accountSearchData->getId(); ?>"
|
||||
for="btn-favorite-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="mdl-tooltip mdl-tooltip--top">
|
||||
<?php echo __('Mark as Favorite'); ?>
|
||||
<?php
|
||||
echo __('Mark as Favorite'); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($accountSearchData->getNotes() !== ''): ?>
|
||||
<i id="notes-<?php echo $accountSearchData->getId(); ?>"
|
||||
<?php
|
||||
if ($accountSearchData->getNotes() !== ''): ?>
|
||||
<i id="notes-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="material-icons">speaker_notes</i>
|
||||
<div class="mdl-tooltip mdl-tooltip--top"
|
||||
for="notes-<?php echo $accountSearchData->getId(); ?>">
|
||||
for="notes-<?php
|
||||
echo $accountSearchData->getId(); ?>">
|
||||
<div class="tooltip-text">
|
||||
<p class="tooltip-header"><?php echo __('Notes'); ?></p>
|
||||
<p class="tooltip-header"><?php
|
||||
echo __('Notes'); ?></p>
|
||||
<p>
|
||||
<?php echo $accountSearchItem->getShortNotes(); ?>
|
||||
<?php
|
||||
echo $accountSearchItem->getShortNotes(); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($accountSearchItem->getNumFiles() > 0): ?>
|
||||
<i id="attachments-<?php echo $accountSearchData->getId(); ?>"
|
||||
<?php
|
||||
if ($accountSearchItem->getNumFiles() > 0): ?>
|
||||
<i id="attachments-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="material-icons">attach_file</i>
|
||||
<div class="mdl-tooltip mdl-tooltip--top"
|
||||
for="attachments-<?php echo $accountSearchData->getId(); ?>">
|
||||
for="attachments-<?php
|
||||
echo $accountSearchData->getId(); ?>">
|
||||
<div class="tooltip-text">
|
||||
<?php printf(
|
||||
'%s: %d',
|
||||
<?php
|
||||
printf(
|
||||
'%s: %d',
|
||||
__('Attachments'),
|
||||
$accountSearchItem->getNumFiles()
|
||||
); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if (null !== $accountSearchItem->getPublicLink()): ?>
|
||||
<i id="publiclink-<?php echo $accountSearchData->getId(); ?>"
|
||||
class="material-icons"><?php echo $icons->getIconPublicLink()->getIcon(); ?></i>
|
||||
<?php
|
||||
if (null !== $accountSearchItem->getPublicLink()): ?>
|
||||
<i id="publiclink-<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
class="material-icons"><?php
|
||||
echo $icons->publicLink()->getIcon(); ?></i>
|
||||
<div class="mdl-tooltip mdl-tooltip--top"
|
||||
for="publiclink-<?php echo $accountSearchData->getId(); ?>">
|
||||
for="publiclink-<?php
|
||||
echo $accountSearchData->getId(); ?>">
|
||||
<div class="tooltip-text">
|
||||
<p class="tooltip-header"><?php echo __('Public Link'); ?></p>
|
||||
<p class="tooltip-header"><?php
|
||||
echo __('Public Link'); ?></p>
|
||||
<p>
|
||||
<?php printf(
|
||||
'%s: %s',
|
||||
<?php
|
||||
printf(
|
||||
'%s: %s',
|
||||
__('Expiry Date'),
|
||||
DateUtil::getDateFromUnix($accountSearchData->getPublicLinkDateExpire())
|
||||
); ?>
|
||||
<br>
|
||||
<?php printf(
|
||||
'%s: %s',
|
||||
__('Visits'),
|
||||
$accountSearchData->getPublicLinkTotalCountViews()
|
||||
<?php
|
||||
printf(
|
||||
'%s: %s',
|
||||
__('Visits'),
|
||||
$accountSearchData->getPublicLinkTotalCountViews()
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($wikiFilter
|
||||
&& $accountSearchItem->isWikiMatch($wikiFilter)): ?>
|
||||
<?php if (AccountSearchItem::$dokuWikiEnabled): ?>
|
||||
<a href="<?php echo $_getvar('wikiPageUrl'), urlencode(
|
||||
<?php
|
||||
if ($wikiFilter
|
||||
&& $accountSearchItem->isWikiMatch($wikiFilter)
|
||||
): ?>
|
||||
<?php
|
||||
if (AccountSearchItem::$dokuWikiEnabled): ?>
|
||||
<a href="<?php
|
||||
echo $_getvar('wikiPageUrl'), urlencode(
|
||||
$accountSearchData->getName()
|
||||
); ?>"
|
||||
target="_blank">
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Link to Wiki'); ?>">library_books</i>
|
||||
title="<?php
|
||||
echo __('Link to Wiki'); ?>">library_books</i>
|
||||
</a>
|
||||
<i class="btn-action material-icons fg-green100"
|
||||
title="<?php echo __('View at Wiki'); ?>"
|
||||
data-action-route="<?php echo AclActionsInterface::WIKI_VIEW; ?>"
|
||||
data-pagename="<?php echo htmlspecialchars($accountSearchData->getName(), ENT_QUOTES); ?>"
|
||||
data-pagename="<?php echo htmlspecialchars(
|
||||
title="<?php
|
||||
echo __('View at Wiki'); ?>"
|
||||
data-action-route="<?php
|
||||
echo AclActionsInterface::WIKI_VIEW; ?>"
|
||||
data-pagename="<?php
|
||||
echo htmlspecialchars($accountSearchData->getName(), ENT_QUOTES); ?>"
|
||||
data-pagename="<?php
|
||||
echo htmlspecialchars(
|
||||
$accountSearchData->getName(),
|
||||
ENT_QUOTES
|
||||
); ?>"
|
||||
data-onclick="wiki/show">library_books</i>
|
||||
<?php else: ?>
|
||||
<a href="<?php echo $_getvar('wikiPageUrl'), urlencode($accountSearchData->getName()); ?>"
|
||||
<?php
|
||||
else: ?>
|
||||
<a href="<?php
|
||||
echo $_getvar('wikiPageUrl'), urlencode($accountSearchData->getName()); ?>"
|
||||
target="_blank">
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Link to Wiki'); ?>">library_books</i>
|
||||
title="<?php
|
||||
echo __('Link to Wiki'); ?>">library_books</i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
<?php if ($accountSearchItem->isShow()
|
||||
|| $accountSearchItem->isShowRequest()): ?>
|
||||
<?php
|
||||
if ($accountSearchItem->isShow()
|
||||
|| $accountSearchItem->isShowRequest()
|
||||
): ?>
|
||||
<div class="account-actions">
|
||||
<?php foreach ($data->getDataActionsFiltered($accountSearchItem) as $action):
|
||||
<?php
|
||||
foreach ($data->getDataActionsFiltered($accountSearchItem) as $action):
|
||||
$actionUid = uniqid('btn-action-', true);
|
||||
?>
|
||||
<i id="<?php echo $actionUid; ?>"
|
||||
class="btn-action material-icons <?php echo $action->getClassesAsString(), ' ', $action->getIcon()->getClass(); ?>"
|
||||
data-item-id="<?php echo $accountSearchData->getId(); ?>"
|
||||
data-parent-id="<?php echo $accountSearchData->getParentId(); ?>"
|
||||
<?php foreach ($action->getData() as $dataName => $dataValue):
|
||||
<i id="<?php
|
||||
echo $actionUid; ?>"
|
||||
class="btn-action material-icons <?php
|
||||
echo $action->getClassesAsString(), ' ', $action->getIcon()->getClass(); ?>"
|
||||
data-item-id="<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
data-parent-id="<?php
|
||||
echo $accountSearchData->getParentId(); ?>"
|
||||
<?php
|
||||
foreach ($action->getData() as $dataName => $dataValue):
|
||||
printf('data-%s="%s"', $dataName, $dataValue);
|
||||
endforeach; ?>>
|
||||
<?php echo $action->getIcon()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo $action->getIcon()->getIcon(); ?></i>
|
||||
<span
|
||||
for="<?php echo $actionUid; ?>"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php echo $action->getTitle(); ?></span>
|
||||
<?php endforeach; ?>
|
||||
for="<?php
|
||||
echo $actionUid; ?>"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php
|
||||
echo $action->getTitle(); ?></span>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
|
||||
<?php if ($data->getDataActionsMenuCount()):
|
||||
<?php
|
||||
if ($data->getDataActionsMenuCount()):
|
||||
$actionsMenu = $data->getDataActionsMenuFiltered($accountSearchItem);
|
||||
if (count($actionsMenu) > 0):
|
||||
$actionMenuUid = uniqid('actions-menu-lower-right-', true);
|
||||
?>
|
||||
<button id="<?php echo $actionMenuUid; ?>"
|
||||
<button id="<?php
|
||||
echo $actionMenuUid; ?>"
|
||||
class="mdl-button mdl-js-button mdl-button--icon">
|
||||
<i class="material-icons">more_vert</i>
|
||||
</button>
|
||||
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect"
|
||||
for="<?php echo $actionMenuUid; ?>">
|
||||
for="<?php
|
||||
echo $actionMenuUid; ?>">
|
||||
|
||||
<?php foreach ($actionsMenu as $actionMenu): ?>
|
||||
<li class="btn-action mdl-menu__item <?php echo $actionMenu->getClassesAsString(); ?>"
|
||||
data-item-id="<?php echo $accountSearchData->getId(); ?>"
|
||||
data-parent-id="<?php echo $accountSearchData->getParentId(); ?>"
|
||||
<?php foreach ($actionMenu->getData() as $dataName => $dataValue):
|
||||
<?php
|
||||
foreach ($actionsMenu as $actionMenu): ?>
|
||||
<li class="btn-action mdl-menu__item <?php
|
||||
echo $actionMenu->getClassesAsString(); ?>"
|
||||
data-item-id="<?php
|
||||
echo $accountSearchData->getId(); ?>"
|
||||
data-parent-id="<?php
|
||||
echo $accountSearchData->getParentId(); ?>"
|
||||
<?php
|
||||
foreach ($actionMenu->getData() as $dataName => $dataValue):
|
||||
printf('data-%s="%s"', $dataName, $dataValue);
|
||||
endforeach; ?>>
|
||||
<i class="material-icons <?php echo $actionMenu->getIcon()->getClass(); ?>"
|
||||
title="<?php echo $actionMenu->getTitle(); ?>">
|
||||
<?php echo $actionMenu->getIcon()->getIcon(); ?>
|
||||
<i class="material-icons <?php
|
||||
echo $actionMenu->getIcon()->getClass(); ?>"
|
||||
title="<?php
|
||||
echo $actionMenu->getTitle(); ?>">
|
||||
<?php
|
||||
echo $actionMenu->getIcon()->getIcon(); ?>
|
||||
</i>
|
||||
<?php echo $actionMenu->getName(); ?>
|
||||
<?php
|
||||
echo $actionMenu->getName(); ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,15 +23,16 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var AccountSearchItem $account
|
||||
* @var DataGrid $data
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var callable $_getvar
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var AccountSearchItem $account
|
||||
* @var DataGrid $data
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Account\Services\AccountSearchItem;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Html\DataGrid\DataGrid;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
|
||||
@@ -45,90 +46,121 @@ $pager = $data->getPager();
|
||||
<div id="searchbox" class="round5 shadow">
|
||||
<form method="post" name="frmSearch" id="frmSearch" class="form-action"
|
||||
data-onsubmit="account/search"
|
||||
data-action-route="<?php echo $_getvar('searchRoute'); ?>">
|
||||
data-action-route="<?php
|
||||
echo $_getvar('searchRoute'); ?>">
|
||||
<div class="search-text">
|
||||
<div class="mdl-textfield mdl-js-textfield">
|
||||
<input class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
type="text" id="search"
|
||||
name="search"
|
||||
value="<?php echo $_getvar('searchTxt'); ?>"/>
|
||||
value="<?php
|
||||
echo $_getvar('searchTxt'); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="search"><?php echo __('Text to search for'); ?></label>
|
||||
for="search"><?php
|
||||
echo __('Text to search for'); ?></label>
|
||||
</div>
|
||||
|
||||
<?php include $this->includePartial('help_account_search'); ?>
|
||||
<?php
|
||||
include $this->includePartial('help_account_search'); ?>
|
||||
</div>
|
||||
|
||||
<div class="search-filters">
|
||||
<select id="client" name="client"
|
||||
class="select-box select-box-deselect" tabindex="3">
|
||||
<option value=""><?php echo __('Select Client'); ?></option>
|
||||
<?php /** @var SelectItem $client */
|
||||
<option value=""><?php
|
||||
echo __('Select Client'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $client */
|
||||
foreach ($_getvar('clients') as $client): ?>
|
||||
<option
|
||||
value="<?php echo $client->getId(); ?>" <?php echo $client->isSelected() ? 'selected' : ''; ?>><?php echo htmlspecialchars($client->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $client->getId(); ?>" <?php
|
||||
echo $client->isSelected() ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($client->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
|
||||
<select id="category" name="category"
|
||||
class="select-box select-box-deselect" tabindex="4">
|
||||
<option value=""><?php echo __('Select Category'); ?></option>
|
||||
<?php /** @var SelectItem $category */
|
||||
<option value=""><?php
|
||||
echo __('Select Category'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $category */
|
||||
foreach ($_getvar('categories') as $category): ?>
|
||||
<option
|
||||
value="<?php echo $category->getId(); ?>" <?php echo $category->isSelected() ? 'selected' : ''; ?>><?php echo htmlspecialchars($category->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $category->getId(); ?>" <?php
|
||||
echo $category->isSelected() ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($category->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="search-filters">
|
||||
|
||||
<div class="filter-buttons">
|
||||
<?php if ($_getvar('showGlobalSearch')
|
||||
&& !$_getvar('isAdmin')):
|
||||
<?php
|
||||
if ($_getvar('showGlobalSearch')
|
||||
&& !$_getvar('isAdmin')
|
||||
):
|
||||
?>
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect mdl-switch--inline"
|
||||
for="globalSearch"
|
||||
title="<?php echo __('Global search'); ?>">
|
||||
title="<?php
|
||||
echo __('Global search'); ?>">
|
||||
<input type="checkbox" id="globalSearch"
|
||||
class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="chkgsearch" tabindex="2"
|
||||
<?php echo $_getvar('searchGlobal') ? 'checked="checked"' : ''; ?>/>
|
||||
<?php
|
||||
echo $_getvar('searchGlobal') ? 'checked="checked"' : ''; ?>/>
|
||||
<span class="mdl-switch__label"
|
||||
title="<?php echo __('Global search'); ?>"></span>
|
||||
title="<?php
|
||||
echo __('Global search'); ?>"></span>
|
||||
</label>
|
||||
<input type="hidden" name="gsearch"
|
||||
value="<?php echo $_getvar('searchGlobal'); ?>">
|
||||
<?php endif; ?>
|
||||
value="<?php
|
||||
echo $_getvar('searchGlobal'); ?>">
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="filter-buttons">
|
||||
<?php if ($searchFavorites === true): ?>
|
||||
<?php
|
||||
if ($searchFavorites === true): ?>
|
||||
<button type="button" id="btn-favorite"
|
||||
class="icon-searchfav mdl-button mdl-js-button mdl-button--icon"
|
||||
tabindex="5">
|
||||
<i class="material-icons mdl-color-text--amber-A200"
|
||||
title="<?php echo __('Display All'); ?>">star</i>
|
||||
title="<?php
|
||||
echo __('Display All'); ?>">star</i>
|
||||
</button>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<button type="button" id="btn-favorite"
|
||||
class="icon-searchfav mdl-button mdl-js-button mdl-button--icon"
|
||||
tabindex="5">
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Show Favorites'); ?>">star</i>
|
||||
title="<?php
|
||||
echo __('Show Favorites'); ?>">star</i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<span for="btn-favorite"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php echo __('Favorites Filtering'); ?></span>
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php
|
||||
echo __('Favorites Filtering'); ?></span>
|
||||
|
||||
<button type="reset" id="btn-reset"
|
||||
class="btn-clear mdl-button mdl-js-button mdl-button--icon"
|
||||
tabindex="6">
|
||||
<i class="material-icons"><?php echo $icons->getIconClear()->getIcon(); ?></i>
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->clear()->getIcon(); ?></i>
|
||||
</button>
|
||||
<span for="btn-reset"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php echo $icons->getIconClear()->getTitle(); ?></span>
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php
|
||||
echo $icons->clear()->getTitle(); ?></span>
|
||||
</div>
|
||||
|
||||
<div class="filter-buttons filter-slider">
|
||||
@@ -136,42 +168,59 @@ $pager = $data->getPager();
|
||||
<input id="rpp" name="rpp" class="mdl-slider mdl-js-slider"
|
||||
type="range"
|
||||
min="3" step="3"
|
||||
value="<?php echo $pager->getLimitCount(); ?>"
|
||||
value="<?php
|
||||
echo $pager->getLimitCount(); ?>"
|
||||
tabindex="7"/>
|
||||
<span for="rpp"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php echo __('Accounts per page'); ?></span>
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php
|
||||
echo __('Accounts per page'); ?></span>
|
||||
</div>
|
||||
<i id="btn-filters" class="material-icons show-filter"
|
||||
data-state="0"
|
||||
data-show="<?php echo AccountSearchItem::$showTags; ?>"
|
||||
data-icon-down="<?php echo $icons->getIconAdd()->getIcon(); ?>"
|
||||
data-icon-up="<?php echo $icons->getIconRemove()->getIcon(); ?>"><?php echo $icons->getIconAdd()->getIcon(); ?></i>
|
||||
data-show="<?php
|
||||
echo AccountSearchItem::$showTags; ?>"
|
||||
data-icon-down="<?php
|
||||
echo $icons->add()->getIcon(); ?>"
|
||||
data-icon-up="<?php
|
||||
echo $icons->remove()->getIcon(); ?>"><?php
|
||||
echo $icons->add()->getIcon(); ?></i>
|
||||
<span for="btn-filters"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php echo __('More Filters'); ?></span>
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php
|
||||
echo __('More Filters'); ?></span>
|
||||
</div>
|
||||
|
||||
<div class="search-filters-tags">
|
||||
<select id="tags" name="tags[]" class="select-box" multiple
|
||||
tabindex="8">
|
||||
<option value=""><?php echo __('Select Tag'); ?></option>
|
||||
<?php /** @var SelectItem $tag */
|
||||
<option value=""><?php
|
||||
echo __('Select Tag'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $tag */
|
||||
foreach ($_getvar('tags') as $tag): ?>
|
||||
<option
|
||||
value="<?php echo $tag->getId(); ?>" <?php echo $tag->isSelected() ? 'selected' : ''; ?>><?php echo htmlspecialchars($tag->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $tag->getId(); ?>" <?php
|
||||
echo $tag->isSelected() ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($tag->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="submit" style="visibility: hidden"/>
|
||||
|
||||
<input type="hidden" name="start"
|
||||
value="<?php echo $pager->getLimitStart(); ?>">
|
||||
value="<?php
|
||||
echo $pager->getLimitStart(); ?>">
|
||||
<input type="hidden" name="skey"
|
||||
value="<?php echo $pager->getSortKey(); ?>"/>
|
||||
value="<?php
|
||||
echo $pager->getSortKey(); ?>"/>
|
||||
<input type="hidden" name="sorder"
|
||||
value="<?php echo $pager->getSortOrder(); ?>"/>
|
||||
value="<?php
|
||||
echo $pager->getSortOrder(); ?>"/>
|
||||
<input type="hidden" name="searchfav"
|
||||
value="<?php echo $searchFavorites; ?>"/>
|
||||
value="<?php
|
||||
echo $searchFavorites; ?>"/>
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,62 +23,84 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIcons $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var AccountExtData $accountData
|
||||
* @var AccountAcl $accountAcl
|
||||
* @var ConfigDataInterface $configData
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\Domain\Account\Services\AccountAcl;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
|
||||
?>
|
||||
<div id="box-popup" class="box-password-view">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?>
|
||||
<?php if ($_getvar('isLinked')): ?>
|
||||
<i title="<?php echo __('Linked Account'); ?>"
|
||||
class="material-icons"><?php echo $icons->getIconPublicLink()->getIcon(); ?></i>
|
||||
<?php endif; ?>
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?>
|
||||
<?php
|
||||
if ($_getvar('isLinked')): ?>
|
||||
<i title="<?php
|
||||
echo __('Linked Account'); ?>"
|
||||
class="material-icons"><?php
|
||||
echo $icons->publicLink()->getIcon(); ?></i>
|
||||
<?php
|
||||
endif; ?>
|
||||
</h2>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<?php if (!$_getvar('isImage')): ?>
|
||||
<td class="dialog-text dialog-user-text"><?php echo wordwrap($_getvar('login'), 50, PHP_EOL, true); ?></td>
|
||||
<?php
|
||||
if (!$_getvar('isImage')): ?>
|
||||
<td class="dialog-text dialog-user-text"><?php
|
||||
echo wordwrap($_getvar('login'), 50, PHP_EOL, true); ?></td>
|
||||
<td class="dialog-button right">
|
||||
<button class="dialog-clip-button mdl-button mdl-js-button mdl-js-ripple-effect"
|
||||
title="<?php echo __('Copy Username'); ?>"
|
||||
title="<?php
|
||||
echo __('Copy Username'); ?>"
|
||||
data-clipboard-target=".dialog-user-text">
|
||||
<?php echo __('User'); ?>
|
||||
<i class="material-icons"><?php echo $icons->getIconClipboard()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo __('User'); ?>
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->clipboard()->getIcon(); ?></i>
|
||||
</button>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<td class="dialog-user-text">
|
||||
<img src="data:image/png;base64,<?php echo $_getvar('login'); ?>"/>
|
||||
<img src="data:image/png;base64,<?php
|
||||
echo $_getvar('login'); ?>"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php if (!$_getvar('isImage')): ?>
|
||||
<td class="dialog-text dialog-pass-text"><?php echo wordwrap($_getvar('pass'), 50, PHP_EOL, true); ?></td>
|
||||
<?php
|
||||
if (!$_getvar('isImage')): ?>
|
||||
<td class="dialog-text dialog-pass-text"><?php
|
||||
echo wordwrap($_getvar('pass'), 50, PHP_EOL, true); ?></td>
|
||||
<td class="dialog-button right">
|
||||
<button class="dialog-clip-button mdl-button mdl-js-button mdl-js-ripple-effect"
|
||||
title="<?php echo __('Copy Password'); ?>"
|
||||
title="<?php
|
||||
echo __('Copy Password'); ?>"
|
||||
data-clipboard-target=".dialog-pass-text">
|
||||
<?php echo __('Password'); ?>
|
||||
<i class="material-icons"><?php echo $icons->getIconClipboard()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo __('Password'); ?>
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->clipboard()->getIcon(); ?></i>
|
||||
</button>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<td class="dialog-pass-text">
|
||||
<img src="data:image/png;base64,<?php echo $_getvar('pass'); ?>"/>
|
||||
<img src="data:image/png;base64,<?php
|
||||
echo $_getvar('pass'); ?>"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,86 +1,157 @@
|
||||
<?php
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var CustomFieldItem[] $customFields
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
/*
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* sysPass is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
/**
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var CustomFieldItem[] $customFields
|
||||
* @var callable $_getvar
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\CustomField\Services\CustomFieldItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$customFields = $_getvar('customFields');
|
||||
|
||||
foreach ($customFields as $index => $field):?>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo htmlspecialchars($field->definitionName, ENT_QUOTES); ?>
|
||||
<?php if ($field->isEncrypted && $field->isValueEncrypted === true): ?>
|
||||
<?php
|
||||
echo htmlspecialchars($field->definitionName, ENT_QUOTES); ?>
|
||||
<?php
|
||||
if ($field->isEncrypted && $field->isValueEncrypted === true): ?>
|
||||
<i class="icon material-icons mdl-color-text--teal-500"
|
||||
title="<?php echo __('Encrypted'); ?>">
|
||||
title="<?php
|
||||
echo __('Encrypted'); ?>">
|
||||
lock_outline
|
||||
</i>
|
||||
<?php elseif ($field->isEncrypted && $field->isValueEncrypted === false): ?>
|
||||
<?php
|
||||
elseif ($field->isEncrypted && $field->isValueEncrypted === false): ?>
|
||||
<i class="icon material-icons mdl-color-text--amber-500"
|
||||
title="<?php echo __('Data will be encrypted after saving'); ?>">
|
||||
title="<?php
|
||||
echo __('Data will be encrypted after saving'); ?>">
|
||||
lock_outline
|
||||
</i>
|
||||
<?php elseif ($field->isEncrypted === 0 && $field->isValueEncrypted === true): ?>
|
||||
<?php
|
||||
elseif ($field->isEncrypted === 0 && $field->isValueEncrypted === true): ?>
|
||||
<i class="icon material-icons mdl-color-text--red-500"
|
||||
title="<?php echo __('Data will be unencrypted after saving'); ?>">
|
||||
title="<?php
|
||||
echo __('Data will be unencrypted after saving'); ?>">
|
||||
lock_open
|
||||
</i>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($field->help): ?>
|
||||
<div id="help-<?php echo $field->formId; ?>"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
<?php
|
||||
if ($field->help): ?>
|
||||
<div id="help-<?php
|
||||
echo $field->formId; ?>"
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-<?php echo $field->formId; ?>">
|
||||
<p><?php echo $field->help; ?></p>
|
||||
for="help-<?php
|
||||
echo $field->formId; ?>">
|
||||
<p><?php
|
||||
echo $field->help; ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<?php if ($field->typeName === 'color' && $_getvar('isView')): ?>
|
||||
<?php
|
||||
if ($field->typeName === 'color' && $_getvar('isView')): ?>
|
||||
<span class="round custom-input-color"
|
||||
style="background-color: <?php echo $field->value; ?>;"></span>
|
||||
<?php elseif ($field->typeName === 'password'): ?>
|
||||
style="background-color: <?php
|
||||
echo $field->value; ?>;"></span>
|
||||
<?php
|
||||
elseif ($field->typeName === 'password'): ?>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="<?php echo $field->formId; ?>"
|
||||
name="customfield[<?php echo $field->definitionId; ?>]"
|
||||
<input id="<?php
|
||||
echo $field->formId; ?>"
|
||||
name="customfield[<?php
|
||||
echo $field->definitionId; ?>]"
|
||||
type="password"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__no-pki <?php echo $_getvar('isView') ? 'passwordfield__input-show' : 'passwordfield__input'; ?>"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__no-pki <?php
|
||||
echo $_getvar('isView') ? 'passwordfield__input-show' : 'passwordfield__input'; ?>"
|
||||
data-clipboard="1"
|
||||
maxlength="500"
|
||||
value="<?php echo !$_getvar('showViewCustomPass') && !empty($field->value) ? '***' : htmlspecialchars($field->value, ENT_QUOTES); ?>" <?php echo $field->required ? 'required' : ''; ?> <?php echo $_getvar('readonly'); ?>>
|
||||
value="<?php
|
||||
echo !$_getvar('showViewCustomPass') && !empty($field->value) ? '***' : htmlspecialchars(
|
||||
$field->value,
|
||||
ENT_QUOTES
|
||||
); ?>" <?php
|
||||
echo $field->required ? 'required' : ''; ?> <?php
|
||||
echo $_getvar('readonly'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="<?php echo $field->formId; ?>"><?php echo htmlspecialchars($field->definitionName, ENT_QUOTES); ?></label>
|
||||
for="<?php
|
||||
echo $field->formId; ?>"><?php
|
||||
echo htmlspecialchars($field->definitionName, ENT_QUOTES); ?></label>
|
||||
</div>
|
||||
<?php elseif ($field->typeName === 'textarea'): ?>
|
||||
<?php
|
||||
elseif ($field->typeName === 'textarea'): ?>
|
||||
<div class="mdl-textfield mdl-js-textfield">
|
||||
<textarea
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
type="text" rows="3"
|
||||
name="customfield[<?php echo $field->definitionId; ?>]"
|
||||
id="<?php echo $field->formId; ?>" <?php echo $_getvar('readonly'); ?>><?php echo htmlspecialchars($field->value, ENT_QUOTES); ?></textarea>
|
||||
name="customfield[<?php
|
||||
echo $field->definitionId; ?>]"
|
||||
id="<?php
|
||||
echo $field->formId; ?>" <?php
|
||||
echo $_getvar('readonly'); ?>><?php
|
||||
echo htmlspecialchars($field->value, ENT_QUOTES); ?></textarea>
|
||||
<label class="mdl-textfield__label"
|
||||
for="<?php echo $field->formId; ?>"><?php echo htmlspecialchars($field->definitionName, ENT_QUOTES); ?></label>
|
||||
for="<?php
|
||||
echo $field->formId; ?>"><?php
|
||||
echo htmlspecialchars($field->definitionName, ENT_QUOTES); ?></label>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="<?php echo $field->formId; ?>"
|
||||
name="customfield[<?php echo $field->definitionId; ?>]"
|
||||
type="<?php echo $field->typeName; ?>"
|
||||
<input id="<?php
|
||||
echo $field->formId; ?>"
|
||||
name="customfield[<?php
|
||||
echo $field->definitionId; ?>]"
|
||||
type="<?php
|
||||
echo $field->typeName; ?>"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="500"
|
||||
value="<?php echo htmlspecialchars($field->value, ENT_QUOTES); ?>" <?php echo $field->required ? 'required' : ''; ?> <?php echo $_getvar('readonly'); ?>>
|
||||
value="<?php
|
||||
echo htmlspecialchars($field->value, ENT_QUOTES); ?>" <?php
|
||||
echo $field->required ? 'required' : ''; ?> <?php
|
||||
echo $_getvar('readonly'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="<?php echo $field->formId; ?>"><?php echo htmlspecialchars($field->definitionName, ENT_QUOTES); ?></label>
|
||||
for="<?php
|
||||
echo $field->formId; ?>"><?php
|
||||
echo htmlspecialchars($field->definitionName, ENT_QUOTES); ?></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
|
||||
@@ -1,14 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* @var DataTab[] $tabs
|
||||
* @var ThemeIcons $icons
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
/*
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* sysPass is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
/**
|
||||
* @var DataTab[] $tabs
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var callable $_getvar
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Mvc\View\Components\DataTab;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$tabs = $_getvar('tabs');
|
||||
?>
|
||||
@@ -17,19 +40,26 @@ $tabs = $_getvar('tabs');
|
||||
<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
|
||||
<div id="tabsHeader" class="mdl-tabs__tab-bar"></div>
|
||||
|
||||
<?php foreach ($tabs as $index => $tab): ?>
|
||||
<div id="tabs-<?php echo $index; ?>"
|
||||
<?php
|
||||
foreach ($tabs as $index => $tab): ?>
|
||||
<div id="tabs-<?php
|
||||
echo $index; ?>"
|
||||
class="mdl-tabs__panel"
|
||||
data-tab-route="<?php echo $_getvar('tabsRoute'); ?>"
|
||||
data-tab-index="<?php echo $index; ?>">
|
||||
data-tab-route="<?php
|
||||
echo $_getvar('tabsRoute'); ?>"
|
||||
data-tab-index="<?php
|
||||
echo $index; ?>">
|
||||
<div class="tab-data">
|
||||
<?php echo $tab->render(); ?>
|
||||
<?php
|
||||
echo $tab->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
sysPassApp.theme.html.tabs.add("#tabsHeader", <?php echo $index; ?>, "<?php echo $tab->getTitle(); ?>", <?php echo $index === $_getvar('activeTab') ? 1 : 0; ?>);
|
||||
sysPassApp.theme.html.tabs.add("#tabsHeader", <?php echo $index; ?>, "<?php echo $tab->getTitle(
|
||||
); ?>", <?php echo $index === $_getvar('activeTab') ? 1 : 0; ?>);
|
||||
</script>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</div>
|
||||
<!-- End Tabs-->
|
||||
<!-- End Tabs-->
|
||||
|
||||
@@ -1,23 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
/*
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* sysPass is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Mvc\View\Template;
|
||||
/**
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var callable $_getvar
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
<div ID='debuginfo' class='round'>
|
||||
<h3>DEBUG INFO</h3>
|
||||
<ul>
|
||||
<li>RENDER -> <?php echo $_getvar('time'); ?> sec</li>
|
||||
<li>MEM -> Init: <?php echo $_getvar('memInit'); ?> KB -
|
||||
End: <?php echo $_getvar('memEnd'); ?> KB -
|
||||
Total: <?php echo $_getvar('memEnd') - $_getvar('memInit'); ?> KB
|
||||
<li>RENDER -> <?php
|
||||
echo $_getvar('time'); ?> sec
|
||||
</li>
|
||||
<li>MEM -> Init: <?php
|
||||
echo $_getvar('memInit'); ?> KB -
|
||||
End: <?php
|
||||
echo $_getvar('memEnd'); ?> KB -
|
||||
Total: <?php
|
||||
echo $_getvar('memEnd') - $_getvar('memInit'); ?> KB
|
||||
</li>
|
||||
<li>SESSION:
|
||||
<pre><?php echo print_r($_SESSION, true) ?></pre>
|
||||
<pre><?php
|
||||
echo print_r($_SESSION, true) ?></pre>
|
||||
</li>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,29 +23,36 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<?php if ($_getvar('gdIsAvailable') !== true): ?>
|
||||
<?php
|
||||
if ($_getvar('gdIsAvailable') !== true): ?>
|
||||
<div class="msg-option-unvailable">
|
||||
<?php printf(__('The \'%s\' extension is unavailable'), 'gd'); ?>
|
||||
<?php
|
||||
printf(__('The \'%s\' extension is unavailable'), 'gd'); ?>
|
||||
<i id="help-gd"
|
||||
class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
class="material-icons"><?php
|
||||
echo $icons->help()->getIcon(); ?></i>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-gd">
|
||||
<p>
|
||||
<?php echo __('This extension is needed to display passwords as images'); ?>
|
||||
<?php
|
||||
echo __('This extension is needed to display passwords as images'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<form method="post" name="frmAccounts" id="frmAccounts" class="form-action"
|
||||
data-onsubmit="config/save"
|
||||
@@ -54,19 +61,24 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">search</i>
|
||||
<?php echo __('Searching'); ?>
|
||||
<?php
|
||||
echo __('Searching'); ?>
|
||||
</div>
|
||||
|
||||
<table id="tblAccounts" class="data tblConfig">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Results per page'); ?>
|
||||
<?php
|
||||
echo __('Results per page'); ?>
|
||||
<div id="help-account_count"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-account_count">
|
||||
<p>
|
||||
<?php echo __('Number of results per page to display when performing a search.'); ?>
|
||||
<?php
|
||||
echo __('Number of results per page to display when performing a search.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -77,10 +89,12 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
pattern="[0-9]{1,5}"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="5"
|
||||
value="<?php echo $configData->getAccountCount(); ?>"
|
||||
value="<?php
|
||||
echo $configData->getAccountCount(); ?>"
|
||||
required/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="account_count"><?php echo __('Results per page'); ?></label>
|
||||
for="account_count"><?php
|
||||
echo __('Results per page'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -95,13 +109,16 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input type="checkbox"
|
||||
id="account_expire_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="account_expire_enabled" <?php echo $configData->isAccountExpireEnabled() ? 'checked' : ''; ?>/>
|
||||
name="account_expire_enabled" <?php
|
||||
echo $configData->isAccountExpireEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Accounts password expiry'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Enables the accounts password expiry date.'); ?></span>
|
||||
<span><?php
|
||||
echo __('Accounts password expiry'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Enables the accounts password expiry date.'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -109,13 +126,17 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Password expiry time'); ?>
|
||||
<?php
|
||||
echo __('Password expiry time'); ?>
|
||||
<div id="help-account_expire_time"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-account_expire_time">
|
||||
<p>
|
||||
<?php echo __('Number of days for account\'s password expiry date.'); ?>
|
||||
<?php
|
||||
echo __('Number of days for account\'s password expiry date.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -125,9 +146,11 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
type="number"
|
||||
pattern="[0-9]{1,3}"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo $configData->getAccountExpireTime() / 24 / 3600; ?>"/>
|
||||
value="<?php
|
||||
echo $configData->getAccountExpireTime() / 24 / 3600; ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="account_expire_time"><?php echo __('Expire time (days)'); ?></label>
|
||||
for="account_expire_time"><?php
|
||||
echo __('Expire time (days)'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -141,13 +164,16 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="account_link_enabled">
|
||||
<input type="checkbox" id="account_link_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="account_link_enabled" <?php echo $configData->isAccountLink() ? 'checked' : ''; ?>/>
|
||||
name="account_link_enabled" <?php
|
||||
echo $configData->isAccountLink() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Account name as link'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Enables to use the account name as a link to account details.'); ?></span>
|
||||
<span><?php
|
||||
echo __('Account name as link'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Enables to use the account name as a link to account details.'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -158,13 +184,18 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input type="checkbox"
|
||||
id="account_globalsearch_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="account_globalsearch_enabled" <?php echo $configData->isGlobalSearch() ? 'checked' : ''; ?>/>
|
||||
name="account_globalsearch_enabled" <?php
|
||||
echo $configData->isGlobalSearch() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Global searches'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Allows the users to do searches that includes all accounts, they won\'t be able to display the account details if they don\'t have permission.'); ?></span>
|
||||
<span><?php
|
||||
echo __('Global searches'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __(
|
||||
'Allows the users to do searches that includes all accounts, they won\'t be able to display the account details if they don\'t have permission.'
|
||||
); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -175,16 +206,22 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input type="checkbox"
|
||||
id="account_passtoimage_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="account_passtoimage_enabled" <?php echo $configData->isAccountPassToImage() ? 'checked' : ''; ?>/>
|
||||
name="account_passtoimage_enabled" <?php
|
||||
echo $configData->isAccountPassToImage() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Image to show password'); ?></span>
|
||||
<span><?php
|
||||
echo __('Image to show password'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Generate an image with a text of the account password.'); ?>
|
||||
<?php
|
||||
echo __('Generate an image with a text of the account password.'); ?>
|
||||
<br>
|
||||
<?php echo __('Useful for environments where copying a password to clipboard is a security risk.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'Useful for environments where copying a password to clipboard is a security risk.'
|
||||
); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -196,14 +233,17 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input type="checkbox"
|
||||
id="account_resultsascards_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="account_resultsascards_enabled" <?php echo $configData->isResultsAsCards() ? 'checked' : ''; ?>/>
|
||||
name="account_resultsascards_enabled" <?php
|
||||
echo $configData->isResultsAsCards() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Results like Cards'); ?></span>
|
||||
<span><?php
|
||||
echo __('Results like Cards'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Displays account\'s search results on a card like format.'); ?>
|
||||
<?php
|
||||
echo __('Displays account\'s search results on a card like format.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -215,16 +255,22 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input type="checkbox"
|
||||
id="account_fullgroup_access_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="account_fullgroup_access_enabled" <?php echo $configData->isAccountFullGroupAccess() ? 'checked' : ''; ?>/>
|
||||
name="account_fullgroup_access_enabled" <?php
|
||||
echo $configData->isAccountFullGroupAccess() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Secondary Groups Access'); ?></span>
|
||||
<span><?php
|
||||
echo __('Secondary Groups Access'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Grants access to users that are included in secondary groups.'); ?>
|
||||
<?php
|
||||
echo __('Grants access to users that are included in secondary groups.'); ?>
|
||||
<br>
|
||||
<?php echo __('By default, user in a secondary group is granted if the secondary group is set as user\'s main group.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'By default, user in a secondary group is granted if the secondary group is set as user\'s main group.'
|
||||
); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -235,7 +281,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">link</i>
|
||||
<?php echo __('Public Links'); ?>
|
||||
<?php
|
||||
echo __('Public Links'); ?>
|
||||
</div>
|
||||
|
||||
<table id="tblFiles" class="data tblConfig round">
|
||||
@@ -249,18 +296,25 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="publiclinks_enabled">
|
||||
<input type="checkbox" id="publiclinks_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="publiclinks_enabled" <?php echo $configData->isPublinksEnabled() ? 'checked' : ''; ?>/>
|
||||
name="publiclinks_enabled" <?php
|
||||
echo $configData->isPublinksEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Enable Public Links'); ?></span>
|
||||
<span><?php
|
||||
echo __('Enable Public Links'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Enables the ability to create public links to view an account\'s details'); ?>
|
||||
<?php
|
||||
echo __('Enables the ability to create public links to view an account\'s details'); ?>
|
||||
<br>
|
||||
<?php echo __('Linked accounts will be visible by anyone that have the link.'); ?>
|
||||
<?php
|
||||
echo __('Linked accounts will be visible by anyone that have the link.'); ?>
|
||||
<br>
|
||||
<?php echo __('In order to create links, users must have activated the option on their profiles.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'In order to create links, users must have activated the option on their profiles.'
|
||||
); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -272,14 +326,17 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input type="checkbox"
|
||||
id="publiclinks_image_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="publiclinks_image_enabled" <?php echo $configData->isPublinksImageEnabled() ? 'checked' : ''; ?>/>
|
||||
name="publiclinks_image_enabled" <?php
|
||||
echo $configData->isPublinksImageEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Use an image for password'); ?></span>
|
||||
<span><?php
|
||||
echo __('Use an image for password'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('The account password is shown as image.'); ?>
|
||||
<?php
|
||||
echo __('The account password is shown as image.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -288,7 +345,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Expire time'); ?>
|
||||
<?php
|
||||
echo __('Expire time'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -297,15 +355,18 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
pattern="[0-9]{1,5}"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="5"
|
||||
value="<?php echo $configData->getPublinksMaxTime() / 60; ?>"/>
|
||||
value="<?php
|
||||
echo $configData->getPublinksMaxTime() / 60; ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="publiclinks_maxtime"><?php echo __('Expire time (minutes)'); ?></label>
|
||||
for="publiclinks_maxtime"><?php
|
||||
echo __('Expire time (minutes)'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Maximum visits'); ?>
|
||||
<?php
|
||||
echo __('Maximum visits'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -314,9 +375,11 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
pattern="[0-9]{1,5}"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="5"
|
||||
value="<?php echo $configData->getPublinksMaxViews(); ?>"/>
|
||||
value="<?php
|
||||
echo $configData->getPublinksMaxViews(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="publiclinks_maxviews"><?php echo __('Maximum visits'); ?></label>
|
||||
for="publiclinks_maxviews"><?php
|
||||
echo __('Maximum visits'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -324,7 +387,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">attachment</i>
|
||||
<?php echo __('Files'); ?>
|
||||
<?php
|
||||
echo __('Files'); ?>
|
||||
</div>
|
||||
|
||||
<table id="tblFiles" class="data tblConfig">
|
||||
@@ -338,13 +402,16 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="files_enabled">
|
||||
<input type="checkbox" id="files_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="files_enabled" <?php echo $configData->isFilesEnabled() ? 'checked' : ''; ?>/>
|
||||
name="files_enabled" <?php
|
||||
echo $configData->isFilesEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Files management'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Enables the uploading and downloading of accounts files.'); ?></span>
|
||||
<span><?php
|
||||
echo __('Files management'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Enables the uploading and downloading of accounts files.'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -352,48 +419,66 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Allowed MIME types'); ?>
|
||||
<?php
|
||||
echo __('Allowed MIME types'); ?>
|
||||
<div id="help-files_allowed_mimetypes"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-files_allowed_mimetypes">
|
||||
<p>
|
||||
<?php echo __('Allowed file MIME types for uploading.'); ?>
|
||||
<?php
|
||||
echo __('Allowed file MIME types for uploading.'); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php echo __('In order to add more MIME types, you need to add them into mime.xml file within the config directory.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'In order to add more MIME types, you need to add them into mime.xml file within the config directory.'
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Allowed MIME types'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Allowed MIME types'); ?></div>
|
||||
|
||||
<select id="files_allowed_mimetypes"
|
||||
name="files_allowed_mimetypes[]"
|
||||
multiple="multiple" class="select-box"
|
||||
data-create="true">
|
||||
<?php /** @var SelectItem $mimeType */
|
||||
<?php
|
||||
/** @var SelectItem $mimeType */
|
||||
foreach ($_getvar('mimeTypes') as $mimeType): ?>
|
||||
<option
|
||||
value="<?php echo $mimeType->getName(); ?>"
|
||||
<?php echo $mimeType->isSelected() ? 'selected' : '' ?>><?php echo $mimeType->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $mimeType->getName(); ?>"
|
||||
<?php
|
||||
echo $mimeType->isSelected() ? 'selected' : '' ?>><?php
|
||||
echo $mimeType->getName(); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Maximum file size'); ?>
|
||||
<?php
|
||||
echo __('Maximum file size'); ?>
|
||||
<div id="help-files_allowed_size"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-files_allowed_size">
|
||||
<p>
|
||||
<?php echo __('Sets the maximum file size for uploading.'); ?>
|
||||
<?php
|
||||
echo __('Sets the maximum file size for uploading.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Absolute maximum is 16MB.'); ?>
|
||||
<?php
|
||||
echo __('Absolute maximum is 16MB.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -404,9 +489,11 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
pattern="[0-9]{1,5}"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="5"
|
||||
value="<?php echo $configData->getFilesAllowedSize(); ?>"/>
|
||||
value="<?php
|
||||
echo $configData->getFilesAllowedSize(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="files_allowed_size"><?php echo __('Maximum file size in kilobytes'); ?></label>
|
||||
for="files_allowed_size"><?php
|
||||
echo __('Maximum file size in kilobytes'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -417,16 +504,22 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button form="frmAccounts"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,74 +23,96 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var callable $_getRoute
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<?php if ($_getvar('pharIsAvailable') !== true): ?>
|
||||
<?php
|
||||
if ($_getvar('pharIsAvailable') !== true): ?>
|
||||
<div class="msg-option-unvailable">
|
||||
<?php printf(__('The \'%s\' extension is unavailable'), 'phar'); ?>
|
||||
<?php
|
||||
printf(__('The \'%s\' extension is unavailable'), 'phar'); ?>
|
||||
<i id="help-phar"
|
||||
class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
class="material-icons"><?php
|
||||
echo $icons->help()->getIcon(); ?></i>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-phar">
|
||||
<p>
|
||||
<?php echo __('This extension is needed to build the application\'s backup files'); ?>
|
||||
<?php
|
||||
echo __('This extension is needed to build the application\'s backup files'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">backup</i>
|
||||
<?php echo __('Backup'); ?>
|
||||
<?php
|
||||
echo __('Backup'); ?>
|
||||
</div>
|
||||
|
||||
<table class="data">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Result'); ?>
|
||||
<?php
|
||||
echo __('Result'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Result'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Result'); ?></div>
|
||||
|
||||
<?php echo $_getvar('lastBackupTime'); ?>
|
||||
<?php
|
||||
echo $_getvar('lastBackupTime'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($_getvar('ctx_userIsAdminApp')): ?>
|
||||
<?php
|
||||
if ($_getvar('ctx_userIsAdminApp')): ?>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Download Current'); ?>
|
||||
<?php
|
||||
echo __('Download Current'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Download Current'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Download Current'); ?></div>
|
||||
|
||||
<?php if ($_getvar('hasBackup')): ?>
|
||||
<a href="<?php echo $_getRoute('configBackup/downloadBackupDb'); ?>"
|
||||
<?php
|
||||
if ($_getvar('hasBackup')): ?>
|
||||
<a href="<?php
|
||||
echo $_getRoute('configBackup/downloadBackupDb'); ?>"
|
||||
class="download" target="_blank">
|
||||
|
||||
<button type="button" class="mdl-button mdl-js-button">
|
||||
<?php echo __('DB Backup'); ?>
|
||||
<?php
|
||||
echo __('DB Backup'); ?>
|
||||
</button>
|
||||
</a>
|
||||
|
||||
<a href="<?php echo $_getRoute('configBackup/downloadBackupApp'); ?>"
|
||||
<a href="<?php
|
||||
echo $_getRoute('configBackup/downloadBackupApp'); ?>"
|
||||
class="download" target="_blank">
|
||||
<button type="button" class="mdl-button mdl-js-button">
|
||||
<?php echo __('sysPass Backup'); ?>
|
||||
<?php
|
||||
echo __('sysPass Backup'); ?>
|
||||
</button>
|
||||
</a>
|
||||
<?php else: echo __('There aren\'t any backups available'); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
else: echo __('There aren\'t any backups available'); ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</table>
|
||||
|
||||
<div class="tab-actions">
|
||||
@@ -98,28 +120,40 @@ use SP\Core\UI\ThemeIcons;
|
||||
<li>
|
||||
<button id="help_backup_button" type="button"
|
||||
class="btn-help mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored"
|
||||
title="<?php echo $icons->getIconHelp()->getTitle(); ?>"
|
||||
title="<?php
|
||||
echo $icons->help()->getTitle(); ?>"
|
||||
data-help="help-backup">
|
||||
<i class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->help()->getIcon(); ?></i>
|
||||
</button>
|
||||
|
||||
<div for="help-backup" class="help-box"
|
||||
title="<?php echo __('Backup') ?>">
|
||||
title="<?php
|
||||
echo __('Backup') ?>">
|
||||
<div class="help-container">
|
||||
<p class="help-text"><?php echo __('The backup allows you to save and download sysPass database and application files including its configuration.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __(
|
||||
'The backup allows you to save and download sysPass database and application files including its configuration.'
|
||||
); ?></p>
|
||||
|
||||
<p class="help-text"><?php echo __('With this method it\'s possible to either save all sysPass data in another place or use it to make the application portable.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __(
|
||||
'With this method it\'s possible to either save all sysPass data in another place or use it to make the application portable.'
|
||||
); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconPlay()->getClassButton(); ?>"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->play()->getClassButton(); ?>"
|
||||
data-onclick="config/backup"
|
||||
data-action-route="configBackup/fileBackup"
|
||||
title="<?php echo $icons->getIconPlay()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconPlay()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->play()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->play()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -127,7 +161,8 @@ use SP\Core\UI\ThemeIcons;
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">import_export</i>
|
||||
<?php echo __('Export Accounts'); ?>
|
||||
<?php
|
||||
echo __('Export Accounts'); ?>
|
||||
</div>
|
||||
|
||||
<form method="post" name="frmExport" id="frmExport" class="form-action"
|
||||
@@ -136,38 +171,51 @@ use SP\Core\UI\ThemeIcons;
|
||||
<table class="data">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Result'); ?>
|
||||
<?php
|
||||
echo __('Result'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Result'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Result'); ?></div>
|
||||
|
||||
<?php echo $_getvar('lastExportTime'); ?>
|
||||
<?php
|
||||
echo $_getvar('lastExportTime'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($_getvar('ctx_userIsAdminApp') || $_getvar('isDemo')): ?>
|
||||
<?php
|
||||
if ($_getvar('ctx_userIsAdminApp') || $_getvar('isDemo')): ?>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Download Current'); ?>
|
||||
<?php
|
||||
echo __('Download Current'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Download Current'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Download Current'); ?></div>
|
||||
|
||||
<?php if ($_getvar('hasExport')): ?>
|
||||
<a href="<?php echo $_getRoute('configBackup/downloadExport'); ?>"
|
||||
<?php
|
||||
if ($_getvar('hasExport')): ?>
|
||||
<a href="<?php
|
||||
echo $_getRoute('configBackup/downloadExport'); ?>"
|
||||
class="download" target="_blank">
|
||||
<button type="button"
|
||||
class="mdl-button mdl-js-button">
|
||||
XML <?php echo $_getvar('siteName'); ?>
|
||||
XML <?php
|
||||
echo $_getvar('siteName'); ?>
|
||||
</button>
|
||||
</a>
|
||||
<?php else: echo __('No export file found'); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
else: echo __('No export file found'); ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Export Password'); ?>
|
||||
<?php
|
||||
echo __('Export Password'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -175,13 +223,15 @@ use SP\Core\UI\ThemeIcons;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__input"
|
||||
maxlength="255"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="exportPwd"><?php echo __('Export Password'); ?></label>
|
||||
for="exportPwd"><?php
|
||||
echo __('Export Password'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Export Password (repeat)'); ?>
|
||||
<?php
|
||||
echo __('Export Password (repeat)'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -190,7 +240,8 @@ use SP\Core\UI\ThemeIcons;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="exportPwdR"><?php echo __('Export Password (repeat)'); ?></label>
|
||||
for="exportPwdR"><?php
|
||||
echo __('Export Password (repeat)'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -201,37 +252,54 @@ use SP\Core\UI\ThemeIcons;
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="help_export_button" type="button"
|
||||
class="btn-help mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored"
|
||||
title="<?php echo $icons->getIconHelp()->getTitle(); ?>"
|
||||
title="<?php
|
||||
echo $icons->help()->getTitle(); ?>"
|
||||
data-help="help-export">
|
||||
<i class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->help()->getIcon(); ?></i>
|
||||
</button>
|
||||
|
||||
<div for="help-export" class="help-box"
|
||||
title="<?php echo __('Export Accounts'); ?>">
|
||||
title="<?php
|
||||
echo __('Export Accounts'); ?>">
|
||||
<div class="help-container">
|
||||
<p class="help-text"><?php echo __('The accounts export allows you to save the accounts and their data in XML format to be imported in another sysPass instance.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __(
|
||||
'The accounts export allows you to save the accounts and their data in XML format to be imported in another sysPass instance.'
|
||||
); ?></p>
|
||||
|
||||
<p class="help-text"><?php echo __('Exported items are accounts, clients, categories and tags.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __('Exported items are accounts, clients, categories and tags.'); ?></p>
|
||||
|
||||
<p class="help-text"><?php echo __('Accounts\' password are exported in an encrypted way for better security.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __('Accounts\' password are exported in an encrypted way for better security.'); ?></p>
|
||||
|
||||
<p class="help-text"><?php echo __('It\'s possible to set an export password to save all the encrypted data in the XML file.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __(
|
||||
'It\'s possible to set an export password to save all the encrypted data in the XML file.'
|
||||
); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<button form="frmExport"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconPlay()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconPlay()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconPlay()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->play()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->play()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->play()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,14 +23,16 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$disabled = $configData->isMaintenance() ? '' : 'disabled';
|
||||
?>
|
||||
@@ -42,91 +44,127 @@ $disabled = $configData->isMaintenance() ? '' : 'disabled';
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">enhanced_encryption</i>
|
||||
<?php echo __('Master Password'); ?>
|
||||
<?php
|
||||
echo __('Master Password'); ?>
|
||||
</div>
|
||||
|
||||
<table class="data tblConfig round">
|
||||
<?php if ($_getvar('lastUpdateMPass') > 0): ?>
|
||||
<?php
|
||||
if ($_getvar('lastUpdateMPass') > 0): ?>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Last change'); ?>
|
||||
<?php
|
||||
echo __('Last change'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Last change'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Last change'); ?></div>
|
||||
|
||||
<?php echo date('r', $_getvar('lastUpdateMPass')); ?>
|
||||
<?php
|
||||
echo date('r', $_getvar('lastUpdateMPass')); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Current Master Password'); ?>
|
||||
<?php
|
||||
echo __('Current Master Password'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="current_masterpass" name="current_masterpass"
|
||||
type="password"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__input-show"
|
||||
maxlength="255" required <?php echo $disabled; ?> />
|
||||
maxlength="255" required <?php
|
||||
echo $disabled; ?> />
|
||||
<label class="mdl-textfield__label"
|
||||
for="current_masterpass"><?php echo __('Current Master Password'); ?></label>
|
||||
for="current_masterpass"><?php
|
||||
echo __('Current Master Password'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('New Master Password'); ?>
|
||||
<?php
|
||||
echo __('New Master Password'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="new_masterpass" name="new_masterpass"
|
||||
type="password"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__input"
|
||||
maxlength="255" required <?php echo $disabled; ?> />
|
||||
maxlength="255" required <?php
|
||||
echo $disabled; ?> />
|
||||
<label class="mdl-textfield__label"
|
||||
for="new_masterpass"><?php echo __('New Master Password'); ?></label>
|
||||
for="new_masterpass"><?php
|
||||
echo __('New Master Password'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('New Master Password (repeat)'); ?>
|
||||
<?php
|
||||
echo __('New Master Password (repeat)'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="new_masterpass_repeat"
|
||||
name="new_masterpass_repeat" type="password"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255" required <?php echo $disabled; ?> />
|
||||
maxlength="255" required <?php
|
||||
echo $disabled; ?> />
|
||||
<label class="mdl-textfield__label"
|
||||
for="new_masterpass_repeat"><?php echo __('New Master Password (repeat)'); ?></label>
|
||||
for="new_masterpass_repeat"><?php
|
||||
echo __('New Master Password (repeat)'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"></td>
|
||||
<td class="valField">
|
||||
<?php if (!$configData->isMaintenance()): ?>
|
||||
<?php
|
||||
if (!$configData->isMaintenance()): ?>
|
||||
<div
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
<?php echo __('Maintenance mode not enabled'); ?>. <?php echo __('Please, enable it to avoid unwanted behavior from other sessions'); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->warning()->getClass(); ?>"><?php
|
||||
echo $icons->warning()->getIcon(); ?></div>
|
||||
<?php
|
||||
echo __('Maintenance mode not enabled'); ?>. <?php
|
||||
echo __('Please, enable it to avoid unwanted behavior from other sessions'); ?>
|
||||
<br>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<div
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
<?php echo __('You should save the new password on a secure place'); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->warning()->getClass(); ?>"><?php
|
||||
echo $icons->warning()->getIcon(); ?></div>
|
||||
<?php
|
||||
echo __('You should save the new password on a secure place'); ?>
|
||||
<br>
|
||||
<div
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
<?php echo __('All accounts passwords will be encrypted again.'); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->warning()->getClass(); ?>"><?php
|
||||
echo $icons->warning()->getIcon(); ?></div>
|
||||
<?php
|
||||
echo __('All accounts passwords will be encrypted again.'); ?>
|
||||
<br>
|
||||
<div
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
<?php echo __('Users will need to enter the new Master Password.'); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->warning()->getClass(); ?>"><?php
|
||||
echo $icons->warning()->getIcon(); ?></div>
|
||||
<?php
|
||||
echo __('Users will need to enter the new Master Password.'); ?>
|
||||
<br>
|
||||
<div
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></div>
|
||||
<strong><?php printf(__('It will be updated %s accounts. This process could take some time long.'), $_getvar('numAccounts')); ?></strong>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->warning()->getClass(); ?>"><?php
|
||||
echo $icons->warning()->getIcon(); ?></div>
|
||||
<strong><?php
|
||||
printf(
|
||||
__('It will be updated %s accounts. This process could take some time long.'),
|
||||
$_getvar('numAccounts')
|
||||
); ?></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -144,9 +182,11 @@ $disabled = $configData->isMaintenance() ? '' : 'disabled';
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Do not modify accounts'); ?></span>
|
||||
<span><?php
|
||||
echo __('Do not modify accounts'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Sets a new Master Password without re-encrypting the accounts.'); ?>
|
||||
<?php
|
||||
echo __('Sets a new Master Password without re-encrypting the accounts.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -163,9 +203,13 @@ $disabled = $configData->isMaintenance() ? '' : 'disabled';
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Confirm change'); ?></span>
|
||||
<span><?php
|
||||
echo __('Confirm change'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Confirm the master password change after you have been read all the above warnings.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'Confirm the master password change after you have been read all the above warnings.'
|
||||
); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -174,60 +218,87 @@ $disabled = $configData->isMaintenance() ? '' : 'disabled';
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php if ($_getvar('taskId')): ?>
|
||||
<?php
|
||||
if ($_getvar('taskId')): ?>
|
||||
<input type="hidden" name="taskId"
|
||||
value="<?php echo $_getvar('taskId'); ?>">
|
||||
value="<?php
|
||||
echo $_getvar('taskId'); ?>">
|
||||
<input type="hidden" name="lock" value="masterpass">
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</form>
|
||||
<div class="tab-actions">
|
||||
<ul>
|
||||
<li>
|
||||
<button id="help_mpass_button" type="button"
|
||||
class="btn-help mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored"
|
||||
title="<?php echo $icons->getIconHelp()->getTitle(); ?>"
|
||||
title="<?php
|
||||
echo $icons->help()->getTitle(); ?>"
|
||||
data-help="help-mpass">
|
||||
<i class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->help()->getIcon(); ?></i>
|
||||
</button>
|
||||
|
||||
<div for="help-mpass" class="help-box"
|
||||
title="<?php echo __('Master Password'); ?>">
|
||||
title="<?php
|
||||
echo __('Master Password'); ?>">
|
||||
<div class="help-container">
|
||||
<p class="help-text"><?php echo __('The Master Password is used to encrypt sysPass accounts passwords and keep them safe.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __(
|
||||
'The Master Password is used to encrypt sysPass accounts passwords and keep them safe.'
|
||||
); ?></p>
|
||||
|
||||
<p class="help-text"><?php echo __('It\'s advisable to change it from time to time and use a complex password that includes numbers, letters and symbols.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __(
|
||||
'It\'s advisable to change it from time to time and use a complex password that includes numbers, letters and symbols.'
|
||||
); ?></p>
|
||||
|
||||
<p class="help-text"><?php printf(__('You could get more info on: %s'), '<a target="_blank" href="https://doc.syspass.org">https://doc.syspass.org</a>'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
printf(
|
||||
__('You could get more info on: %s'),
|
||||
'<a target="_blank" href="https://doc.syspass.org">https://doc.syspass.org</a>'
|
||||
); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<?php if ($_getvar('ctx_userIsAdminApp')): ?>
|
||||
<?php
|
||||
if ($_getvar('ctx_userIsAdminApp')): ?>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconCheck()->getClassButton(); ?>"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->check()->getClassButton(); ?>"
|
||||
data-onclick="config/refreshMpass"
|
||||
data-action-route="configEncryption/refresh"
|
||||
title="<?php echo __('Update master password hash'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconRefresh()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Update master password hash'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->refresh()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($configData->isMaintenance() && $_getvar('numAccounts') > 0): ?>
|
||||
<?php
|
||||
if ($configData->isMaintenance() && $_getvar('numAccounts') > 0): ?>
|
||||
<li>
|
||||
<button form="frmCrypt"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconPlay()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconPlay()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconPlay()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->play()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->play()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->play()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">enhanced_encryption</i>
|
||||
<?php echo __('Temporary Password'); ?>
|
||||
<?php
|
||||
echo __('Temporary Password'); ?>
|
||||
</div>
|
||||
|
||||
<form method="post" name="frmTempMasterPass" id="frmTempMasterPass"
|
||||
@@ -237,43 +308,58 @@ $disabled = $configData->isMaintenance() ? '' : 'disabled';
|
||||
<table class="data tblConfig">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Last change'); ?>
|
||||
<?php
|
||||
echo __('Last change'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Last change'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Last change'); ?></div>
|
||||
|
||||
<?php echo ($_getvar('tempMasterPassTime') > 0) ? date('r', $_getvar('tempMasterPassTime')) : __('Not generated'); ?>
|
||||
<?php
|
||||
echo ($_getvar('tempMasterPassTime') > 0) ? date('r', $_getvar('tempMasterPassTime')) : __(
|
||||
'Not generated'
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Valid until'); ?>
|
||||
<?php
|
||||
echo __('Valid until'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Valid until'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Valid until'); ?></div>
|
||||
|
||||
<?php
|
||||
$tempMasterMaxTime = $_getvar('tempMasterMaxTime');
|
||||
if (time() > $tempMasterMaxTime): ?>
|
||||
<span style="color: red"><?php echo date('r', $tempMasterMaxTime); ?></span>
|
||||
<?php elseif ($tempMasterMaxTime > 0): echo date('r', $tempMasterMaxTime); ?>
|
||||
<?php else: echo __('Not generated'); ?>
|
||||
<?php endif; ?>
|
||||
<span style="color: red"><?php
|
||||
echo date('r', $tempMasterMaxTime); ?></span>
|
||||
<?php
|
||||
elseif ($tempMasterMaxTime > 0): echo date('r', $tempMasterMaxTime); ?>
|
||||
<?php
|
||||
else: echo __('Not generated'); ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Attempts'); ?>
|
||||
<?php
|
||||
echo __('Attempts'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Attempts'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Attempts'); ?></div>
|
||||
|
||||
<?php echo $_getvar('tempMasterAttempts'); ?>
|
||||
<?php
|
||||
echo $_getvar('tempMasterAttempts'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Life (s)'); ?>
|
||||
<?php
|
||||
echo __('Life (s)'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -285,7 +371,8 @@ $disabled = $configData->isMaintenance() ? '' : 'disabled';
|
||||
value="3600"
|
||||
required/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="temporary_masterpass_maxtime"><?php echo __('Life (s)'); ?></label>
|
||||
for="temporary_masterpass_maxtime"><?php
|
||||
echo __('Life (s)'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -300,14 +387,17 @@ $disabled = $configData->isMaintenance() ? '' : 'disabled';
|
||||
<input type="checkbox"
|
||||
id="temporary_masterpass_email"
|
||||
class="mdl-switch__input"
|
||||
name="temporary_masterpass_email" <?php echo !$configData->isMailEnabled() ? 'disabled' : ''; ?>/>
|
||||
name="temporary_masterpass_email" <?php
|
||||
echo !$configData->isMailEnabled() ? 'disabled' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Send email'); ?></span>
|
||||
<span><?php
|
||||
echo __('Send email'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Sends an email to all users or only to those whose group is selected.'); ?>
|
||||
<?php
|
||||
echo __('Sends an email to all users or only to those whose group is selected.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -316,35 +406,48 @@ $disabled = $configData->isMaintenance() ? '' : 'disabled';
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Group'); ?>
|
||||
<?php
|
||||
echo __('Group'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Group'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Group'); ?></div>
|
||||
|
||||
<select id="temporary_masterpass_group"
|
||||
name="temporary_masterpass_group"
|
||||
class="select-box select-box-deselect" <?php echo !$configData->isMailEnabled() ? 'disabled' : ''; ?>>
|
||||
<option value=""><?php echo __('Select Group'); ?></option>
|
||||
<?php /** @var SelectItem $userGroup */
|
||||
class="select-box select-box-deselect" <?php
|
||||
echo !$configData->isMailEnabled() ? 'disabled' : ''; ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Group'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $userGroup */
|
||||
foreach ($_getvar('userGroups') as $userGroup): ?>
|
||||
<option
|
||||
value="<?php echo $userGroup->getId(); ?>"><?php echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $userGroup->getId(); ?>"><?php
|
||||
echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if (!empty($_getvar('tempMasterPass'))): ?>
|
||||
<?php
|
||||
if (!empty($_getvar('tempMasterPass'))): ?>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Password'); ?>
|
||||
<?php
|
||||
echo __('Password'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Password'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Password'); ?></div>
|
||||
|
||||
<?php echo $_getvar('tempMasterPass'); ?>
|
||||
<?php
|
||||
echo $_getvar('tempMasterPass'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
@@ -352,32 +455,44 @@ $disabled = $configData->isMaintenance() ? '' : 'disabled';
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="help_tmpass_button"
|
||||
class="btn-help mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored"
|
||||
title="<?php echo $icons->getIconHelp()->getTitle(); ?>"
|
||||
title="<?php
|
||||
echo $icons->help()->getTitle(); ?>"
|
||||
data-help="help-tmpass">
|
||||
<i class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->help()->getIcon(); ?></i>
|
||||
</button>
|
||||
|
||||
|
||||
<div for="help-tmpass" class="help-box"
|
||||
title="<?php echo __('Temporary Password'); ?>">
|
||||
title="<?php
|
||||
echo __('Temporary Password'); ?>">
|
||||
<div class="help-container">
|
||||
<p class="help-text"><?php echo __('The temporary password is used as a Master Password for the users that need to enter it during login. By this way there is no need to tell them the real Master Password.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __(
|
||||
'The temporary password is used as a Master Password for the users that need to enter it during login. By this way there is no need to tell them the real Master Password.'
|
||||
); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<button form="frmTempMasterPass"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconPlay()->getClassButton(); ?>"
|
||||
title="<?php echo __('Generate'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconPlay()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->play()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Generate'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->play()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,20 +23,23 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">verified_user</i>
|
||||
<?php echo __('Authentication'); ?>
|
||||
<?php
|
||||
echo __('Authentication'); ?>
|
||||
</div>
|
||||
|
||||
<table id="tblAuth" class="data tblConfig">
|
||||
@@ -50,13 +53,16 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="authbasic_enabled">
|
||||
<input type="checkbox" id="authbasic_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="authbasic_enabled" <?php echo $configData->isAuthBasicEnabled() ? 'checked' : ''; ?>/>
|
||||
name="authbasic_enabled" <?php
|
||||
echo $configData->isAuthBasicEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Use Auth Basic'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Use Auth Basic for authorizing accesses to the application'); ?></span>
|
||||
<span><?php
|
||||
echo __('Use Auth Basic'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Use Auth Basic for authorizing accesses to the application'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -67,13 +73,16 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input type="checkbox"
|
||||
id="authbasicautologin_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="authbasicautologin_enabled" <?php echo $configData->isAuthBasicAutoLoginEnabled() ? 'checked' : ''; ?>/>
|
||||
name="authbasicautologin_enabled" <?php
|
||||
echo $configData->isAuthBasicAutoLoginEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Use Auth Basic SSO'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Use auto-login through Auth Basic'); ?></span>
|
||||
<span><?php
|
||||
echo __('Use Auth Basic SSO'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Use auto-login through Auth Basic'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -81,12 +90,18 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Domain'); ?>
|
||||
<?php
|
||||
echo __('Domain'); ?>
|
||||
<div id="help-domain"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-domain">
|
||||
<p>
|
||||
<?php echo __('The domain will be added to sysPass user name for checking against the Auth Basic one.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'The domain will be added to sysPass user name for checking against the Auth Basic one.'
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -95,61 +110,85 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input id="authbasic_domain" name="authbasic_domain" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo htmlspecialchars($configData->getAuthBasicDomain(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getAuthBasicDomain(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="authbasic_domain"><?php echo __('Domain name'); ?></label>
|
||||
for="authbasic_domain"><?php
|
||||
echo __('Domain name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Default Group'); ?>
|
||||
<?php
|
||||
echo __('Default Group'); ?>
|
||||
<div id="help-sso_defaultgroup"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-sso_defaultgroup">
|
||||
<p>
|
||||
<?php echo __('Sets the default users group for newly created SSO users'); ?>
|
||||
<?php
|
||||
echo __('Sets the default users group for newly created SSO users'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Default Group'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Default Group'); ?></div>
|
||||
|
||||
<select id="sso_defaultgroup" name="sso_defaultgroup"
|
||||
class="select-box sel-chosen-usergroup">
|
||||
<option value=""><?php echo __('Select Group'); ?></option>
|
||||
<?php /** @var SelectItem $userGroup */
|
||||
<option value=""><?php
|
||||
echo __('Select Group'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $userGroup */
|
||||
foreach ($_getvar('userGroups') as $userGroup): ?>
|
||||
<option
|
||||
value="<?php echo $userGroup->getId(); ?>" <?php echo $userGroup->getId() === $configData->getSsoDefaultGroup() ? 'selected' : ''; ?>><?php echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $userGroup->getId(); ?>" <?php
|
||||
echo $userGroup->getId() === $configData->getSsoDefaultGroup() ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Default Profile'); ?>
|
||||
<?php
|
||||
echo __('Default Profile'); ?>
|
||||
<div id="help-sso_defaultprofile"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-sso_defaultprofile">
|
||||
<p>
|
||||
<?php echo __('Sets the default profile for the newly created SSO users.'); ?>
|
||||
<?php
|
||||
echo __('Sets the default profile for the newly created SSO users.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Default Profile'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Default Profile'); ?></div>
|
||||
|
||||
<select id="sso_defaultprofile" name="sso_defaultprofile"
|
||||
class="select-box sel-chosen-profile">
|
||||
<option value=""><?php echo __('Select User'); ?></option>
|
||||
<?php /** @var SelectItem $userProfile */
|
||||
<option value=""><?php
|
||||
echo __('Select User'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $userProfile */
|
||||
foreach ($_getvar('userProfiles') as $userProfile): ?>
|
||||
<option
|
||||
value="<?php echo $userProfile->getId(); ?>" <?php echo ($userProfile->getId() === $configData->getSsoDefaultProfile()) ? 'selected' : ''; ?>><?php echo htmlspecialchars($userProfile->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $userProfile->getId(); ?>" <?php
|
||||
echo ($userProfile->getId() === $configData->getSsoDefaultProfile()) ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($userProfile->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,20 +23,23 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">view_headline</i>
|
||||
<?php echo __('Events'); ?>
|
||||
<?php
|
||||
echo __('Events'); ?>
|
||||
</div>
|
||||
|
||||
<table id="tblEvents" class="data tblConfig">
|
||||
@@ -50,13 +53,16 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="log_enabled">
|
||||
<input type="checkbox" id="log_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="log_enabled" <?php echo $configData->isLogEnabled() ? 'checked' : ''; ?>/>
|
||||
name="log_enabled" <?php
|
||||
echo $configData->isLogEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Enable event log'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Saves the actions done by the application.'); ?></span>
|
||||
<span><?php
|
||||
echo __('Enable event log'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Saves the actions done by the application.'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -66,12 +72,14 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="syslog_enabled">
|
||||
<input type="checkbox" id="syslog_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="syslog_enabled" <?php echo $configData->isSyslogEnabled() ? 'checked' : ''; ?>/>
|
||||
name="syslog_enabled" <?php
|
||||
echo $configData->isSyslogEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Enable Syslog'); ?></span>
|
||||
<span><?php
|
||||
echo __('Enable Syslog'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"></span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -82,12 +90,14 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="remotesyslog_enabled">
|
||||
<input type="checkbox" id="remotesyslog_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="remotesyslog_enabled" <?php echo $configData->isSyslogRemoteEnabled() ? 'checked' : ''; ?>/>
|
||||
name="remotesyslog_enabled" <?php
|
||||
echo $configData->isSyslogRemoteEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Enable Remote Syslog'); ?></span>
|
||||
<span><?php
|
||||
echo __('Enable Remote Syslog'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"></span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -97,22 +107,26 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Server'); ?>
|
||||
<?php
|
||||
echo __('Server'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="remotesyslog_server" name="remotesyslog_server"
|
||||
type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($configData->getSyslogServer(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getSyslogServer(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="remotesyslog_server"><?php echo __('Hostname or IP address'); ?></label>
|
||||
for="remotesyslog_server"><?php
|
||||
echo __('Hostname or IP address'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Port'); ?>
|
||||
<?php
|
||||
echo __('Port'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -120,27 +134,36 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
type="number"
|
||||
pattern="[0-9]{1-5}" step="1" max="65535"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo $configData->getSyslogPort(); ?>"/>
|
||||
value="<?php
|
||||
echo $configData->getSyslogPort(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="remotesyslog_port"><?php echo __('Port'); ?></label>
|
||||
for="remotesyslog_port"><?php
|
||||
echo __('Port'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Events'); ?>
|
||||
<?php
|
||||
echo __('Events'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Events'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Events'); ?></div>
|
||||
|
||||
<select id="log_events" name="log_events[]" multiple="multiple"
|
||||
class="select-box" data-create="true">
|
||||
<?php /** @var SelectItem $logEvent */
|
||||
<?php
|
||||
/** @var SelectItem $logEvent */
|
||||
foreach ($_getvar('logEvents') as $logEvent): ?>
|
||||
<option
|
||||
value="<?php echo $logEvent->getName(); ?>"
|
||||
<?php echo $logEvent->isSelected() ? 'selected' : '' ?>><?php echo $logEvent->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $logEvent->getName(); ?>"
|
||||
<?php
|
||||
echo $logEvent->isSelected() ? 'selected' : '' ?>><?php
|
||||
echo $logEvent->getName(); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,19 +23,22 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">device_hub</i>
|
||||
<?php echo __('Proxy'); ?>
|
||||
<?php
|
||||
echo __('Proxy'); ?>
|
||||
</div>
|
||||
|
||||
<table id="tblProxy" class="data tblConfig">
|
||||
@@ -49,13 +52,16 @@ use SP\Core\UI\ThemeIcons;
|
||||
for="proxy_enabled">
|
||||
<input type="checkbox" id="proxy_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="proxy_enabled" <?php echo $configData->isProxyEnabled() ? 'checked' : ''; ?>/>
|
||||
name="proxy_enabled" <?php
|
||||
echo $configData->isProxyEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Use Proxy'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Use a proxy server for checking out for updates and notifications.'); ?></span>
|
||||
<span><?php
|
||||
echo __('Use Proxy'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Use a proxy server for checking out for updates and notifications.'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -63,22 +69,26 @@ use SP\Core\UI\ThemeIcons;
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Server'); ?>
|
||||
<?php
|
||||
echo __('Server'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="proxy_server" name="proxy_server" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo htmlspecialchars($configData->getProxyServer(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getProxyServer(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="proxy_server"><?php echo __('Proxy server'); ?></label>
|
||||
for="proxy_server"><?php
|
||||
echo __('Proxy server'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Port'); ?>
|
||||
<?php
|
||||
echo __('Port'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -86,39 +96,47 @@ use SP\Core\UI\ThemeIcons;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
pattern="[0-9]{1,5}"
|
||||
maxlength="128"
|
||||
value="<?php echo $configData->getProxyPort(); ?>">
|
||||
value="<?php
|
||||
echo $configData->getProxyPort(); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="proxy_port"><?php echo __('Proxy server port'); ?></label>
|
||||
for="proxy_port"><?php
|
||||
echo __('Proxy server port'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('User'); ?>
|
||||
<?php
|
||||
echo __('User'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="proxy_user" name="proxy_user" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo htmlspecialchars($configData->getProxyUser(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getProxyUser(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="proxy_user"><?php echo __('Proxy server user'); ?></label>
|
||||
for="proxy_user"><?php
|
||||
echo __('Proxy server user'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Password'); ?>
|
||||
<?php
|
||||
echo __('Password'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="proxy_pass" name="proxy_pass" type="password"
|
||||
class="mdl-textfield__input passwordfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo $configData->getProxyPass() ? '***' : ''; ?>">
|
||||
value="<?php
|
||||
echo $configData->getProxyPass() ? '***' : ''; ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="proxy_pass"><?php echo __('Proxy server password'); ?></label>
|
||||
for="proxy_pass"><?php
|
||||
echo __('Proxy server password'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,91 +23,125 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<?php if (!$_getvar('curlIsAvailable')): ?>
|
||||
<?php
|
||||
if (!$_getvar('curlIsAvailable')): ?>
|
||||
<div class="msg-option-unvailable">
|
||||
<?php printf(__('The \'%s\' extension is unavailable'), 'curl'); ?>
|
||||
<?php
|
||||
printf(__('The \'%s\' extension is unavailable'), 'curl'); ?>
|
||||
<i id="help-curl"
|
||||
class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
class="material-icons"><?php
|
||||
echo $icons->help()->getIcon(); ?></i>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-curl">
|
||||
<p>
|
||||
<?php echo __('This extension is needed to check for sysPass updates and notices'); ?>
|
||||
<?php
|
||||
echo __('This extension is needed to check for sysPass updates and notices'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">home</i>
|
||||
<?php echo __('Site'); ?>
|
||||
<?php
|
||||
echo __('Site'); ?>
|
||||
</div>
|
||||
|
||||
<table id="tblSite" class="data tblConfig">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Language'); ?>
|
||||
<?php
|
||||
echo __('Language'); ?>
|
||||
<div id="help-sitelang"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-sitelang">
|
||||
<p>
|
||||
<?php echo __('Sets the global app language. You can set a per user language on preferences.'); ?>
|
||||
<?php
|
||||
echo __('Sets the global app language. You can set a per user language on preferences.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('To improve/add translations, you can get involved at https://poeditor.com/join/project/fmlsBuugyv'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'To improve/add translations, you can get involved at https://poeditor.com/join/project/fmlsBuugyv'
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Language'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Language'); ?></div>
|
||||
|
||||
<select name="sitelang" id="sel-sitelang" size="1"
|
||||
class="select-box sel-chosen-ns">
|
||||
<?php /** @var SelectItem $lang */
|
||||
<?php
|
||||
/** @var SelectItem $lang */
|
||||
foreach ($_getvar('langs') as $lang): ?>
|
||||
<option
|
||||
value='<?php echo $lang->getId(); ?>' <?php echo $lang->isSelected() ? 'selected' : ''; ?>><?php echo $lang->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value='<?php
|
||||
echo $lang->getId(); ?>' <?php
|
||||
echo $lang->isSelected() ? 'selected' : ''; ?>><?php
|
||||
echo $lang->getName(); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Visual Theme'); ?>
|
||||
<?php
|
||||
echo __('Visual Theme'); ?>
|
||||
<div id="help-sitetheme"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-sitetheme">
|
||||
<p>
|
||||
<?php echo __('Sets the global application visual theme. You can set a per user visual theme on preferences.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'Sets the global application visual theme. You can set a per user visual theme on preferences.'
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Visual Theme'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Visual Theme'); ?></div>
|
||||
|
||||
<select name="sitetheme" id="sel-sitetheme" size="1"
|
||||
class="select-box sel-chosen-ns">
|
||||
<?php /** @var SelectItem $theme */
|
||||
<?php
|
||||
/** @var SelectItem $theme */
|
||||
foreach ($_getvar('themes') as $theme): ?>
|
||||
<option
|
||||
value='<?php echo $theme->getId(); ?>' <?php echo $theme->isSelected() ? 'selected' : ""; ?>><?php echo $theme->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value='<?php
|
||||
echo $theme->getId(); ?>' <?php
|
||||
echo $theme->isSelected() ? 'selected' : ""; ?>><?php
|
||||
echo $theme->getName(); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Session timeout (s)'); ?>
|
||||
<?php
|
||||
echo __('Session timeout (s)'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -116,21 +150,27 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
pattern="[0-9]{2,4}"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="5"
|
||||
value="<?php echo $configData->getSessionTimeout(); ?>"
|
||||
value="<?php
|
||||
echo $configData->getSessionTimeout(); ?>"
|
||||
required/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="session_timeout"><?php echo __('Session timeout (s)'); ?></label>
|
||||
for="session_timeout"><?php
|
||||
echo __('Session timeout (s)'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Application URL'); ?>
|
||||
<?php
|
||||
echo __('Application URL'); ?>
|
||||
<div id="help-app_url"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-app_url">
|
||||
<p>
|
||||
<?php echo __(
|
||||
<?php
|
||||
echo __(
|
||||
'Sets the application URL when accessing through a reverse proxy or load balancer.'
|
||||
); ?>
|
||||
</p>
|
||||
@@ -141,9 +181,11 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input id="app_url" name="app_url" type="url"
|
||||
pattern="^https?://.*"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($configData->getApplicationUrl(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getApplicationUrl(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="app_url"><?php echo __('Application URL'); ?></label>
|
||||
for="app_url"><?php
|
||||
echo __('Application URL'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -157,13 +199,16 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="https_enabled">
|
||||
<input type="checkbox" id="https_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="https_enabled" <?php echo $configData->isHttpsEnabled() ? 'checked' : ''; ?>/>
|
||||
name="https_enabled" <?php
|
||||
echo $configData->isHttpsEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Force HTTPS'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('It forces the use of HTTPS on all the connections'); ?></span>
|
||||
<span><?php
|
||||
echo __('Force HTTPS'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('It forces the use of HTTPS on all the connections'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -173,13 +218,18 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="debug_enabled">
|
||||
<input type="checkbox" id="debug_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="debug_enabled" <?php echo $configData->isDebug() ? 'checked' : ''; ?>/>
|
||||
name="debug_enabled" <?php
|
||||
echo $configData->isDebug() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Enable debug'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Displays some information about application configuration and performance.'); ?></span>
|
||||
<span><?php
|
||||
echo __('Enable debug'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __(
|
||||
'Displays some information about application configuration and performance.'
|
||||
); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -189,13 +239,18 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="maintenance_enabled">
|
||||
<input type="checkbox" id="maintenance_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="maintenance_enabled" <?php echo $configData->isMaintenance() ? 'checked' : ''; ?>/>
|
||||
name="maintenance_enabled" <?php
|
||||
echo $configData->isMaintenance() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Maintenance mode'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('In this mode nobody can log into the application. To disable it, you need to either modify the configuration file or unset on the site tab.'); ?></span>
|
||||
<span><?php
|
||||
echo __('Maintenance mode'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __(
|
||||
'In this mode nobody can log into the application. To disable it, you need to either modify the configuration file or unset on the site tab.'
|
||||
); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -205,13 +260,16 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="check_updates_enabled">
|
||||
<input type="checkbox" id="check_updates_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="check_updates_enabled" <?php echo $configData->isCheckUpdates() ? 'checked' : ''; ?>/>
|
||||
name="check_updates_enabled" <?php
|
||||
echo $configData->isCheckUpdates() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Check for updates'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Check for application updates (only for administrators).'); ?></span>
|
||||
<span><?php
|
||||
echo __('Check for updates'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Check for application updates (only for administrators).'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -221,13 +279,18 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="check_notices_enabled">
|
||||
<input type="checkbox" id="check_notices_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="check_notices_enabled" <?php echo $configData->isCheckNotices() ? 'checked' : ''; ?>/>
|
||||
name="check_notices_enabled" <?php
|
||||
echo $configData->isCheckNotices() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Check for notifications'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Check if there are either sysPass security or warning notices (only for administrators).'); ?></span>
|
||||
<span><?php
|
||||
echo __('Check for notifications'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __(
|
||||
'Check if there are either sysPass security or warning notices (only for administrators).'
|
||||
); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -237,15 +300,21 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="encrypt_session_enabled">
|
||||
<input type="checkbox" id="encrypt_session_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="encrypt_session_enabled" <?php echo $configData->isEncryptSession() ? 'checked' : ''; ?>/>
|
||||
name="encrypt_session_enabled" <?php
|
||||
echo $configData->isEncryptSession() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Encrypt Session'); ?></span>
|
||||
<span><?php
|
||||
echo __('Encrypt Session'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Encrypt PHP session data'); ?>
|
||||
<?php echo __('This feature increases the PHP sessions security, because the stored data won\'t be readable.'); ?>
|
||||
<?php
|
||||
echo __('Encrypt PHP session data'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'This feature increases the PHP sessions security, because the stored data won\'t be readable.'
|
||||
); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,13 +23,15 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
<form method="post" name="frmConfig" id="frmConfig" class="form-action"
|
||||
@@ -37,26 +39,36 @@ use SP\Core\UI\ThemeIcons;
|
||||
data-action-route="configGeneral/save"
|
||||
data-hash="">
|
||||
|
||||
<?php include $this->includeTemplate('general-site'); ?>
|
||||
<?php include $this->includeTemplate('general-events'); ?>
|
||||
<?php include $this->includeTemplate('general-proxy'); ?>
|
||||
<?php include $this->includeTemplate('general-auth'); ?>
|
||||
<?php
|
||||
include $this->includeTemplate('general-site'); ?>
|
||||
<?php
|
||||
include $this->includeTemplate('general-events'); ?>
|
||||
<?php
|
||||
include $this->includeTemplate('general-proxy'); ?>
|
||||
<?php
|
||||
include $this->includeTemplate('general-auth'); ?>
|
||||
</form>
|
||||
|
||||
<div class="tab-actions">
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button form="frmConfig"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,85 +23,112 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">import_export</i>
|
||||
<?php echo __('CSV/XML Import'); ?>
|
||||
<?php
|
||||
echo __('CSV/XML Import'); ?>
|
||||
</div>
|
||||
|
||||
<table class="data tblConfig">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Default User'); ?>
|
||||
<?php
|
||||
echo __('Default User'); ?>
|
||||
<div id="help-import_defaultuser"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-import_defaultuser">
|
||||
<p>
|
||||
<?php echo __('Sets the default user for the accounts imported.'); ?>
|
||||
<?php
|
||||
echo __('Sets the default user for the accounts imported.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Default User'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Default User'); ?></div>
|
||||
|
||||
<select id="import_defaultuser" name="import_defaultuser"
|
||||
class="select-box sel-chosen-user" required>
|
||||
<option value=""><?php echo __('Select User'); ?></option>
|
||||
<?php /** @var SelectItem $user */
|
||||
<option value=""><?php
|
||||
echo __('Select User'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $user */
|
||||
foreach ($_getvar('users') as $user): ?>
|
||||
<option
|
||||
value="<?php echo $user->getId(); ?>" <?php echo $user->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?>
|
||||
value="<?php
|
||||
echo $user->getId(); ?>" <?php
|
||||
echo $user->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Default Group'); ?>
|
||||
<?php
|
||||
echo __('Default Group'); ?>
|
||||
<div id="help-import_defaultgroup"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-import_defaultgroup">
|
||||
<p>
|
||||
<?php echo __('Sets the default group for the accounts imported.'); ?>
|
||||
<?php
|
||||
echo __('Sets the default group for the accounts imported.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Default Group'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Default Group'); ?></div>
|
||||
|
||||
<select id="import_defaultgroup" name="import_defaultgroup"
|
||||
class="select-box sel-chosen-usergroup" required>
|
||||
<option value=""><?php echo __('Select Group'); ?></option>
|
||||
<?php /** @var SelectItem $userGroup */
|
||||
<option value=""><?php
|
||||
echo __('Select Group'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $userGroup */
|
||||
foreach ($_getvar('userGroups') as $userGroup): ?>
|
||||
<option
|
||||
value="<?php echo $userGroup->getId(); ?>" <?php echo $userGroup->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?>
|
||||
value="<?php
|
||||
echo $userGroup->getId(); ?>" <?php
|
||||
echo $userGroup->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="valField" colspan="2">
|
||||
<div class="lowres-title"><?php echo __('File'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('File'); ?></div>
|
||||
|
||||
<div id="drop-import-files" class="round active-tooltip dropzone"
|
||||
title="<?php echo __('Drop files here or click to select'); ?>"
|
||||
title="<?php
|
||||
echo __('Drop files here or click to select'); ?>"
|
||||
data-action-route="configImport/import">
|
||||
<i class="material-icons md-60 mdl-color-text--teal-500">cloud_upload</i>
|
||||
</div>
|
||||
@@ -117,35 +144,52 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="help_import_button"
|
||||
class="btn-help mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored"
|
||||
title="<?php echo $icons->getIconHelp()->getTitle(); ?>"
|
||||
title="<?php
|
||||
echo $icons->help()->getTitle(); ?>"
|
||||
data-help="help-import">
|
||||
<i class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->help()->getIcon(); ?></i>
|
||||
</button>
|
||||
|
||||
<div for="help-import" class="help-box"
|
||||
title="<?php echo __('CSV/XML Import'); ?>">
|
||||
title="<?php
|
||||
echo __('CSV/XML Import'); ?>">
|
||||
<div class="help-container">
|
||||
<p class="help-text"><?php echo __('Allows to import Accounts, Categories and Clients from XML or CSV files.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __('Allows to import Accounts, Categories and Clients from XML or CSV files.'); ?></p>
|
||||
|
||||
<p class="help-text"><?php echo __('Supported XML file formats are: sysPass, KeePass and KeePassX'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __('Supported XML file formats are: sysPass, KeePass and KeePassX'); ?></p>
|
||||
|
||||
<p class="help-text"><?php echo __('Drag & Drop the file into the import zone or click over the arrow.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __('Drag & Drop the file into the import zone or click over the arrow.'); ?></p>
|
||||
|
||||
<p class="help-text"><?php echo __('For KeePass or KeePassX files, client name will be KeePass or KeePassX and category name like groups name.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __(
|
||||
'For KeePass or KeePassX files, client name will be KeePass or KeePassX and category name like groups name.'
|
||||
); ?></p>
|
||||
|
||||
<p class="help-text"><?php echo __('The CSV import file requires the following format:'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __('The CSV import file requires the following format:'); ?></p>
|
||||
|
||||
<p class="help-text"><?php echo __('"account_name";"client";"category";"url";"user";"password";"notes"'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __('"account_name";"client";"category";"url";"user";"password";"notes"'); ?></p>
|
||||
|
||||
<p class="help-text"><?php echo __('In all cases, if the client or category do not exist they will be created automatically.'); ?></p>
|
||||
<p class="help-text"><?php
|
||||
echo __(
|
||||
'In all cases, if the client or category do not exist they will be created automatically.'
|
||||
); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -153,18 +197,23 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</div>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<?php echo __('XML'); ?>
|
||||
<?php
|
||||
echo __('XML'); ?>
|
||||
</div>
|
||||
|
||||
<table class="data tblConfig">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Import Password'); ?>
|
||||
<?php
|
||||
echo __('Import Password'); ?>
|
||||
<div id="help-import_pwd"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-import_pwd">
|
||||
<p>
|
||||
<?php echo __('It\'s only needed for sysPass XML files that have been encrypted.'); ?>
|
||||
<?php
|
||||
echo __('It\'s only needed for sysPass XML files that have been encrypted.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -174,19 +223,26 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__input-show"
|
||||
maxlength="255"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="importPwd"><?php echo __('Import Password'); ?></label>
|
||||
for="importPwd"><?php
|
||||
echo __('Import Password'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Master Password'); ?>
|
||||
<?php
|
||||
echo __('Master Password'); ?>
|
||||
<div id="help-import_masterpwd"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-import_masterpwd">
|
||||
<p>
|
||||
<?php echo __('It\'s only needed for sysPass XML files that have been encrypted with a different master password from the current one.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'It\'s only needed for sysPass XML files that have been encrypted with a different master password from the current one.'
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -197,26 +253,32 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__input-show"
|
||||
maxlength="255"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="importMasterPwd"><?php echo __('Master Password'); ?></label>
|
||||
for="importMasterPwd"><?php
|
||||
echo __('Master Password'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<?php echo __('CSV'); ?>
|
||||
<?php
|
||||
echo __('CSV'); ?>
|
||||
</div>
|
||||
|
||||
<table class="data tblConfig">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('CSV delimiter'); ?>
|
||||
<?php
|
||||
echo __('CSV delimiter'); ?>
|
||||
<div id="help-import_csvdelimiter"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-import_csvdelimiter">
|
||||
<p>
|
||||
<?php echo __('It\'s only needed for CSV files.'); ?>
|
||||
<?php
|
||||
echo __('It\'s only needed for CSV files.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -226,7 +288,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="1" value=";"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="csvDelimiter"><?php echo __('CSV delimiter'); ?></label>
|
||||
for="csvDelimiter"><?php
|
||||
echo __('CSV delimiter'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,18 +23,22 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
?>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">info</i>
|
||||
<?php use SP\Core\UI\ThemeIcons;
|
||||
<?php
|
||||
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Domain\Install\Services\InstallerService;
|
||||
use SP\Html\Html;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
use SP\Plugin\PluginInterface;
|
||||
use SP\Util\VersionUtil;
|
||||
|
||||
@@ -44,187 +48,261 @@
|
||||
<table class="data">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('sysPass version'); ?>
|
||||
<?php
|
||||
echo __('sysPass version'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('sysPass version'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('sysPass version'); ?></div>
|
||||
|
||||
<?php printf('%s (%s)', InstallerService::VERSION_TEXT, Html::strongText(VersionUtil::getVersionStringNormalized())); ?>
|
||||
<?php
|
||||
printf(
|
||||
'%s (%s)',
|
||||
InstallerService::VERSION_TEXT,
|
||||
Html::strongText(VersionUtil::getVersionStringNormalized())
|
||||
); ?>
|
||||
<br>
|
||||
<?php printf('Config: %s', $configData->getConfigVersion()); ?>
|
||||
<?php
|
||||
printf('Config: %s', $configData->getConfigVersion()); ?>
|
||||
<br>
|
||||
<?php printf('App: %s', $configData->getAppVersion()); ?>
|
||||
<?php
|
||||
printf('App: %s', $configData->getAppVersion()); ?>
|
||||
<br>
|
||||
<?php printf('DB: %s', $configData->getDatabaseVersion()); ?>
|
||||
<?php
|
||||
printf('DB: %s', $configData->getDatabaseVersion()); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Database'); ?>
|
||||
<?php
|
||||
echo __('Database'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Database'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Database'); ?></div>
|
||||
|
||||
<?php foreach ($_getvar('dbInfo') as $infoattr => $infoval): ?>
|
||||
<?php printf('%s : %s', Html::strongText($infoattr), $infoval); ?>
|
||||
<?php
|
||||
foreach ($_getvar('dbInfo') as $infoattr => $infoval): ?>
|
||||
<?php
|
||||
printf('%s : %s', Html::strongText($infoattr), $infoval); ?>
|
||||
<br>
|
||||
<?php endforeach; ?>
|
||||
<?php printf('%s: %s', Html::strongText(__('Name')), (!$_getvar('isDemo')) ? $_getvar('dbName') : '***'); ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
<?php
|
||||
printf('%s: %s', Html::strongText(__('Name')), (!$_getvar('isDemo')) ? $_getvar('dbName') : '***'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('PHP'); ?>
|
||||
<?php
|
||||
echo __('PHP'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('PHP'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('PHP'); ?></div>
|
||||
|
||||
<?php printf('%s: %s', Html::strongText(__('Version')), PHP_VERSION); ?>
|
||||
<?php
|
||||
printf('%s: %s', Html::strongText(__('Version')), PHP_VERSION); ?>
|
||||
<br>
|
||||
<?php printf('%s: %s', Html::strongText(__('Extensions')), implode(', ', get_loaded_extensions())); ?>
|
||||
<?php
|
||||
printf('%s: %s', Html::strongText(__('Extensions')), implode(', ', get_loaded_extensions())); ?>
|
||||
<br>
|
||||
<?php
|
||||
if (!empty($_getvar('missingExtensions'))) {
|
||||
printf('%s: %s', Html::strongText(__('Unavailable extensions')), implode(', ', $_getvar('missingExtensions')));
|
||||
printf(
|
||||
'%s: %s',
|
||||
Html::strongText(__('Unavailable extensions')),
|
||||
implode(', ', $_getvar('missingExtensions'))
|
||||
);
|
||||
echo '<br>';
|
||||
}
|
||||
?>
|
||||
<?php printf('%s: %d KB', Html::strongText(__('Used Memory')), (memory_get_usage(true) / 1024)); ?>
|
||||
<?php
|
||||
printf('%s: %d KB', Html::strongText(__('Used Memory')), (memory_get_usage(true) / 1024)); ?>
|
||||
<br>
|
||||
<?php printf('%s: %s', Html::strongText(__('User')), (!$_getvar('isDemo')) ? get_current_user() : '***'); ?>
|
||||
<?php
|
||||
printf('%s: %s', Html::strongText(__('User')), (!$_getvar('isDemo')) ? get_current_user() : '***'); ?>
|
||||
<br>
|
||||
<?php printf('%s: %d MB/s', Html::strongText(__('Download rate')), $_getvar('downloadRate')); ?>
|
||||
<?php if (function_exists('opcache_get_status') && PHP_VERSION_ID >= 50600): ?>
|
||||
<?php
|
||||
printf('%s: %d MB/s', Html::strongText(__('Download rate')), $_getvar('downloadRate')); ?>
|
||||
<?php
|
||||
if (function_exists('opcache_get_status') && PHP_VERSION_ID >= 50600): ?>
|
||||
<br>
|
||||
<?php echo Html::strongText(__('OP Cache')); ?>
|
||||
<?php foreach (opcache_get_status(false)['opcache_statistics'] as $key => $value): ?>
|
||||
<br><?php printf('%s : %s', $key, $value); ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
echo Html::strongText(__('OP Cache')); ?>
|
||||
<?php
|
||||
foreach (opcache_get_status(false)['opcache_statistics'] as $key => $value): ?>
|
||||
<br><?php
|
||||
printf('%s : %s', $key, $value); ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Server'); ?>
|
||||
<?php
|
||||
echo __('Server'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Server'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Server'); ?></div>
|
||||
|
||||
<?php echo (!$_getvar('isDemo')) ? Html::strongText($_SERVER['SERVER_SOFTWARE']) : '***'; ?>
|
||||
<?php
|
||||
echo (!$_getvar('isDemo')) ? Html::strongText($_SERVER['SERVER_SOFTWARE']) : '***'; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Configuration Backup'); ?>
|
||||
<?php
|
||||
echo __('Configuration Backup'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Configuration Backup'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Configuration Backup'); ?></div>
|
||||
|
||||
<?php echo $_getvar('configBackupDate'); ?>
|
||||
<?php
|
||||
echo $_getvar('configBackupDate'); ?>
|
||||
|
||||
<?php if ($_getvar('downloadLog')): ?>
|
||||
<?php
|
||||
if ($_getvar('downloadLog')): ?>
|
||||
<div>
|
||||
<a href="<?php echo $_getRoute('configGeneral/downloadConfigBackup/json'); ?>"
|
||||
<a href="<?php
|
||||
echo $_getRoute('configGeneral/downloadConfigBackup/json'); ?>"
|
||||
class="download" target="_blank">
|
||||
|
||||
<button type="button" class="mdl-button mdl-js-button">
|
||||
<?php printf(__('Download %s'), 'JSON'); ?>
|
||||
<?php
|
||||
printf(__('Download %s'), 'JSON'); ?>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Language'); ?>
|
||||
<?php
|
||||
echo __('Language'); ?>
|
||||
<div id="help-infolang"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-infolang">
|
||||
<p>
|
||||
<?php echo __('Tells whether the language is available or not.'); ?>
|
||||
<?php
|
||||
echo __('Tells whether the language is available or not.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('If it is not installed, you would need install the right operating system locales. More info at Wiki.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'If it is not installed, you would need install the right operating system locales. More info at Wiki.'
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Language'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Language'); ?></div>
|
||||
|
||||
<?php echo $_getvar('locale'); ?>
|
||||
<?php
|
||||
echo $_getvar('locale'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Encrypted Session'); ?>
|
||||
<?php
|
||||
echo __('Encrypted Session'); ?>
|
||||
<div id="help-infosession"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-infosession">
|
||||
<p>
|
||||
<?php echo __('Tells whether the session data are encrypted in the server side or not'); ?>
|
||||
<?php
|
||||
echo __('Tells whether the session data are encrypted in the server side or not'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Encrypted Session'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Encrypted Session'); ?></div>
|
||||
|
||||
<?php echo $_getvar('securedSession') ? __('Yes') : __('No'); ?>
|
||||
<?php
|
||||
echo $_getvar('securedSession') ? __('Yes') : __('No'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Loaded Plugins'); ?>
|
||||
<?php
|
||||
echo __('Loaded Plugins'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Loaded Plugins'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Loaded Plugins'); ?></div>
|
||||
|
||||
<ul class="mdl-list">
|
||||
<?php /** @var PluginInterface $plugin */
|
||||
<?php
|
||||
/** @var PluginInterface $plugin */
|
||||
foreach ($_getvar('plugins') as $name => $plugin): ?>
|
||||
<li class="mdl-list__item">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">extension</i>
|
||||
<?php echo $name; ?>
|
||||
<?php
|
||||
echo $name; ?>
|
||||
<br>
|
||||
<?php printf('Version: %s', implode('.', $plugin->getVersion())); ?>
|
||||
<?php
|
||||
printf('Version: %s', implode('.', $plugin->getVersion())); ?>
|
||||
<br>
|
||||
<?php printf('Autor: %s', $plugin->getAuthor()); ?>
|
||||
<?php
|
||||
printf('Autor: %s', $plugin->getAuthor()); ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($_getvar('downloadLog')): ?>
|
||||
<?php
|
||||
if ($_getvar('downloadLog')): ?>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Log file'); ?>
|
||||
<?php
|
||||
echo __('Log file'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Log file'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Log file'); ?></div>
|
||||
|
||||
<a href="<?php echo $_getRoute('configGeneral/downloadLog'); ?>"
|
||||
<a href="<?php
|
||||
echo $_getRoute('configGeneral/downloadLog'); ?>"
|
||||
class="download" target="_blank">
|
||||
|
||||
<button type="button" class="mdl-button mdl-js-button">
|
||||
<?php printf(__('Download %s'), basename(LOG_FILE)); ?>
|
||||
<?php
|
||||
printf(__('Download %s'), basename(LOG_FILE)); ?>
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</table>
|
||||
|
||||
<div class="tab-actions">
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,33 +23,41 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<?php if (!$_getvar('ldapIsAvailable')): ?>
|
||||
<?php
|
||||
if (!$_getvar('ldapIsAvailable')): ?>
|
||||
<div class="msg-option-unvailable">
|
||||
<?php printf(__('The \'%s\' extension is unavailable'), 'ldap'); ?>
|
||||
<?php
|
||||
printf(__('The \'%s\' extension is unavailable'), 'ldap'); ?>
|
||||
<i id="help-ldap"
|
||||
class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
class="material-icons"><?php
|
||||
echo $icons->help()->getIcon(); ?></i>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-ldap">
|
||||
<p>
|
||||
<?php echo __('This extension is needed to connect to the LDAP server'); ?>
|
||||
<?php
|
||||
echo __('This extension is needed to connect to the LDAP server'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">business</i>
|
||||
<?php echo __('Configuration'); ?>
|
||||
<?php
|
||||
echo __('Configuration'); ?>
|
||||
</div>
|
||||
|
||||
<form method="post" name="frmLdap" id="frmLdap" class="form-action"
|
||||
@@ -67,16 +75,20 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="ldap_enabled">
|
||||
<input type="checkbox" id="ldap_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="ldap_enabled" <?php echo $configData->isLdapEnabled() ? 'checked' : ''; ?>/>
|
||||
name="ldap_enabled" <?php
|
||||
echo $configData->isLdapEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Enable LDAP'); ?></span>
|
||||
<span><?php
|
||||
echo __('Enable LDAP'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Enables authentication against an LDAP server.'); ?>
|
||||
<?php
|
||||
echo __('Enables authentication against an LDAP server.'); ?>
|
||||
<br>
|
||||
<?php echo __('This method will use MySQL as fallback.'); ?>
|
||||
<?php
|
||||
echo __('This method will use MySQL as fallback.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -88,14 +100,16 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input type="checkbox"
|
||||
id="ldap_tls_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="ldap_tls_enabled" <?php echo $configData->isLdapTlsEnabled() ? 'checked' : ''; ?>/>
|
||||
name="ldap_tls_enabled" <?php
|
||||
echo $configData->isLdapTlsEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span>TLS</span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Enables the connection over TLS'); ?>
|
||||
<?php
|
||||
echo __('Enables the connection over TLS'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -104,39 +118,52 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Server Type'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Server Type'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Server Type'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Server Type'); ?></div>
|
||||
|
||||
<select id="ldap_defaultgroup" name="ldap_server_type"
|
||||
class="select-box sel-chosen-usergroup" required>
|
||||
<option value=""><?php echo __('Server Type'); ?></option>
|
||||
<?php /** @var SelectItem $serverType */
|
||||
<option value=""><?php
|
||||
echo __('Server Type'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $serverType */
|
||||
foreach ($_getvar('serverTypes') as $serverType): ?>
|
||||
<option
|
||||
value="<?php echo $serverType->getId(); ?>"
|
||||
<?php echo $serverType->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php echo $serverType->getName(); ?>
|
||||
value="<?php
|
||||
echo $serverType->getId(); ?>"
|
||||
<?php
|
||||
echo $serverType->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo $serverType->getName(); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Server'); ?>
|
||||
<?php
|
||||
echo __('Server'); ?>
|
||||
<div id="help-ldap_server"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_server">
|
||||
<p>
|
||||
<?php echo __('Hostname or IP address of LDAP server.'); ?>
|
||||
<?php
|
||||
echo __('Hostname or IP address of LDAP server.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Examples:'); ?>
|
||||
<?php
|
||||
echo __('Examples:'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
@@ -151,27 +178,34 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input id="ldap_server" name="ldap_server" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo htmlspecialchars($configData->getLdapServer(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getLdapServer(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_server"><?php echo __('Server'); ?></label>
|
||||
for="ldap_server"><?php
|
||||
echo __('Server'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Bind User'); ?>
|
||||
<?php
|
||||
echo __('Bind User'); ?>
|
||||
<div id="help-ldap_binduser"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_binduser">
|
||||
<p>
|
||||
<?php echo __('User to connect to LDAP service.'); ?>
|
||||
<?php
|
||||
echo __('User to connect to LDAP service.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Examples:'); ?>
|
||||
<?php
|
||||
echo __('Examples:'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
@@ -185,23 +219,29 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input id="ldap_binduser" name="ldap_binduser" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo htmlspecialchars($configData->getLdapBindUser(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getLdapBindUser(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_binduser"><?php echo __('User'); ?></label>
|
||||
for="ldap_binduser"><?php
|
||||
echo __('User'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Bind Password'); ?>
|
||||
<?php
|
||||
echo __('Bind Password'); ?>
|
||||
<div id="help-ldap_bindpass"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_bindpass">
|
||||
<p>
|
||||
<?php echo __('LDAP connection user\'s password'); ?>
|
||||
<?php
|
||||
echo __('LDAP connection user\'s password'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -211,40 +251,54 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
type="password"
|
||||
class="mdl-textfield__input passwordfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo $configData->getLdapBindPass() ? '***' : ''; ?>"/>
|
||||
value="<?php
|
||||
echo $configData->getLdapBindPass() ? '***' : ''; ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_bindpass"><?php echo __('Password'); ?></label>
|
||||
for="ldap_bindpass"><?php
|
||||
echo __('Password'); ?></label>
|
||||
|
||||
</div>
|
||||
<?php if ($configData->getLdapBindPass()): ?>
|
||||
<?php
|
||||
if ($configData->getLdapBindPass()): ?>
|
||||
<div id="help-ldap_password"
|
||||
class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>">
|
||||
<?php echo $icons->getIconWarning()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->warning()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->warning()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_password">
|
||||
<p>
|
||||
<?php echo __('This isn\'t the real LDAP password. You should set the real one before checking or importing LDAP objects'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'This isn\'t the real LDAP password. You should set the real one before checking or importing LDAP objects'
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Search base'); ?>
|
||||
<?php
|
||||
echo __('Search base'); ?>
|
||||
<div id="help-ldap_base"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_base">
|
||||
<p>
|
||||
<?php echo __('LDAP base to perform the LDAP users search.'); ?>
|
||||
<?php
|
||||
echo __('LDAP base to perform the LDAP users search.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Examples:'); ?>
|
||||
<?php
|
||||
echo __('Examples:'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
@@ -258,31 +312,39 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input id="ldap_base" name="ldap_base" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo htmlspecialchars($configData->getLdapBase(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getLdapBase(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_base"><?php echo __('Search base'); ?></label>
|
||||
for="ldap_base"><?php
|
||||
echo __('Search base'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Group'); ?>
|
||||
<?php
|
||||
echo __('Group'); ?>
|
||||
<div id="help-ldap_group"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_group">
|
||||
<p>
|
||||
<?php echo __('LDAP group which user must belong to for granting to log in.'); ?>
|
||||
<?php
|
||||
echo __('LDAP group which user must belong to for granting to log in.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('This group needs to be placed in the LDAP search base.'); ?>
|
||||
<?php
|
||||
echo __('This group needs to be placed in the LDAP search base.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Examples:'); ?>
|
||||
<?php
|
||||
echo __('Examples:'); ?>
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
@@ -296,93 +358,123 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input id="ldap_group" name="ldap_group" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo htmlspecialchars($configData->getLdapGroup(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getLdapGroup(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_group"><?php echo __('Group'); ?></label>
|
||||
for="ldap_group"><?php
|
||||
echo __('Group'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Default Group'); ?>
|
||||
<?php
|
||||
echo __('Default Group'); ?>
|
||||
<div id="help-ldap_defaultgroup"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_defaultgroup">
|
||||
<p>
|
||||
<?php echo __('Sets the default users group for newly created LDAP users'); ?>
|
||||
<?php
|
||||
echo __('Sets the default users group for newly created LDAP users'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Default Group'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Default Group'); ?></div>
|
||||
|
||||
<select id="ldap_defaultgroup" name="ldap_defaultgroup"
|
||||
class="select-box sel-chosen-usergroup" required>
|
||||
<option value=""><?php echo __('Select Group'); ?></option>
|
||||
<?php /** @var SelectItem $userGroup */
|
||||
<option value=""><?php
|
||||
echo __('Select Group'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $userGroup */
|
||||
foreach ($_getvar('userGroups') as $userGroup): ?>
|
||||
<option
|
||||
value="<?php echo $userGroup->getId(); ?>"
|
||||
<?php echo $userGroup->getId() === $configData->getLdapDefaultGroup() ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?>
|
||||
value="<?php
|
||||
echo $userGroup->getId(); ?>"
|
||||
<?php
|
||||
echo $userGroup->getId() === $configData->getLdapDefaultGroup() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Default Profile'); ?>
|
||||
<?php
|
||||
echo __('Default Profile'); ?>
|
||||
<div id="help-ldap_defaultprofile"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_defaultprofile">
|
||||
<p>
|
||||
<?php echo __('Sets the default profile for the newly created LDAP users.'); ?>
|
||||
<?php
|
||||
echo __('Sets the default profile for the newly created LDAP users.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Default Profile'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Default Profile'); ?></div>
|
||||
|
||||
<select id="ldap_defaultprofile" name="ldap_defaultprofile"
|
||||
class="select-box sel-chosen-profile" required>
|
||||
<option value=""><?php echo __('Select User'); ?></option>
|
||||
<?php /** @var SelectItem $userProfile */
|
||||
<option value=""><?php
|
||||
echo __('Select User'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $userProfile */
|
||||
foreach ($_getvar('userProfiles') as $userProfile): ?>
|
||||
<option
|
||||
value="<?php echo $userProfile->getId(); ?>"
|
||||
<?php echo ($userProfile->getId() === $configData->getLdapDefaultProfile()) ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars($userProfile->getName(), ENT_QUOTES); ?>
|
||||
value="<?php
|
||||
echo $userProfile->getId(); ?>"
|
||||
<?php
|
||||
echo ($userProfile->getId() === $configData->getLdapDefaultProfile()) ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo htmlspecialchars($userProfile->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="header">
|
||||
<td colspan="2"><?php echo __('Advanced Settings'); ?></td>
|
||||
<td colspan="2"><?php
|
||||
echo __('Advanced Settings'); ?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('User Filter'); ?>
|
||||
<?php
|
||||
echo __('User Filter'); ?>
|
||||
<div id="help-ldap_filter_user_object"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_filter_user_object">
|
||||
<p>
|
||||
<?php echo __('LDAP filter for user objects lookup.'); ?>
|
||||
<?php
|
||||
echo __('LDAP filter for user objects lookup.'); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php echo __('Examples:'); ?>
|
||||
<?php
|
||||
echo __('Examples:'); ?>
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
@@ -398,27 +490,34 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
name="ldap_filter_user_object"
|
||||
type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo $configData->getLdapFilterUserObject(); ?>"/>
|
||||
value="<?php
|
||||
echo $configData->getLdapFilterUserObject(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_filter_user_object"><?php echo __('Filter'); ?></label>
|
||||
for="ldap_filter_user_object"><?php
|
||||
echo __('Filter'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Group Filter'); ?>
|
||||
<?php
|
||||
echo __('Group Filter'); ?>
|
||||
<div id="help-ldap_filter_group_object"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_filter_group_object">
|
||||
<p>
|
||||
<?php echo __('LDAP filter for group objects lookup.'); ?>
|
||||
<?php
|
||||
echo __('LDAP filter for group objects lookup.'); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php echo __('Examples:'); ?>
|
||||
<?php
|
||||
echo __('Examples:'); ?>
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
@@ -434,77 +533,103 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
name="ldap_filter_group_object"
|
||||
type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo $configData->getLdapFilterGroupObject(); ?>"/>
|
||||
value="<?php
|
||||
echo $configData->getLdapFilterGroupObject(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_filter_group_object"><?php echo __('Filter'); ?></label>
|
||||
for="ldap_filter_group_object"><?php
|
||||
echo __('Filter'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('User Attributes'); ?>
|
||||
<?php
|
||||
echo __('User Attributes'); ?>
|
||||
|
||||
<div id="help-ldap_filter_user_attributes"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_filter_user_attributes">
|
||||
<p>
|
||||
<?php echo __('LDAP attributes to lookup the user login. Each attribute will be chained in an OR filter.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'LDAP attributes to lookup the user login. Each attribute will be chained in an OR filter.'
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('User Attributes'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('User Attributes'); ?></div>
|
||||
|
||||
<select id="ldap_filter_user_attributes"
|
||||
name="ldap_filter_user_attributes[]"
|
||||
multiple="multiple"
|
||||
class="select-box" data-create="true">
|
||||
<?php /** @var SelectItem $userAttribute */
|
||||
<?php
|
||||
/** @var SelectItem $userAttribute */
|
||||
foreach ($_getvar('userAttributes') as $userAttribute): ?>
|
||||
<option
|
||||
value="<?php echo $userAttribute->getName(); ?>"
|
||||
<?php echo $userAttribute->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php echo $userAttribute->getName(); ?>
|
||||
value="<?php
|
||||
echo $userAttribute->getName(); ?>"
|
||||
<?php
|
||||
echo $userAttribute->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo $userAttribute->getName(); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Group Attributes'); ?>
|
||||
<?php
|
||||
echo __('Group Attributes'); ?>
|
||||
|
||||
<div id="help-ldap_filter_group_attributes"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_filter_group_attributes">
|
||||
<p>
|
||||
<?php echo __('LDAP attributes to lookup the group name. Each attribute will be chained in an OR filter.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'LDAP attributes to lookup the group name. Each attribute will be chained in an OR filter.'
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Group Attributes'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Group Attributes'); ?></div>
|
||||
|
||||
<select id="ldap_filter_group_attributes"
|
||||
name="ldap_filter_group_attributes[]"
|
||||
multiple="multiple"
|
||||
class="select-box" data-create="true">
|
||||
<?php /** @var SelectItem $groupAttribute */
|
||||
<?php
|
||||
/** @var SelectItem $groupAttribute */
|
||||
foreach ($_getvar('groupAttributes') as $groupAttribute): ?>
|
||||
<option
|
||||
value="<?php echo $groupAttribute->getName(); ?>"
|
||||
<?php echo $groupAttribute->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php echo $groupAttribute->getName(); ?>
|
||||
value="<?php
|
||||
echo $groupAttribute->getName(); ?>"
|
||||
<?php
|
||||
echo $groupAttribute->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo $groupAttribute->getName(); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -515,26 +640,35 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconCheck()->getClassButton(); ?>"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->check()->getClassButton(); ?>"
|
||||
data-onclick="ldap/check"
|
||||
data-action-route="configLdap/check"
|
||||
data-src="#frmLdap"
|
||||
title="<?php echo $icons->getIconCheck()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconCheck()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->check()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->check()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button form="frmLdap"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -542,26 +676,32 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">import_export</i>
|
||||
<?php echo __('Import'); ?>
|
||||
<?php
|
||||
echo __('Import'); ?>
|
||||
</div>
|
||||
|
||||
<table id="tblLdap" class="data tblConfig">
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Login Attribute'); ?>
|
||||
<?php
|
||||
echo __('Login Attribute'); ?>
|
||||
<div id="help-ldap_login_attribute"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_login_attribute">
|
||||
<p>
|
||||
<?php echo __('Defines the attribute for the user\'s login when importing.'); ?>
|
||||
<?php
|
||||
echo __('Defines the attribute for the user\'s login when importing.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Login Attribute'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Login Attribute'); ?></div>
|
||||
|
||||
<select id="ldap_login_attribute" name="ldap_login_attribute"
|
||||
class="select-box" required>
|
||||
@@ -575,20 +715,25 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Name Attribute'); ?>
|
||||
<?php
|
||||
echo __('Name Attribute'); ?>
|
||||
<div id="help-ldap_username_attribute"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_username_attribute">
|
||||
<p>
|
||||
<?php echo __('Defines the attribute for the user\'s name when importing.'); ?>
|
||||
<?php
|
||||
echo __('Defines the attribute for the user\'s name when importing.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Name Attribute'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Name Attribute'); ?></div>
|
||||
|
||||
<select id="ldap_username_attribute"
|
||||
name="ldap_username_attribute"
|
||||
@@ -615,7 +760,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Import Groups'); ?></span>
|
||||
<span><?php
|
||||
echo __('Import Groups'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"></span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -624,20 +770,25 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Group Name Attribute'); ?>
|
||||
<?php
|
||||
echo __('Group Name Attribute'); ?>
|
||||
<div id="help-ldap_groupname_attribute"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_groupname_attribute">
|
||||
<p>
|
||||
<?php echo __('Defines the attribute for the user group name when importing.'); ?>
|
||||
<?php
|
||||
echo __('Defines the attribute for the user group name when importing.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Group Name Attribute'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Group Name Attribute'); ?></div>
|
||||
|
||||
<select id="ldap_groupname_attribute"
|
||||
name="ldap_groupname_attribute"
|
||||
@@ -649,15 +800,19 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Filter'); ?>
|
||||
<?php
|
||||
echo __('Filter'); ?>
|
||||
<div id="help-ldap_import_filter"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-ldap_import_filter">
|
||||
<p>
|
||||
<?php echo __('Filter for importing LDAP users or groups.'); ?>
|
||||
<?php
|
||||
echo __('Filter for importing LDAP users or groups.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -667,7 +822,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="ldap_import_filter"><?php echo __('Filter'); ?></label>
|
||||
for="ldap_import_filter"><?php
|
||||
echo __('Filter'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -677,19 +833,25 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconCheck()->getClassButton(); ?>"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->check()->getClassButton(); ?>"
|
||||
data-onclick="ldap/check"
|
||||
data-action-route="configLdap/checkImport"
|
||||
data-src="#frmLdap"
|
||||
title="<?php echo $icons->getIconCheck()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconCheck()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->check()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->check()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
@@ -698,7 +860,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
data-onclick="ldap/import"
|
||||
data-action-route="configLdap/import"
|
||||
data-src="#frmLdap"
|
||||
title="<?php echo __('Import users from LDAP'); ?>">
|
||||
title="<?php
|
||||
echo __('Import users from LDAP'); ?>">
|
||||
<i class="material-icons">get_app</i>
|
||||
</button>
|
||||
</li>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,20 +23,23 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">mail</i>
|
||||
<?php echo __('Mail'); ?>
|
||||
<?php
|
||||
echo __('Mail'); ?>
|
||||
</div>
|
||||
|
||||
<form method="post" name="frmMail" id="frmMail" class="form-action"
|
||||
@@ -54,13 +57,16 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="mail_enabled">
|
||||
<input type="checkbox" id="mail_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="mail_enabled" <?php echo $configData->isMailEnabled() ? 'checked' : ''; ?>/>
|
||||
name="mail_enabled" <?php
|
||||
echo $configData->isMailEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Enable email notifications'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Enable email notifications'); ?></span>
|
||||
<span><?php
|
||||
echo __('Enable email notifications'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Enable email notifications'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -71,14 +77,19 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input type="checkbox"
|
||||
id="mail_requests_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="mail_requests_enabled" <?php echo $configData->isMailRequestsEnabled() ? 'checked' : ''; ?>/>
|
||||
name="mail_requests_enabled" <?php
|
||||
echo $configData->isMailRequestsEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Enable requests by email'); ?></span>
|
||||
<span><?php
|
||||
echo __('Enable requests by email'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Allows users to request for either modifications to existing accounts or access to accounts which they have no rights on.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'Allows users to request for either modifications to existing accounts or access to accounts which they have no rights on.'
|
||||
); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -87,22 +98,26 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Server'); ?>
|
||||
<?php
|
||||
echo __('Server'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="mail_server" name="mail_server" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo htmlspecialchars($configData->getMailServer(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getMailServer(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="mail_server"><?php echo __('Server'); ?></label>
|
||||
for="mail_server"><?php
|
||||
echo __('Server'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Port'); ?>
|
||||
<?php
|
||||
echo __('Port'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -110,9 +125,11 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
pattern="[0-9]{1,5}"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="5"
|
||||
value="<?php echo $configData->getMailPort(); ?>"/>
|
||||
value="<?php
|
||||
echo $configData->getMailPort(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="mail_port"><?php echo __('Port'); ?></label>
|
||||
for="mail_port"><?php
|
||||
echo __('Port'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -126,12 +143,14 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
for="mail_auth_enabled">
|
||||
<input type="checkbox" id="mail_auth_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="mail_auth_enabled" <?php echo $configData->isMailAuthenabled() ? 'checked' : ''; ?>/>
|
||||
name="mail_auth_enabled" <?php
|
||||
echo $configData->isMailAuthenabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Enable Authentication'); ?></span>
|
||||
<span><?php
|
||||
echo __('Enable Authentication'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"></span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -140,94 +159,121 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('User'); ?>
|
||||
<?php
|
||||
echo __('User'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="mail_user" name="mail_user" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50"
|
||||
value="<?php echo htmlspecialchars($configData->getMailUser(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getMailUser(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="mail_user"><?php echo __('User'); ?></label>
|
||||
for="mail_user"><?php
|
||||
echo __('User'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Password'); ?>
|
||||
<?php
|
||||
echo __('Password'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="mail_pass" name="mail_pass" type="password"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__input"
|
||||
maxlength="128"
|
||||
value="<?php echo $configData->getMailPass() ? '***' : ''; ?>"/>
|
||||
value="<?php
|
||||
echo $configData->getMailPass() ? '***' : ''; ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="mail_pass"><?php echo __('Password'); ?></label>
|
||||
for="mail_pass"><?php
|
||||
echo __('Password'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Security'); ?>
|
||||
<?php
|
||||
echo __('Security'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Security'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Security'); ?></div>
|
||||
|
||||
<select name="mail_security" id="sel-mailsecurity" size="1"
|
||||
class="select-box select-box-deselect">
|
||||
<option value=""><?php echo __('Disabled'); ?></option>
|
||||
<?php foreach ($_getvar('mailSecurity') as $security): ?>
|
||||
<option value=""><?php
|
||||
echo __('Disabled'); ?></option>
|
||||
<?php
|
||||
foreach ($_getvar('mailSecurity') as $security): ?>
|
||||
<option
|
||||
value="<?php echo $security; ?>" <?php echo ($configData->getMailSecurity() === $security) ? 'selected' : ''; ?>><?php echo $security; ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $security; ?>" <?php
|
||||
echo ($configData->getMailSecurity() === $security) ? 'selected' : ''; ?>><?php
|
||||
echo $security; ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Sender email address'); ?>
|
||||
<?php
|
||||
echo __('Sender email address'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="mail_from" name="mail_from" type="email"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo htmlspecialchars($configData->getMailFrom(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getMailFrom(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="mail_from"><?php echo __('Sender email address'); ?></label>
|
||||
for="mail_from"><?php
|
||||
echo __('Sender email address'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Recipients'); ?>
|
||||
<?php
|
||||
echo __('Recipients'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Recipients'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Recipients'); ?></div>
|
||||
|
||||
<input type="text" name="mail_recipients" id="mail_recipients"
|
||||
class="select-items-tag"
|
||||
value="<?php echo implode(',', $configData->getMailRecipients()); ?>"/>
|
||||
value="<?php
|
||||
echo implode(',', $configData->getMailRecipients()); ?>"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Events'); ?>
|
||||
<?php
|
||||
echo __('Events'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Events'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Events'); ?></div>
|
||||
|
||||
<select id="mail_events" name="mail_events[]"
|
||||
multiple="multiple" class="select-box"
|
||||
data-create="true">
|
||||
<?php /** @var SelectItem $mailEvent */
|
||||
<?php
|
||||
/** @var SelectItem $mailEvent */
|
||||
foreach ($_getvar('mailEvents') as $mailEvent): ?>
|
||||
<option
|
||||
value="<?php echo $mailEvent->getName(); ?>"
|
||||
<?php echo $mailEvent->isSelected() ? 'selected' : '' ?>><?php echo $mailEvent->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $mailEvent->getName(); ?>"
|
||||
<?php
|
||||
echo $mailEvent->isSelected() ? 'selected' : '' ?>><?php
|
||||
echo $mailEvent->getName(); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -238,26 +284,35 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<ul>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconCheck()->getClassButton(); ?>"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->check()->getClassButton(); ?>"
|
||||
data-onclick="config/mailCheck"
|
||||
data-action-route="configMail/check"
|
||||
data-src="#frmMail"
|
||||
title="<?php echo $icons->getIconCheck()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconCheck()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->check()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->check()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button form="frmMail"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,28 +23,35 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<?php if (!$_getvar('curlIsAvailable')): ?>
|
||||
<?php
|
||||
if (!$_getvar('curlIsAvailable')): ?>
|
||||
<div class="msg-option-unvailable">
|
||||
<?php printf(__('The \'%s\' extension is unavailable'), 'curl'); ?>
|
||||
<?php
|
||||
printf(__('The \'%s\' extension is unavailable'), 'curl'); ?>
|
||||
<i id="help-curl"
|
||||
class="material-icons"><?php echo $icons->getIconHelp()->getIcon(); ?></i>
|
||||
class="material-icons"><?php
|
||||
echo $icons->help()->getIcon(); ?></i>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-curl">
|
||||
<p>
|
||||
<?php echo __('This extension is needed to connect with DokuWiki'); ?>
|
||||
<?php
|
||||
echo __('This extension is needed to connect with DokuWiki'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<form method="post" name="frmDokuWiki" id="frmDokuWiki" class="form-action"
|
||||
data-onsubmit="config/save"
|
||||
@@ -53,7 +60,8 @@ use SP\Core\UI\ThemeIcons;
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">folder</i>
|
||||
<?php echo __('DokuWiki API'); ?>
|
||||
<?php
|
||||
echo __('DokuWiki API'); ?>
|
||||
</div>
|
||||
|
||||
<table id="tblDokuWiki" class="data tblConfig">
|
||||
@@ -67,16 +75,22 @@ use SP\Core\UI\ThemeIcons;
|
||||
for="dokuwiki_enabled">
|
||||
<input type="checkbox" id="dokuwiki_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="dokuwiki_enabled" <?php echo $configData->isDokuwikiEnabled() ? 'checked' : ''; ?>/>
|
||||
name="dokuwiki_enabled" <?php
|
||||
echo $configData->isDokuwikiEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Enable DokuWiki API'); ?></span>
|
||||
<span><?php
|
||||
echo __('Enable DokuWiki API'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Enables DokuWiki XML-RPC API for Wiki links.'); ?>
|
||||
<?php
|
||||
echo __('Enables DokuWiki XML-RPC API for Wiki links.'); ?>
|
||||
<br>
|
||||
<?php echo __('In order to get this feature working, you should enable Wiki links for accounts filtering'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'In order to get this feature working, you should enable Wiki links for accounts filtering'
|
||||
); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -86,17 +100,22 @@ use SP\Core\UI\ThemeIcons;
|
||||
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('API URL'); ?>
|
||||
<?php
|
||||
echo __('API URL'); ?>
|
||||
<div id="help-dokuwiki_url"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-dokuwiki_url">
|
||||
<p>
|
||||
<?php echo __('DokuWiki API URL'); ?>
|
||||
<?php
|
||||
echo __('DokuWiki API URL'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Example:'); ?>
|
||||
<?php
|
||||
echo __('Example:'); ?>
|
||||
<ul>
|
||||
<li>http://wiki.syspass.org/lib/exe/xmlrpc.php</li>
|
||||
</ul>
|
||||
@@ -108,26 +127,32 @@ use SP\Core\UI\ThemeIcons;
|
||||
<input id="dokuwiki_url" name="dokuwiki_url" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255"
|
||||
value="<?php echo htmlspecialchars($configData->getDokuwikiUrl(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getDokuwikiUrl(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="dokuwiki_url"><?php echo __('API URL'); ?></label>
|
||||
for="dokuwiki_url"><?php
|
||||
echo __('API URL'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Base URL'); ?>
|
||||
<?php
|
||||
echo __('Base URL'); ?>
|
||||
<div id="help-dokuwiki_urlbase"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(
|
||||
); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-dokuwiki_urlbase">
|
||||
<p>
|
||||
<?php echo __('DokuWiki base URL'); ?>
|
||||
<?php
|
||||
echo __('DokuWiki base URL'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Example:'); ?>
|
||||
<?php
|
||||
echo __('Example:'); ?>
|
||||
<ul>
|
||||
<li>http://wiki.syspass.org/dokuwiki</li>
|
||||
</ul>
|
||||
@@ -140,22 +165,27 @@ use SP\Core\UI\ThemeIcons;
|
||||
type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255"
|
||||
value="<?php echo htmlspecialchars($configData->getDokuwikiUrlBase(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getDokuwikiUrlBase(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="dokuwiki_urlbase"><?php echo __('Base URL'); ?></label>
|
||||
for="dokuwiki_urlbase"><?php
|
||||
echo __('Base URL'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('User'); ?>
|
||||
<?php
|
||||
echo __('User'); ?>
|
||||
<div id="help-dokuwiki_user"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(
|
||||
); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-dokuwiki_user">
|
||||
<p>
|
||||
<?php echo __('User for connecting to the DokuWiki API.'); ?>
|
||||
<?php
|
||||
echo __('User for connecting to the DokuWiki API.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -164,15 +194,18 @@ use SP\Core\UI\ThemeIcons;
|
||||
<input id="dokuwiki_user" name="dokuwiki_user" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo htmlspecialchars($configData->getDokuwikiUser(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getDokuwikiUser(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="dokuwiki_user"><?php echo __('User'); ?></label>
|
||||
for="dokuwiki_user"><?php
|
||||
echo __('User'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Password'); ?>
|
||||
<?php
|
||||
echo __('Password'); ?>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -180,21 +213,27 @@ use SP\Core\UI\ThemeIcons;
|
||||
type="password"
|
||||
class="mdl-textfield__input passwordfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo $configData->getDokuwikiPass(); ?>"/>
|
||||
value="<?php
|
||||
echo $configData->getDokuwikiPass(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="dokuwiki_pass"><?php echo __('Password'); ?></label>
|
||||
for="dokuwiki_pass"><?php
|
||||
echo __('Password'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Namespace'); ?>
|
||||
<?php
|
||||
echo __('Namespace'); ?>
|
||||
<div id="help-dokuwiki_namespace"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-dokuwiki_namespace">
|
||||
<p>
|
||||
<?php echo __('Namespace used to search pages.'); ?>
|
||||
<?php
|
||||
echo __('Namespace used to search pages.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -204,9 +243,11 @@ use SP\Core\UI\ThemeIcons;
|
||||
type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="128"
|
||||
value="<?php echo htmlspecialchars($configData->getDokuwikiNamespace(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getDokuwikiNamespace(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="dokuwiki_namespace"><?php echo __('Namespace'); ?></label>
|
||||
for="dokuwiki_namespace"><?php
|
||||
echo __('Namespace'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -217,26 +258,35 @@ use SP\Core\UI\ThemeIcons;
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconCheck()->getClassButton(); ?>"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->check()->getClassButton(); ?>"
|
||||
data-onclick="checks/wiki"
|
||||
data-action-route="configWiki/checkDokuwiki"
|
||||
data-src="#frmWiki"
|
||||
title="<?php echo $icons->getIconCheck()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconCheck()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->check()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->check()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button form="frmWiki"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,13 +23,15 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
@@ -40,7 +42,8 @@ use SP\Core\UI\ThemeIcons;
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">folder</i>
|
||||
<?php echo __('Wiki'); ?>
|
||||
<?php
|
||||
echo __('Wiki'); ?>
|
||||
</div>
|
||||
|
||||
<table id="tblWiki" class="data tblConfig">
|
||||
@@ -54,13 +57,18 @@ use SP\Core\UI\ThemeIcons;
|
||||
for="wiki_enabled">
|
||||
<input type="checkbox" id="wiki_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="wiki_enabled" <?php echo $configData->isWikiEnabled() ? 'checked' : ''; ?>/>
|
||||
name="wiki_enabled" <?php
|
||||
echo $configData->isWikiEnabled() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Enable Wiki links'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Enables the option to add a link to search for results in an external Wiki.'); ?></span>
|
||||
<span><?php
|
||||
echo __('Enable Wiki links'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __(
|
||||
'Enables the option to add a link to search for results in an external Wiki.'
|
||||
); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -68,21 +76,27 @@ use SP\Core\UI\ThemeIcons;
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Wiki search URL'); ?>
|
||||
<?php
|
||||
echo __('Wiki search URL'); ?>
|
||||
<div id="help-wiki_searchurl"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-wiki_searchurl">
|
||||
<p>
|
||||
<?php echo __('URL that Wiki uses for making an entry searching.'); ?>
|
||||
<?php
|
||||
echo __('URL that Wiki uses for making an entry searching.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('The client\'s name is used as parameter.'); ?>
|
||||
<?php
|
||||
echo __('The client\'s name is used as parameter.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Example:'); ?>
|
||||
<?php
|
||||
echo __('Example:'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -95,30 +109,37 @@ use SP\Core\UI\ThemeIcons;
|
||||
<input id="wiki_searchurl" name="wiki_searchurl" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255"
|
||||
value="<?php echo htmlspecialchars($configData->getWikiSearchurl(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getWikiSearchurl(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="wiki_searchurl"><?php echo __('Wiki search URL'); ?></label>
|
||||
for="wiki_searchurl"><?php
|
||||
echo __('Wiki search URL'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Wiki page URL'); ?>
|
||||
<?php
|
||||
echo __('Wiki page URL'); ?>
|
||||
<div id="help-wiki_pageurl"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(
|
||||
); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-wiki_pageurl">
|
||||
<p>
|
||||
<?php echo __('URL that Wiki uses for accessing to the entry details.'); ?>
|
||||
<?php
|
||||
echo __('URL that Wiki uses for accessing to the entry details.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Account\'s name is used as parameter of Wiki search variable.'); ?>
|
||||
<?php
|
||||
echo __('Account\'s name is used as parameter of Wiki search variable.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Example:'); ?>
|
||||
<?php
|
||||
echo __('Example:'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -131,34 +152,42 @@ use SP\Core\UI\ThemeIcons;
|
||||
<input id="wiki_pageurl" name="wiki_pageurl" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255"
|
||||
value="<?php echo htmlspecialchars($configData->getWikiPageurl(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($configData->getWikiPageurl(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="wiki_pageurl"><?php echo __('Wiki page URL'); ?></label>
|
||||
for="wiki_pageurl"><?php
|
||||
echo __('Wiki page URL'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Account name prefix'); ?>
|
||||
<?php
|
||||
echo __('Account name prefix'); ?>
|
||||
<div id="help-wikifilter"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(
|
||||
); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-wikifilter">
|
||||
<p>
|
||||
<?php echo __('Prefix to determine which accounts have a link to the Wiki.'); ?>
|
||||
<?php
|
||||
echo __('Prefix to determine which accounts have a link to the Wiki.'); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php echo __('Examples:') . ' serv- | srv- | vm-'; ?>
|
||||
<?php
|
||||
echo __('Examples:') . ' serv- | srv- | vm-'; ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Account name prefix'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Account name prefix'); ?></div>
|
||||
|
||||
<input type="text" name="wiki_filter" id="wikifilter"
|
||||
value="<?php echo implode(',', $configData->getWikiFilter()); ?>"/>
|
||||
value="<?php
|
||||
echo implode(',', $configData->getWikiFilter()); ?>"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -168,16 +197,22 @@ use SP\Core\UI\ThemeIcons;
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button form="frmWiki"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,29 +23,36 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Mvc\View\Template;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
<div id="actions" align="center">
|
||||
<?php include $this->includePartial('error-list'); ?>
|
||||
<?php
|
||||
include $this->includePartial('error-list'); ?>
|
||||
|
||||
<div class="buttons">
|
||||
<button id="btnBack"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--raised mdl-button--colored">
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Back'); ?>"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
<?php echo __('Back'); ?>
|
||||
title="<?php
|
||||
echo __('Back'); ?>"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo __('Back'); ?>
|
||||
</button>
|
||||
<a class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored"
|
||||
href="index.php?r=install&skipInstalled=true">
|
||||
<?php echo __('Install'); ?>
|
||||
<?php
|
||||
echo __('Install'); ?>
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Install'); ?>"><?php echo $icons->getIconPlay()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Install'); ?>"><?php
|
||||
echo $icons->play()->getIcon(); ?></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,22 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
/*
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* sysPass is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Mvc\View\Template;
|
||||
/**
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
<div id="actions" align="center">
|
||||
<?php include $this->includePartial('error-list'); ?>
|
||||
<?php
|
||||
include $this->includePartial('error-list'); ?>
|
||||
|
||||
<div class="buttons">
|
||||
<button id="btnBack"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--raised mdl-button--colored">
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Back'); ?>"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
<?php echo __('Back'); ?>
|
||||
title="<?php
|
||||
echo __('Back'); ?>"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo __('Back'); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,28 +24,41 @@
|
||||
|
||||
/**
|
||||
* @var SP\Html\DataGrid\DataGridTab $data
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$data = $_getvar('data');
|
||||
?>
|
||||
|
||||
<!-- Rows -->
|
||||
<?php if ($data->getData()->getDataCount() > 0):
|
||||
<!-- Rows -->
|
||||
<?php
|
||||
if ($data->getData()->getDataCount() > 0):
|
||||
foreach ($data->getData()->getData() as $dataIndex => $dataItem):
|
||||
if ($dataIndex === 'count'): continue; endif; ?>
|
||||
|
||||
<tr data-item-id="<?php echo $dataItem->{$data->getData()->getDataRowSourceId()}; ?>">
|
||||
<?php foreach ($data->getData()->getDataRowSources() as $rowSrc): ?>
|
||||
<?php $value = $rowSrc['isMethod'] === true && method_exists($dataItem, $rowSrc['name']) ? $dataItem->{$rowSrc['name']}() : $dataItem->{$rowSrc['name']}; ?>
|
||||
<?php $value = isset($rowSrc['filter']) ? $rowSrc['filter']($value) : $value; ?>
|
||||
<td class="cell-data"><?php echo $value !== '' ? $value : ' '; // Fix height ?></td>
|
||||
<?php endforeach; ?>
|
||||
<tr data-item-id="<?php
|
||||
echo $dataItem->{$data->getData()->getDataRowSourceId()}; ?>">
|
||||
<?php
|
||||
foreach ($data->getData()->getDataRowSources() as $rowSrc): ?>
|
||||
<?php
|
||||
$value = $rowSrc['isMethod'] === true &&
|
||||
method_exists($dataItem, $rowSrc['name']) ? $dataItem->{$rowSrc['name']}(
|
||||
) : $dataItem->{$rowSrc['name']}; ?>
|
||||
<?php
|
||||
$value = isset($rowSrc['filter']) ? $rowSrc['filter']($value) : $value; ?>
|
||||
<td class="cell-data"><?php
|
||||
echo $value !== '' ? $value : ' '; // Fix height ?></td>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -25,16 +25,18 @@
|
||||
/**
|
||||
* @var DataGridAction|DataGridActionSearch $action
|
||||
* @var SP\Html\DataGrid\DataGridTab $data
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Html\DataGrid\Action\DataGridAction;
|
||||
use SP\Html\DataGrid\Action\DataGridActionSearch;
|
||||
use SP\Html\DataGrid\Action\DataGridActionType;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
if (!isset($data)) {
|
||||
$data = $_getvar('data');
|
||||
@@ -45,116 +47,179 @@ $index = $index ?? 0;
|
||||
|
||||
<div class="tab-actions">
|
||||
<ul>
|
||||
<?php foreach ($data->getDataActions() as $action):
|
||||
<?php
|
||||
foreach ($data->getDataActions() as $action):
|
||||
if ($action->getType() === DataGridActionType::MENUBAR_ITEM):
|
||||
?>
|
||||
<li>
|
||||
<button
|
||||
id="btn-add-<?php echo $action->getId(); ?>"
|
||||
id="btn-add-<?php
|
||||
echo $action->getId(); ?>"
|
||||
type="button"
|
||||
class="btn-action mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored mdl-color--indigo-A200 mdl-js-ripple-effect"
|
||||
data-nextaction="<?php echo $data->getOnCloseAction(); ?>"
|
||||
data-onclick="<?php echo $action->getOnClick(); ?>"
|
||||
<?php foreach ($action->getData() as $dataName => $dataValue): echo 'data-', $dataName, '=', '"', $dataValue, '"'; endforeach; ?>>
|
||||
<i class="material-icons"><?php echo $action->getIcon()->getIcon(); ?></i>
|
||||
data-nextaction="<?php
|
||||
echo $data->getOnCloseAction(); ?>"
|
||||
data-onclick="<?php
|
||||
echo $action->getOnClick(); ?>"
|
||||
<?php
|
||||
foreach (
|
||||
$action->getData() as $dataName => $dataValue
|
||||
): echo 'data-', $dataName, '=', '"', $dataValue, '"'; endforeach; ?>>
|
||||
<i class="material-icons"><?php
|
||||
echo $action->getIcon()->getIcon(); ?></i>
|
||||
</button>
|
||||
<span for="btn-add-<?php echo $action->getId(); ?>"
|
||||
<span for="btn-add-<?php
|
||||
echo $action->getId(); ?>"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"
|
||||
title="<?php echo $action->getTitle(); ?>"><?php echo $action->getName(); ?></span>
|
||||
title="<?php
|
||||
echo $action->getTitle(); ?>"><?php
|
||||
echo $action->getName(); ?></span>
|
||||
</li>
|
||||
<?php elseif ($action->getType() === DataGridActionType::SEARCH_ITEM): ?>
|
||||
<?php
|
||||
elseif ($action->getType() === DataGridActionType::SEARCH_ITEM): ?>
|
||||
<li class="datagrid-action-search">
|
||||
<form method="post" id="<?php echo $action->getName(); ?>"
|
||||
name="<?php echo $action->getName(); ?>"
|
||||
<form method="post" id="<?php
|
||||
echo $action->getName(); ?>"
|
||||
name="<?php
|
||||
echo $action->getName(); ?>"
|
||||
class="form-action"
|
||||
data-target="#data-table-<?php echo $data->getId(); ?>"
|
||||
data-onsubmit="<?php echo $action->getOnSubmit(); ?>"
|
||||
<?php foreach ($action->getData() as $dataName => $dataValue): echo 'data-', $dataName, '=', '"', $dataValue, '"'; endforeach; ?>>
|
||||
data-target="#data-table-<?php
|
||||
echo $data->getId(); ?>"
|
||||
data-onsubmit="<?php
|
||||
echo $action->getOnSubmit(); ?>"
|
||||
<?php
|
||||
foreach (
|
||||
$action->getData() as $dataName => $dataValue
|
||||
): echo 'data-', $dataName, '=', '"', $dataValue, '"'; endforeach; ?>>
|
||||
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--expandable">
|
||||
<label class="mdl-button mdl-js-button mdl-button--icon"
|
||||
id="btn-search-<?php echo $index; ?>"
|
||||
for="search-<?php echo $index; ?>">
|
||||
id="btn-search-<?php
|
||||
echo $index; ?>"
|
||||
for="search-<?php
|
||||
echo $index; ?>">
|
||||
<i class="material-icons">search</i>
|
||||
</label>
|
||||
<span for="btn-search-<?php echo $index; ?>"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php echo $action->getTitle(); ?></span>
|
||||
<span for="btn-search-<?php
|
||||
echo $index; ?>"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php
|
||||
echo $action->getTitle(); ?></span>
|
||||
|
||||
<div class="mdl-textfield__expandable-holder">
|
||||
<input class="mdl-textfield__input" type="text"
|
||||
id="search-<?php echo $index; ?>"
|
||||
id="search-<?php
|
||||
echo $index; ?>"
|
||||
name="search"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="search-<?php echo $index; ?>"><?php echo $action->getTitle(); ?></label>
|
||||
for="search-<?php
|
||||
echo $index; ?>"><?php
|
||||
echo $action->getTitle(); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="reset"
|
||||
id="btn-reset-<?php echo $index; ?>"
|
||||
id="btn-reset-<?php
|
||||
echo $index; ?>"
|
||||
class="btn-clear mdl-button mdl-js-button mdl-button--icon">
|
||||
<i class="material-icons"><?php echo $icons->getIconClear()->getIcon(); ?></i>
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->clear()->getIcon(); ?></i>
|
||||
</button>
|
||||
|
||||
<span for="btn-reset-<?php echo $index; ?>"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php echo $icons->getIconClear()->getTitle(); ?></span>
|
||||
<span for="btn-reset-<?php
|
||||
echo $index; ?>"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php
|
||||
echo $icons->clear()->getTitle(); ?></span>
|
||||
|
||||
<input type="hidden" name="activetab"
|
||||
value="<?php echo $index; ?>">
|
||||
value="<?php
|
||||
echo $index; ?>">
|
||||
<input type="hidden" name="start" value="0">
|
||||
<input type="hidden" name="count"
|
||||
value="<?php echo $data->getPager()->getLimitCount(); ?>">
|
||||
value="<?php
|
||||
echo $data->getPager()->getLimitCount(); ?>">
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</form>
|
||||
</li>
|
||||
<?php elseif ($action->getType() === DataGridActionType::HELP_ITEM): ?>
|
||||
<?php
|
||||
elseif ($action->getType() === DataGridActionType::HELP_ITEM): ?>
|
||||
<li>
|
||||
<?php include $this->includePartial('help_account_search'); ?>
|
||||
<?php
|
||||
include $this->includePartial('help_account_search'); ?>
|
||||
</li>
|
||||
<?php
|
||||
endif;
|
||||
endforeach; ?>
|
||||
|
||||
<li>
|
||||
<button type="button" id="btn-back-<?php echo $index; ?>"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconBack()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
<button type="button" id="btn-back-<?php
|
||||
echo $index; ?>"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->back()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
<span for="btn-back-<?php echo $index; ?>"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php echo $icons->getIconBack()->getTitle(); ?></span>
|
||||
<span for="btn-back-<?php
|
||||
echo $index; ?>"
|
||||
class="mdl-tooltip mdl-tooltip--bottom"><?php
|
||||
echo $icons->back()->getTitle(); ?></span>
|
||||
</li>
|
||||
|
||||
<?php if ($data->getDataActionsMenuCount() > 0): ?>
|
||||
<?php
|
||||
if ($data->getDataActionsMenuCount() > 0): ?>
|
||||
<li>
|
||||
<button id="menu-<?php echo $data->getId(); ?>-menu-lower-right"
|
||||
<button id="menu-<?php
|
||||
echo $data->getId(); ?>-menu-lower-right"
|
||||
class="mdl-button mdl-js-button mdl-button--icon">
|
||||
<i class="material-icons">more_vert</i>
|
||||
</button>
|
||||
|
||||
<ul class="mdl-menu mdl-menu--bottom-right mdl-js-menu mdl-js-ripple-effect"
|
||||
for="menu-<?php echo $data->getId(); ?>-menu-lower-right">
|
||||
<?php foreach ($data->getDataActionsMenu() as $action): ?>
|
||||
for="menu-<?php
|
||||
echo $data->getId(); ?>-menu-lower-right">
|
||||
<?php
|
||||
foreach ($data->getDataActionsMenu() as $action): ?>
|
||||
<li class="btn-action mdl-menu__item"
|
||||
title="<?php echo $action->getTitle(); ?>"
|
||||
<?php if ($action->isSelection()): ?>
|
||||
data-selection="#data-table-<?php echo $data->getId(); ?>"
|
||||
<?php endif; ?>
|
||||
data-onclick="<?php echo $action->getOnClick(); ?>"
|
||||
<?php foreach ($action->getData() as $dataName => $dataValue): echo 'data-', $dataName, '=', '"', $dataValue, '"'; endforeach; ?>>
|
||||
<i class="material-icons <?php echo $action->getIcon()->getClass(); ?>"><?php echo $action->getIcon()->getIcon(); ?></i>
|
||||
<?php echo $action->getName(); ?>
|
||||
title="<?php
|
||||
echo $action->getTitle(); ?>"
|
||||
<?php
|
||||
if ($action->isSelection()): ?>
|
||||
data-selection="#data-table-<?php
|
||||
echo $data->getId(); ?>"
|
||||
<?php
|
||||
endif; ?>
|
||||
data-onclick="<?php
|
||||
echo $action->getOnClick(); ?>"
|
||||
<?php
|
||||
foreach (
|
||||
$action->getData() as $dataName => $dataValue
|
||||
): echo 'data-', $dataName, '=', '"', $dataValue, '"'; endforeach; ?>>
|
||||
<i class="material-icons <?php
|
||||
echo $action->getIcon()->getClass(); ?>"><?php
|
||||
echo $action->getIcon()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo $action->getName(); ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="data-table-<?php echo $data->getId(); ?>">
|
||||
<?php if ($data->getDataTableTemplate()): ?>
|
||||
<?php include $data->getDataTableTemplate(); ?>
|
||||
<?php else: ?>
|
||||
<?php include __DIR__ . DIRECTORY_SEPARATOR . 'datagrid-table.inc'; ?>
|
||||
<?php endif; ?>
|
||||
<div id="data-table-<?php
|
||||
echo $data->getId(); ?>">
|
||||
<?php
|
||||
if ($data->getDataTableTemplate()): ?>
|
||||
<?php
|
||||
include $data->getDataTableTemplate(); ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<?php
|
||||
include __DIR__ . DIRECTORY_SEPARATOR . 'datagrid-table.inc'; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,31 +24,40 @@
|
||||
|
||||
/**
|
||||
* @var SP\Html\DataGrid\DataGridTab $data
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$tabs = $_getvar('tabs');
|
||||
?>
|
||||
<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
|
||||
<div id="tabsHeader" class="mdl-tabs__tab-bar"></div>
|
||||
|
||||
<?php foreach ($tabs as $index => $data): ?>
|
||||
<div id="tabs-<?php echo $index; ?>"
|
||||
<?php
|
||||
foreach ($tabs as $index => $data): ?>
|
||||
<div id="tabs-<?php
|
||||
echo $index; ?>"
|
||||
class="mdl-tabs__panel"
|
||||
data-tab-route="<?php echo $_getvar('tabsRoute'); ?>"
|
||||
data-tab-index="<?php echo $index; ?>">
|
||||
data-tab-route="<?php
|
||||
echo $_getvar('tabsRoute'); ?>"
|
||||
data-tab-index="<?php
|
||||
echo $index; ?>">
|
||||
|
||||
<?php include __DIR__ . DIRECTORY_SEPARATOR . 'datagrid-grid.inc'; ?>
|
||||
<?php
|
||||
include __DIR__ . DIRECTORY_SEPARATOR . 'datagrid-grid.inc'; ?>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
sysPassApp.theme.html.tabs.add("#tabsHeader", <?php echo $index; ?>, "<?php echo $data->getTitle(); ?>", <?php echo $index === $_getvar('activeTab') ? 1 : 0; ?>);
|
||||
sysPassApp.theme.html.tabs.add("#tabsHeader", <?php echo $index; ?>, "<?php echo $data->getTitle(
|
||||
); ?>", <?php echo $index === $_getvar('activeTab') ? 1 : 0; ?>);
|
||||
</script>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</div>
|
||||
<!-- End Tabs-->
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,22 +23,26 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
<div id="actions" class="installer" align="center">
|
||||
<div id="page-title">
|
||||
<h1><?php printf(__('Installation %s'), $_getvar('app_version')); ?></h1>
|
||||
<h1><?php
|
||||
printf(__('Installation %s'), $_getvar('app_version')); ?></h1>
|
||||
</div>
|
||||
|
||||
<?php include $this->includePartial('error-list'); ?>
|
||||
<?php
|
||||
include $this->includePartial('error-list'); ?>
|
||||
|
||||
<form id="frmInstall" class="form-action" data-onsubmit="main/install"
|
||||
data-route="install/install">
|
||||
@@ -46,7 +50,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<input type="hidden" name="isAjax" value="1"/>
|
||||
|
||||
<fieldset id="adminaccount">
|
||||
<legend><?php echo __('sysPass Admin'); ?></legend>
|
||||
<legend><?php
|
||||
echo __('sysPass Admin'); ?></legend>
|
||||
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="adminlogin" name="adminlogin" type="text" required
|
||||
@@ -55,15 +60,19 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
tabindex="0"
|
||||
autofocus>
|
||||
<label class="mdl-textfield__label"
|
||||
for="adminlogin"><?php echo __('sysPass admin user'); ?></label>
|
||||
for="adminlogin"><?php
|
||||
echo __('sysPass admin user'); ?></label>
|
||||
</div>
|
||||
|
||||
<div id="help-login"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip" for="help-login">
|
||||
<?php echo __('sysPass administrator\'s login'); ?>
|
||||
<?php
|
||||
echo __('sysPass administrator\'s login'); ?>
|
||||
</div>
|
||||
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -71,19 +80,22 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__input"
|
||||
value="" maxlength="255" autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="adminlogin"><?php echo __('Password'); ?></label>
|
||||
for="adminlogin"><?php
|
||||
echo __('Password'); ?></label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="masterpwd">
|
||||
<legend><?php echo __('Master Password'); ?></legend>
|
||||
<legend><?php
|
||||
echo __('Master Password'); ?></legend>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="masterpassword" name="masterpassword" type="password"
|
||||
required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__input"
|
||||
value="" maxlength="255" autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="masterpassword"><?php echo __('Master Password'); ?></label>
|
||||
for="masterpassword"><?php
|
||||
echo __('Master Password'); ?></label>
|
||||
</div>
|
||||
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -92,12 +104,14 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="" maxlength="255" autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="masterpasswordR"><?php echo __('Password (repeat)'); ?></label>
|
||||
for="masterpasswordR"><?php
|
||||
echo __('Password (repeat)'); ?></label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id='databaseField'>
|
||||
<legend><?php echo __('DB Configuration'), ' (MySQL)'; ?></legend>
|
||||
<legend><?php
|
||||
echo __('DB Configuration'), ' (MySQL)'; ?></legend>
|
||||
|
||||
<input type='hidden' id='hasMySQL' value='true'/>
|
||||
<input type="hidden" id="dbtype" name="dbtype" value="mysql"/>
|
||||
@@ -107,15 +121,19 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="root" autocomplete="off" autofocus>
|
||||
<label class="mdl-textfield__label"
|
||||
for="dbuser"><?php echo __('DB access user'); ?></label>
|
||||
for="dbuser"><?php
|
||||
echo __('DB access user'); ?></label>
|
||||
</div>
|
||||
|
||||
<div id="help-dblogin"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip" for="help-dblogin">
|
||||
<?php echo __('An user with MySQL admin rights'); ?>
|
||||
<?php
|
||||
echo __('An user with MySQL admin rights'); ?>
|
||||
</div>
|
||||
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -123,7 +141,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__input-show"
|
||||
value="" autocomplete="off" autofocus>
|
||||
<label class="mdl-textfield__label"
|
||||
for="dbpass"><?php echo __('DB access password'); ?></label>
|
||||
for="dbpass"><?php
|
||||
echo __('DB access password'); ?></label>
|
||||
</div>
|
||||
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -132,15 +151,19 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
value="syspass" autocomplete="off" autofocus
|
||||
pattern="[0-9a-zA-Z$_-]+">
|
||||
<label class="mdl-textfield__label"
|
||||
for="dbuser"><?php echo __('sysPass database name'); ?></label>
|
||||
for="dbuser"><?php
|
||||
echo __('sysPass database name'); ?></label>
|
||||
</div>
|
||||
|
||||
<div id="help-dbname"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip" for="help-dbname">
|
||||
<?php echo __('sysPass database name'); ?>
|
||||
<?php
|
||||
echo __('sysPass database name'); ?>
|
||||
</div>
|
||||
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -149,43 +172,59 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
value="localhost" autocomplete="off" autofocus
|
||||
pattern="([0-9a-zA-Z._-]+|([0-9]{1,3}.)+)(:[0-9]{1,5})?|unix:.*">
|
||||
<label class="mdl-textfield__label"
|
||||
for="dbhost"><?php echo __('sysPass database server'); ?></label>
|
||||
for="dbhost"><?php
|
||||
echo __('sysPass database server'); ?></label>
|
||||
</div>
|
||||
|
||||
<div id="help-dbhost"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip" for="help-dbhost">
|
||||
<?php echo __('Server name to install sysPass database'); ?>
|
||||
<?php
|
||||
echo __('Server name to install sysPass database'); ?>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="site">
|
||||
<legend><?php echo __('General'); ?></legend>
|
||||
<legend><?php
|
||||
echo __('General'); ?></legend>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="sel-sitelang"><?php echo __('Language'); ?></label>
|
||||
<label for="sel-sitelang"><?php
|
||||
echo __('Language'); ?></label>
|
||||
<select name="sitelang" id="sel-sitelang" size="1"
|
||||
class="select-box"
|
||||
title="<?php echo __('Language'); ?>">
|
||||
<?php /** @var SelectItem $lang */
|
||||
title="<?php
|
||||
echo __('Language'); ?>">
|
||||
<?php
|
||||
/** @var SelectItem $lang */
|
||||
foreach ($_getvar('langs') as $lang): ?>
|
||||
<option value="<?php echo $lang->getId(); ?>" <?php echo $lang->isSelected() ? 'selected' : ''; ?>><?php echo $lang->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
<option value="<?php
|
||||
echo $lang->getId(); ?>" <?php
|
||||
echo $lang->isSelected() ? 'selected' : ''; ?>><?php
|
||||
echo $lang->getName(); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-field">
|
||||
<label for="hostingmode">
|
||||
<?php echo __('Hosting Mode'); ?>
|
||||
<?php
|
||||
echo __('Hosting Mode'); ?>
|
||||
<div id="help-hostingmode"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
|
||||
<div class="mdl-tooltip" for="help-hostingmode">
|
||||
<?php echo __('It does not create or verify the user\'s permissions on the DB'); ?>
|
||||
<?php
|
||||
echo __('It does not create or verify the user\'s permissions on the DB'); ?>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
@@ -202,9 +241,12 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<div class="buttons">
|
||||
<button class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent"
|
||||
type="submit">
|
||||
<?php echo __('Install'); ?>
|
||||
<?php
|
||||
echo __('Install'); ?>
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Install'); ?>"><?php echo $icons->getIconPlay()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Install'); ?>"><?php
|
||||
echo $icons->play()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,10 +23,10 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
* @var SelectItem $client
|
||||
* @var SelectItem $category
|
||||
* @var SelectItem $user
|
||||
@@ -34,107 +34,148 @@
|
||||
* @var SelectItem $tag
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
|
||||
<div class="mdl-tabs__tab-bar">
|
||||
<a href="#general-panel"
|
||||
class="mdl-tabs__tab is-active"><?php echo __('General'); ?></a>
|
||||
class="mdl-tabs__tab is-active"><?php
|
||||
echo __('General'); ?></a>
|
||||
<a href="#permission-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Permissions'); ?></a>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Permissions'); ?></a>
|
||||
<a href="#other-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Others'); ?></a>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Others'); ?></a>
|
||||
</div>
|
||||
|
||||
<form method="post" name="frmAccountBulkEdit" id="frmAccountBulkEdit"
|
||||
class="form-action"
|
||||
data-onsubmit="appMgmt/save"
|
||||
data-action-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-hash="">
|
||||
|
||||
<div class="mdl-tabs__panel is-active" id="general-panel">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Client'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Client'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Client'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Client'); ?></div>
|
||||
|
||||
<select id="client_id" name="client_id"
|
||||
class="select-box">
|
||||
<option value=""><?php echo __('Select Client'); ?></option>
|
||||
<?php foreach ($_getvar('clients') as $client): ?>
|
||||
<option value=""><?php
|
||||
echo __('Select Client'); ?></option>
|
||||
<?php
|
||||
foreach ($_getvar('clients') as $client): ?>
|
||||
<option
|
||||
value="<?php echo $client->getId(); ?>"><?php echo htmlspecialchars($client->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $client->getId(); ?>"><?php
|
||||
echo htmlspecialchars($client->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Category'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Category'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Category'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Category'); ?></div>
|
||||
|
||||
<select id="category_id" name="category_id"
|
||||
class="select-box">
|
||||
<option value=""><?php echo __('Select Category'); ?></option>
|
||||
<?php foreach ($_getvar('categories') as $category): ?>
|
||||
<option value=""><?php
|
||||
echo __('Select Category'); ?></option>
|
||||
<?php
|
||||
foreach ($_getvar('categories') as $category): ?>
|
||||
<option
|
||||
value="<?php echo $category->getId(); ?>"><?php echo htmlspecialchars($category->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $category->getId(); ?>"><?php
|
||||
echo htmlspecialchars($category->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Creator'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Creator'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Creator'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Creator'); ?></div>
|
||||
|
||||
<select id="owner_id" name="owner_id"
|
||||
class="select-box">
|
||||
<option value=""><?php echo __('Select User'); ?></option>
|
||||
<?php foreach ($_getvar('users') as $user): ?>
|
||||
<option value=""><?php
|
||||
echo __('Select User'); ?></option>
|
||||
<?php
|
||||
foreach ($_getvar('users') as $user): ?>
|
||||
<option
|
||||
value="<?php echo $user->getId(); ?>"><?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $user->getId(); ?>"><?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Main Group'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Main Group'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Main Group'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Main Group'); ?></div>
|
||||
|
||||
<select id="main_usergroup_id"
|
||||
name="main_usergroup_id" class="select-box">
|
||||
<option value=""><?php echo __('Select Group'); ?></option>
|
||||
<?php foreach ($_getvar('userGroups') as $group): ?>
|
||||
<option value=""><?php
|
||||
echo __('Select Group'); ?></option>
|
||||
<?php
|
||||
foreach ($_getvar('userGroups') as $group): ?>
|
||||
<option
|
||||
value="<?php echo $group->getId(); ?>"><?php echo htmlspecialchars($group->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $group->getId(); ?>"><?php
|
||||
echo htmlspecialchars($group->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Tags'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Tags'); ?></td>
|
||||
<td class="valField">
|
||||
<select id="tags" name="tags[]" multiple="multiple"
|
||||
class="select-box-tags">
|
||||
<option value=""><?php echo __('Select Tags'); ?></option>
|
||||
<?php foreach ($_getvar('tags') as $tag): ?>
|
||||
<option value="<?php echo $tag->getId(); ?>"><?php echo htmlspecialchars($tag->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
<option value=""><?php
|
||||
echo __('Select Tags'); ?></option>
|
||||
<?php
|
||||
foreach ($_getvar('tags') as $tag): ?>
|
||||
<option value="<?php
|
||||
echo $tag->getId(); ?>"><?php
|
||||
echo htmlspecialchars($tag->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -146,7 +187,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Users'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Users'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="account-permissions">
|
||||
<div class="tag-list-box">
|
||||
@@ -154,15 +196,22 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
name="other_users_view[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags">
|
||||
<option value=""><?php echo __('Select Users'); ?></option>
|
||||
<?php foreach ($_getvar('users') as $user): ?>
|
||||
<option value=""><?php
|
||||
echo __('Select Users'); ?></option>
|
||||
<?php
|
||||
foreach ($_getvar('users') as $user): ?>
|
||||
<option
|
||||
value="<?php echo $user->getId(); ?>"><?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $user->getId(); ?>"><?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('View'); ?>"><?php echo $icons->getIconView()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('View'); ?>"><?php
|
||||
echo $icons->view()->getIcon(); ?></i>
|
||||
</div>
|
||||
|
||||
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect"
|
||||
@@ -171,7 +220,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
id="clear_permission_users_view"
|
||||
class="mdl-checkbox__input"
|
||||
name="clear_permission_users_view">
|
||||
<span class="mdl-checkbox__label"><?php echo __('Delete'); ?></span>
|
||||
<span class="mdl-checkbox__label"><?php
|
||||
echo __('Delete'); ?></span>
|
||||
</label>
|
||||
|
||||
<div class="tag-list-box">
|
||||
@@ -179,15 +229,22 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
name="other_users_edit[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags">
|
||||
<option value=""><?php echo __('Select Users'); ?></option>
|
||||
<?php foreach ($_getvar('users') as $user): ?>
|
||||
<option value=""><?php
|
||||
echo __('Select Users'); ?></option>
|
||||
<?php
|
||||
foreach ($_getvar('users') as $user): ?>
|
||||
<option
|
||||
value="<?php echo $user->getId(); ?>"><?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $user->getId(); ?>"><?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('Edit'); ?>"><?php echo $icons->getIconEdit()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Edit'); ?>"><?php
|
||||
echo $icons->edit()->getIcon(); ?></i>
|
||||
</div>
|
||||
|
||||
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect"
|
||||
@@ -196,14 +253,16 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
id="clear_permission_users_edit"
|
||||
class="mdl-checkbox__input"
|
||||
name="clear_permission_users_edit">
|
||||
<span class="mdl-checkbox__label"><?php echo __('Delete'); ?></span>
|
||||
<span class="mdl-checkbox__label"><?php
|
||||
echo __('Delete'); ?></span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Groups'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Groups'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="account-permissions">
|
||||
<div class="tag-list-box">
|
||||
@@ -211,15 +270,22 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
name="other_usergroups_view[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags">
|
||||
<option value=""><?php echo __('Select Groups'); ?></option>
|
||||
<?php foreach ($_getvar('userGroups') as $userGroup): ?>
|
||||
<option value=""><?php
|
||||
echo __('Select Groups'); ?></option>
|
||||
<?php
|
||||
foreach ($_getvar('userGroups') as $userGroup): ?>
|
||||
<option
|
||||
value="<?php echo $userGroup->getId(); ?>"><?php echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $userGroup->getId(); ?>"><?php
|
||||
echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('View'); ?>"><?php echo $icons->getIconView()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('View'); ?>"><?php
|
||||
echo $icons->view()->getIcon(); ?></i>
|
||||
</div>
|
||||
|
||||
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect"
|
||||
@@ -228,7 +294,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
id="clear_permission_usergroups_view"
|
||||
class="mdl-checkbox__input"
|
||||
name="clear_permission_usergroups_view">
|
||||
<span class="mdl-checkbox__label"><?php echo __('Delete'); ?></span>
|
||||
<span class="mdl-checkbox__label"><?php
|
||||
echo __('Delete'); ?></span>
|
||||
</label>
|
||||
|
||||
<div class="tag-list-box">
|
||||
@@ -236,15 +303,22 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
name="other_usergroups_edit[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags">
|
||||
<option value=""><?php echo __('Select Groups'); ?></option>
|
||||
<?php foreach ($_getvar('userGroups') as $userGroup): ?>
|
||||
<option value=""><?php
|
||||
echo __('Select Groups'); ?></option>
|
||||
<?php
|
||||
foreach ($_getvar('userGroups') as $userGroup): ?>
|
||||
<option
|
||||
value="<?php echo $userGroup->getId(); ?>"><?php echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $userGroup->getId(); ?>"><?php
|
||||
echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('Edit'); ?>"><?php echo $icons->getIconEdit()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Edit'); ?>"><?php
|
||||
echo $icons->edit()->getIcon(); ?></i>
|
||||
</div>
|
||||
|
||||
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect"
|
||||
@@ -253,7 +327,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
id="clear_permission_usergroups_edit"
|
||||
class="mdl-checkbox__input"
|
||||
name="clear_permission_usergroups_edit">
|
||||
<span class="mdl-checkbox__label"><?php echo __('Delete'); ?></span>
|
||||
<span class="mdl-checkbox__label"><?php
|
||||
echo __('Delete'); ?></span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
@@ -281,9 +356,11 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Delete History'); ?></span>
|
||||
<span><?php
|
||||
echo __('Delete History'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Delete History'); ?>
|
||||
<?php
|
||||
echo __('Delete History'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -292,7 +369,8 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password Expiry Date'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password Expiry Date'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="password_date_expire"
|
||||
@@ -303,10 +381,12 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
name='password_date_expire_unix'
|
||||
value=""/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="password_date_expire"><?php echo __('Date'); ?></label>
|
||||
for="password_date_expire"><?php
|
||||
echo __('Date'); ?></label>
|
||||
</div>
|
||||
<i class="material-icons btn-action"
|
||||
title="<?php echo __('Select date'); ?>">date_range</i>
|
||||
title="<?php
|
||||
echo __('Select date'); ?>">date_range</i>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -315,16 +395,20 @@ use SP\Mvc\View\Components\SelectItem;
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="itemsId"
|
||||
value="<?php echo implode(',', $_getvar('itemsId')); ?>">
|
||||
value="<?php
|
||||
echo implode(',', $_getvar('itemsId')); ?>">
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="action-in-box">
|
||||
<button form="frmAccountBulkEdit"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,95 +24,132 @@
|
||||
|
||||
/**
|
||||
* @var AuthTokenData $authToken
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\AuthTokenData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$authToken = $_getvar('authToken');
|
||||
?>
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<form method="post" name="frmTokens" id="frmTokens" class="form-action"
|
||||
data-onsubmit="appMgmt/save"
|
||||
data-action-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-hash="">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('User'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('User'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('User'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('User'); ?></div>
|
||||
|
||||
<select id="selUsers" name="users" class="select-box"
|
||||
required <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select User'); ?></option>
|
||||
<?php /** @var SelectItem $user */
|
||||
required <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select User'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $user */
|
||||
foreach ($_getvar('users') as $user): ?>
|
||||
<option value="<?php echo $user->getId(); ?>" <?php echo $user->isSelected() ? 'selected' : ''; ?>><?php printf('%s (%s)', htmlspecialchars($user->getName(), ENT_QUOTES), htmlspecialchars($user->getItemProperty('login'), ENT_QUOTES)); ?></option>
|
||||
<?php endforeach; ?>
|
||||
<option value="<?php
|
||||
echo $user->getId(); ?>" <?php
|
||||
echo $user->isSelected() ? 'selected' : ''; ?>><?php
|
||||
printf(
|
||||
'%s (%s)',
|
||||
htmlspecialchars($user->getName(), ENT_QUOTES),
|
||||
htmlspecialchars($user->getItemProperty('login'), ENT_QUOTES)
|
||||
); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Action'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Action'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Action'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Action'); ?></div>
|
||||
|
||||
<select id="selActions" name="actions"
|
||||
class="select-box"
|
||||
required <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Action'); ?></option>
|
||||
<?php /** @var SelectItem $action */
|
||||
required <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Action'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $action */
|
||||
foreach ($_getvar('actions') as $action): ?>
|
||||
<option value="<?php echo $action->getId(); ?>" <?php echo $action->isSelected() ? 'selected' : ''; ?>><?php echo htmlspecialchars($action->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
<option value="<?php
|
||||
echo $action->getId(); ?>" <?php
|
||||
echo $action->isSelected() ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($action->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if (!$_getvar('isView')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView')): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="pass" name="pass" type="password"
|
||||
class="mdl-textfield__input passwordfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50">
|
||||
<label class="mdl-textfield__label"
|
||||
for="pass"><?php echo __('Password'); ?></label>
|
||||
for="pass"><?php
|
||||
echo __('Password'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Options'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Options'); ?></td>
|
||||
<td class="valField">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect"
|
||||
for="refreshtoken"
|
||||
title="<?php echo __('Refresh Authorization'); ?>">
|
||||
title="<?php
|
||||
echo __('Refresh Authorization'); ?>">
|
||||
<input type="checkbox" id="refreshtoken"
|
||||
class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="refreshtoken"/>
|
||||
<span class="mdl-switch__label"><?php echo __('Refresh Authorization'); ?></span>
|
||||
<span class="mdl-switch__label"><?php
|
||||
echo __('Refresh Authorization'); ?></span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Token'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Token'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Token'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Token'); ?></div>
|
||||
|
||||
<?php echo $authToken->getToken(); ?>
|
||||
<?php
|
||||
echo $authToken->getToken(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -120,10 +157,13 @@ $authToken = $_getvar('authToken');
|
||||
</form>
|
||||
<div class="action-in-box">
|
||||
<button
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
form="frmTokens"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,57 +24,70 @@
|
||||
|
||||
/**
|
||||
* @var CategoryData $category
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\CategoryData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$category = $_getvar('category');
|
||||
?>
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<form method="post" name="frmCategories" id="frmCategories"
|
||||
class="form-action"
|
||||
data-onsubmit="appMgmt/save"
|
||||
data-action-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-hash="">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="name" name="name" type="text" required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50"
|
||||
value="<?php echo htmlspecialchars($category->getName(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($category->getName(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Category name'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Category name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Description'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Description'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="description" name="description" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50"
|
||||
value="<?php echo htmlspecialchars($category->getDescription(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($category->getDescription(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="description"><?php echo __('Category description'); ?></label>
|
||||
for="description"><?php
|
||||
echo __('Category description'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($_getvar('customFields')): ?>
|
||||
<?php include $this->includeTemplate('aux-customfields', 'common'); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($_getvar('customFields')): ?>
|
||||
<?php
|
||||
include $this->includeTemplate('aux-customfields', 'common'); ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -82,10 +95,13 @@ $category = $_getvar('category');
|
||||
</form>
|
||||
<div class="action-in-box">
|
||||
<button
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
form="frmCategories"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,52 +24,62 @@
|
||||
|
||||
/**
|
||||
* @var ClientData $client
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\ClientData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$client = $_getvar('client');
|
||||
?>
|
||||
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<form method="post" name="frmClients" id="frmClients" class="form-action"
|
||||
data-onsubmit="appMgmt/save"
|
||||
data-action-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-hash="">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="name" name="name" type="text" required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50"
|
||||
value="<?php echo htmlspecialchars($client->getName(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($client->getName(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Client name'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Client name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Description'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Description'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="description" name="description" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50"
|
||||
value="<?php echo htmlspecialchars($client->getDescription(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($client->getDescription(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="description"><?php echo __('Client description'); ?></label>
|
||||
for="description"><?php
|
||||
echo __('Client description'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -77,14 +87,20 @@ $client = $_getvar('client');
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<div id="help-isglobal"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-isglobal">
|
||||
<p>
|
||||
<?php echo __('Sets whether the client is visible by all users'); ?>
|
||||
<?php
|
||||
echo __('Sets whether the client is visible by all users'); ?>
|
||||
</p>
|
||||
<p>
|
||||
<?php echo __('By default, clients assigned to accounts only will be visible by users who are granted to access to the accounts.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'By default, clients assigned to accounts only will be visible by users who are granted to access to the accounts.'
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -93,15 +109,20 @@ $client = $_getvar('client');
|
||||
for="isglobal">
|
||||
<input type="checkbox" id="isglobal"
|
||||
class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="isglobal" <?php echo $client->getIsGlobal() ? 'checked' : ' '; ?>/>
|
||||
<span class="mdl-switch__label"><?php echo __('Global'); ?></span>
|
||||
name="isglobal" <?php
|
||||
echo $client->getIsGlobal() ? 'checked' : ' '; ?>/>
|
||||
<span class="mdl-switch__label"><?php
|
||||
echo __('Global'); ?></span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($_getvar('customFields')): ?>
|
||||
<?php include $this->includeTemplate('aux-customfields', 'common'); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($_getvar('customFields')): ?>
|
||||
<?php
|
||||
include $this->includeTemplate('aux-customfields', 'common'); ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -109,10 +130,13 @@ $client = $_getvar('client');
|
||||
</form>
|
||||
<div class="action-in-box">
|
||||
<button
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
form="frmClients"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,82 +24,106 @@
|
||||
|
||||
/**
|
||||
* @var CustomFieldDefinitionData $field
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\CustomFieldDefinitionData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$field = $_getvar('field');
|
||||
?>
|
||||
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<form method="post" name="frmCustomFields" id="frmCustomFields"
|
||||
class="form-action"
|
||||
data-onsubmit="appMgmt/save"
|
||||
data-action-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-hash="">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="name" name="name" type="text" required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50"
|
||||
value="<?php echo htmlspecialchars($field->getName(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($field->getName(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Field name'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Field name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Type'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Type'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Type'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Type'); ?></div>
|
||||
|
||||
<select name="type" id="sel-type" size="1"
|
||||
class="select-box">
|
||||
<?php /** @var SelectItem $type */
|
||||
<?php
|
||||
/** @var SelectItem $type */
|
||||
foreach ($_getvar('types') as $type): ?>
|
||||
<option
|
||||
value='<?php echo $type->getId(); ?>' <?php echo ($type->getId() === $field->getTypeId()) ? 'selected' : ''; ?>><?php echo __($type->getItemProperty('text')); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value='<?php
|
||||
echo $type->getId(); ?>' <?php
|
||||
echo ($type->getId() === $field->getTypeId()) ? 'selected' : ''; ?>><?php
|
||||
echo __($type->getItemProperty('text')); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Module'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Module'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Module'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Module'); ?></div>
|
||||
|
||||
<select name="module" id="sel-module" size="1"
|
||||
class="select-box">
|
||||
<?php /** @var SelectItem $module */
|
||||
<?php
|
||||
/** @var SelectItem $module */
|
||||
foreach ($_getvar('modules') as $module): ?>
|
||||
<option
|
||||
value='<?php echo $module->getId(); ?>' <?php echo $module->isSelected() ? 'selected' : ''; ?>><?php echo $module->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value='<?php
|
||||
echo $module->getId(); ?>' <?php
|
||||
echo $module->isSelected() ? 'selected' : ''; ?>><?php
|
||||
echo $module->getName(); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Help Text'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Help Text'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="help" name="help" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo $field->getHelp(); ?>">
|
||||
value="<?php
|
||||
echo $field->getHelp(); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="help"><?php echo __('Field\'s help'); ?></label>
|
||||
for="help"><?php
|
||||
echo __('Field\'s help'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -111,8 +135,10 @@ $field = $_getvar('field');
|
||||
<input type="checkbox" id="required"
|
||||
class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="required"
|
||||
<?php echo $field->getRequired() ? 'checked' : ''; ?>/>
|
||||
<span class="mdl-switch__label"><?php echo __('Required'); ?></span>
|
||||
<?php
|
||||
echo $field->getRequired() ? 'checked' : ''; ?>/>
|
||||
<span class="mdl-switch__label"><?php
|
||||
echo __('Required'); ?></span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -123,8 +149,10 @@ $field = $_getvar('field');
|
||||
for="encrypted">
|
||||
<input type="checkbox" id="encrypted"
|
||||
class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="encrypted" <?php echo $field->getisEncrypted() ? 'checked' : ''; ?>/>
|
||||
<span class="mdl-switch__label"><?php echo __('Encrypted'); ?></span>
|
||||
name="encrypted" <?php
|
||||
echo $field->getisEncrypted() ? 'checked' : ''; ?>/>
|
||||
<span class="mdl-switch__label"><?php
|
||||
echo __('Encrypted'); ?></span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -135,10 +163,13 @@ $field = $_getvar('field');
|
||||
</form>
|
||||
<div class="action-in-box">
|
||||
<button
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
form="frmCustomFields"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,22 +24,31 @@
|
||||
|
||||
/**
|
||||
* @var FileData $fileData
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\FileData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$fileData = $_getvar('fileData');
|
||||
?>
|
||||
|
||||
<?php if ($_getvar('isImage')): ?>
|
||||
<img src="data:'<?php echo $fileData->getType(); ?>;base64, <?php echo $_getvar('data'); ?>"
|
||||
<?php
|
||||
if ($_getvar('isImage')): ?>
|
||||
<img src="data:'<?php
|
||||
echo $fileData->getType(); ?>;base64, <?php
|
||||
echo $_getvar('data'); ?>"
|
||||
border="0"/>
|
||||
<div class="title"><?php echo htmlspecialchars($fileData->getName(), ENT_QUOTES); ?></div>
|
||||
<?php else: ?>
|
||||
<pre><?php echo $_getvar('data'); ?></pre>
|
||||
<?php endif; ?>
|
||||
<div class="title"><?php
|
||||
echo htmlspecialchars($fileData->getName(), ENT_QUOTES); ?></div>
|
||||
<?php
|
||||
else: ?>
|
||||
<pre><?php
|
||||
echo $_getvar('data'); ?></pre>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,14 +24,16 @@
|
||||
|
||||
/**
|
||||
* @var Password $password
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\ItemPreset\Password;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$password = $_getvar('password');
|
||||
?>
|
||||
@@ -39,57 +41,70 @@ $password = $_getvar('password');
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Length'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Length'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="timeout" name="length" type="number"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
min="1" max="100"
|
||||
value="<?php echo $password->getLength() ?: 1; ?>"/>
|
||||
value="<?php
|
||||
echo $password->getLength() ?: 1; ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="length"><?php echo __('Length'); ?></label>
|
||||
for="length"><?php
|
||||
echo __('Length'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Accounts password expiry'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Accounts password expiry'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="expire_time" name="expire_time" type="number"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
min="0"
|
||||
value="<?php echo $password->getExpireTime() ? $password->getExpireTime() / $_getvar('expireTimeMultiplier') : 1; ?>"/>
|
||||
value="<?php
|
||||
echo $password->getExpireTime() ? $password->getExpireTime() /
|
||||
$_getvar('expireTimeMultiplier') : 1; ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="expire_time"><?php echo __('Expire time (days)'); ?></label>
|
||||
for="expire_time"><?php
|
||||
echo __('Expire time (days)'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Score'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Score'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="score" name="score" type="number"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
min="0" max="5"
|
||||
value="<?php echo $password->getScore(); ?>"
|
||||
value="<?php
|
||||
echo $password->getScore(); ?>"
|
||||
disabled="disabled" readonly/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="score"><?php echo __('Score'); ?></label>
|
||||
for="score"><?php
|
||||
echo __('Score'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Regular Expression'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Regular Expression'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="regex" name="regex" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($password->getRegex(), ENT_QUOTES); ?>"/>
|
||||
value="<?php
|
||||
echo htmlspecialchars($password->getRegex(), ENT_QUOTES); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="regex"><?php echo __('Regular Expression'); ?></label>
|
||||
for="regex"><?php
|
||||
echo __('Regular Expression'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -104,12 +119,14 @@ $password = $_getvar('password');
|
||||
for="use_numbers_enabled">
|
||||
<input type="checkbox" id="use_numbers_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="use_numbers_enabled" <?php echo $password->isUseNumbers() ? 'checked' : ''; ?>/>
|
||||
name="use_numbers_enabled" <?php
|
||||
echo $password->isUseNumbers() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Include Numbers'); ?></span>
|
||||
<span><?php
|
||||
echo __('Include Numbers'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -119,12 +136,14 @@ $password = $_getvar('password');
|
||||
for="use_letters_enabled">
|
||||
<input type="checkbox" id="use_letters_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="use_letters_enabled" <?php echo $password->isUseLetters() ? 'checked' : ''; ?>/>
|
||||
name="use_letters_enabled" <?php
|
||||
echo $password->isUseLetters() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Include Letters'); ?></span>
|
||||
<span><?php
|
||||
echo __('Include Letters'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -134,12 +153,14 @@ $password = $_getvar('password');
|
||||
for="use_symbols_enabled">
|
||||
<input type="checkbox" id="use_symbols_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="use_symbols_enabled" <?php echo $password->isUseSymbols() ? 'checked' : ''; ?>/>
|
||||
name="use_symbols_enabled" <?php
|
||||
echo $password->isUseSymbols() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Include Symbols'); ?></span>
|
||||
<span><?php
|
||||
echo __('Include Symbols'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -149,12 +170,14 @@ $password = $_getvar('password');
|
||||
for="use_upper_enabled">
|
||||
<input type="checkbox" id="use_upper_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="use_upper_enabled" <?php echo $password->isUseUpper() ? 'checked' : ''; ?>/>
|
||||
name="use_upper_enabled" <?php
|
||||
echo $password->isUseUpper() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Include Uppercase'); ?></span>
|
||||
<span><?php
|
||||
echo __('Include Uppercase'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -164,12 +187,14 @@ $password = $_getvar('password');
|
||||
for="use_lower_enabled">
|
||||
<input type="checkbox" id="use_lower_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="use_lower_enabled" <?php echo $password->isUseLower() ? 'checked' : ''; ?>/>
|
||||
name="use_lower_enabled" <?php
|
||||
echo $password->isUseLower() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Include Lowercase'); ?></span>
|
||||
<span><?php
|
||||
echo __('Include Lowercase'); ?></span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -179,16 +204,22 @@ $password = $_getvar('password');
|
||||
for="use_image_enabled">
|
||||
<input type="checkbox" id="use_image_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="use_image_enabled" <?php echo $password->isUseImage() ? 'checked' : ''; ?>/>
|
||||
name="use_image_enabled" <?php
|
||||
echo $password->isUseImage() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Image to show password'); ?></span>
|
||||
<span><?php
|
||||
echo __('Image to show password'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Generate an image with a text of the account password.'); ?>
|
||||
<?php
|
||||
echo __('Generate an image with a text of the account password.'); ?>
|
||||
<br>
|
||||
<?php echo __('Useful for environments where copying a password to clipboard is a security risk.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'Useful for environments where copying a password to clipboard is a security risk.'
|
||||
); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,99 +23,139 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Users'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Users'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="account-permissions">
|
||||
<div class="tag-list-box">
|
||||
<select id="users_view" name="users_view[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags">
|
||||
<option value=""><?php echo __('Select Users'); ?></option>
|
||||
<?php /** @var SelectItem $user */
|
||||
<option value=""><?php
|
||||
echo __('Select Users'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $user */
|
||||
foreach ($_getvar('usersView') as $user): ?>
|
||||
<?php if ($user->isSkip()): continue; endif; ?>
|
||||
<?php
|
||||
if ($user->isSkip()): continue; endif; ?>
|
||||
<option
|
||||
value="<?php echo $user->getId(); ?>"
|
||||
<?php echo $user->isSelected() ? 'selected' : '' ?>><?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $user->getId(); ?>"
|
||||
<?php
|
||||
echo $user->isSelected() ? 'selected' : '' ?>><?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('View'); ?>"><?php echo $icons->getIconView()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('View'); ?>"><?php
|
||||
echo $icons->view()->getIcon(); ?></i>
|
||||
</div>
|
||||
|
||||
<div class="tag-list-box">
|
||||
<select id="users_edit" name="users_edit[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags">
|
||||
<option value=""><?php echo __('Select Users'); ?></option>
|
||||
<?php /** @var SelectItem $user */
|
||||
<option value=""><?php
|
||||
echo __('Select Users'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $user */
|
||||
foreach ($_getvar('usersEdit') as $user): ?>
|
||||
<?php if ($user->isSkip()): continue; endif; ?>
|
||||
<?php
|
||||
if ($user->isSkip()): continue; endif; ?>
|
||||
<option
|
||||
value="<?php echo $user->getId(); ?>"
|
||||
<?php echo $user->isSelected() ? 'selected' : '' ?>><?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $user->getId(); ?>"
|
||||
<?php
|
||||
echo $user->isSelected() ? 'selected' : '' ?>><?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('Edit'); ?>"><?php echo $icons->getIconEdit()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Edit'); ?>"><?php
|
||||
echo $icons->edit()->getIcon(); ?></i>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Groups'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Groups'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="account-permissions">
|
||||
<div class="tag-list-box">
|
||||
<select id="user_groups_view" name="user_groups_view[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags">
|
||||
<option value=""><?php echo __('Select Groups'); ?></option>
|
||||
<?php /** @var SelectItem $userGroup */
|
||||
<option value=""><?php
|
||||
echo __('Select Groups'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $userGroup */
|
||||
foreach ($_getvar('userGroupsView') as $userGroup): ?>
|
||||
<?php if ($userGroup->isSkip()): continue; endif; ?>
|
||||
<?php
|
||||
if ($userGroup->isSkip()): continue; endif; ?>
|
||||
<option
|
||||
value="<?php echo $userGroup->getId(); ?>"
|
||||
<?php echo $userGroup->isSelected() ? 'selected' : '' ?>><?php echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $userGroup->getId(); ?>"
|
||||
<?php
|
||||
echo $userGroup->isSelected() ? 'selected' : '' ?>><?php
|
||||
echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('View'); ?>"><?php echo $icons->getIconView()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('View'); ?>"><?php
|
||||
echo $icons->view()->getIcon(); ?></i>
|
||||
</div>
|
||||
|
||||
<div class="tag-list-box">
|
||||
<select id="user_groups_edit" name="user_groups_edit[]"
|
||||
multiple="multiple"
|
||||
class="select-box-tags">
|
||||
<option value=""><?php echo __('Select Groups'); ?></option>
|
||||
<?php /** @var SelectItem $userGroup */
|
||||
<option value=""><?php
|
||||
echo __('Select Groups'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $userGroup */
|
||||
foreach ($_getvar('userGroupsEdit') as $userGroup): ?>
|
||||
<?php if ($userGroup->isSkip()): continue; endif; ?>
|
||||
<?php
|
||||
if ($userGroup->isSkip()): continue; endif; ?>
|
||||
<option
|
||||
value="<?php echo $userGroup->getId(); ?>"
|
||||
<?php echo $userGroup->isSelected() ? 'selected' : '' ?>><?php echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $userGroup->getId(); ?>"
|
||||
<?php
|
||||
echo $userGroup->isSelected() ? 'selected' : '' ?>><?php
|
||||
echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
|
||||
<i class="material-icons select-icon"
|
||||
title="<?php echo __('Edit'); ?>"><?php echo $icons->getIconEdit()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Edit'); ?>"><?php
|
||||
echo $icons->edit()->getIcon(); ?></i>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,14 +24,16 @@
|
||||
|
||||
/**
|
||||
* @var AccountPrivate $private
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\ItemPreset\AccountPrivate;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$private = $_getvar('private');
|
||||
?>
|
||||
@@ -48,16 +50,20 @@ $private = $_getvar('private');
|
||||
for="private_user_enabled">
|
||||
<input type="checkbox" id="private_user_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="private_user_enabled" <?php echo $private->isPrivateUser() ? 'checked' : ''; ?>/>
|
||||
name="private_user_enabled" <?php
|
||||
echo $private->isPrivateUser() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Private Account'); ?></span>
|
||||
<span><?php
|
||||
echo __('Private Account'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Accounts will be only visible by the user.'); ?>
|
||||
<?php
|
||||
echo __('Accounts will be only visible by the user.'); ?>
|
||||
<br>
|
||||
<?php echo __('Administrators won\'t be able to display the accounts.'); ?>
|
||||
<?php
|
||||
echo __('Administrators won\'t be able to display the accounts.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -68,16 +74,22 @@ $private = $_getvar('private');
|
||||
for="private_group_enabled">
|
||||
<input type="checkbox" id="private_group_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="private_group_enabled" <?php echo $private->isPrivateGroup() ? 'checked' : ''; ?>/>
|
||||
name="private_group_enabled" <?php
|
||||
echo $private->isPrivateGroup() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Private Account for Group'); ?></span>
|
||||
<span><?php
|
||||
echo __('Private Account for Group'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Accounts will be only visible by the user and users belonging to the main group.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'Accounts will be only visible by the user and users belonging to the main group.'
|
||||
); ?>
|
||||
<br>
|
||||
<?php echo __('Administrators won\'t be able to display the accounts.'); ?>
|
||||
<?php
|
||||
echo __('Administrators won\'t be able to display the accounts.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,14 +24,16 @@
|
||||
|
||||
/**
|
||||
* @var SessionTimeout $sessionTimeout
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\ItemPreset\SessionTimeout;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$sessionTimeout = $_getvar('sessionTimeout');
|
||||
?>
|
||||
@@ -39,28 +41,34 @@ $sessionTimeout = $_getvar('sessionTimeout');
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('IP Address'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('IP Address'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="ip_address" name="ip_address" type="text" required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="33"
|
||||
value="<?php printf('%s/%s', $sessionTimeout->getAddress(), $sessionTimeout->getMask()); ?>">
|
||||
value="<?php
|
||||
printf('%s/%s', $sessionTimeout->getAddress(), $sessionTimeout->getMask()); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="ip_address"><?php echo __('IP Address'); ?></label>
|
||||
for="ip_address"><?php
|
||||
echo __('IP Address'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Timeout'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Timeout'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="timeout" name="timeout" type="number" required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
min="0" max="604800"
|
||||
value="<?php echo $sessionTimeout->getTimeout(); ?>">
|
||||
value="<?php
|
||||
echo $sessionTimeout->getTimeout(); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="ip_address"><?php echo __('Timeout'); ?></label>
|
||||
for="ip_address"><?php
|
||||
echo __('Timeout'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,104 +24,146 @@
|
||||
|
||||
/**
|
||||
* @var ItemPreset $preset
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Account\Models\ItemPreset;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$preset = $_getvar('preset');
|
||||
?>
|
||||
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
|
||||
<div class="mdl-tabs__tab-bar">
|
||||
<a href="#general-panel"
|
||||
class="mdl-tabs__tab is-active"><?php echo __('General'); ?></a>
|
||||
class="mdl-tabs__tab is-active"><?php
|
||||
echo __('General'); ?></a>
|
||||
<a href="#presets-panel"
|
||||
class="mdl-tabs__tab"><?php echo $_getvar('presetName'); ?></a>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo $_getvar('presetName'); ?></a>
|
||||
</div>
|
||||
|
||||
<form method="post" name="frmItemPreset" id="frmItemPreset"
|
||||
class="form-action"
|
||||
data-onsubmit="appMgmt/save"
|
||||
data-action-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-hash="">
|
||||
|
||||
<div class="mdl-tabs__panel is-active" id="general-panel">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('User'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('User'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('User'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('User'); ?></div>
|
||||
|
||||
<select id="selUser" name="user_id"
|
||||
class="select-box select-box-deselect"
|
||||
title="<?php echo __('User'); ?>" <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select User'); ?></option>
|
||||
<?php /** @var SelectItem $user */
|
||||
title="<?php
|
||||
echo __('User'); ?>" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select User'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $user */
|
||||
foreach ($_getvar('users') as $user): ?>
|
||||
<option
|
||||
value="<?php echo $user->getId(); ?>" <?php echo $user->isSelected() ? 'selected' : ''; ?>><?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $user->getId(); ?>" <?php
|
||||
echo $user->isSelected() ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Group'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Group'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Group'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Group'); ?></div>
|
||||
|
||||
<select id="selUserGroup" name="user_group_id"
|
||||
class="select-box select-box-deselect"
|
||||
title="<?php echo __('Group'); ?>" <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Group'); ?></option>
|
||||
<?php /** @var SelectItem $userGroup */
|
||||
title="<?php
|
||||
echo __('Group'); ?>" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Group'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $userGroup */
|
||||
foreach ($_getvar('userGroups') as $userGroup): ?>
|
||||
<option
|
||||
value="<?php echo $userGroup->getId(); ?>" <?php echo $userGroup->isSelected() ? 'selected' : ''; ?>><?php echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $userGroup->getId(); ?>" <?php
|
||||
echo $userGroup->isSelected() ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($userGroup->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Profile'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Profile'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Profile'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Profile'); ?></div>
|
||||
|
||||
<select id="selUserProfile" name="user_profile_id"
|
||||
class="select-box select-box-deselect"
|
||||
title="<?php echo __('Profile'); ?>" <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Profile'); ?></option>
|
||||
<?php /** @var SelectItem $userProfile */
|
||||
title="<?php
|
||||
echo __('Profile'); ?>" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Profile'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $userProfile */
|
||||
foreach ($_getvar('userProfiles') as $userProfile): ?>
|
||||
<option
|
||||
value="<?php echo $userProfile->getId(); ?>" <?php echo $userProfile->isSelected() ? 'selected' : ''; ?>><?php echo htmlspecialchars($userProfile->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $userProfile->getId(); ?>" <?php
|
||||
echo $userProfile->isSelected() ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($userProfile->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Priority'); ?>
|
||||
<?php
|
||||
echo __('Priority'); ?>
|
||||
|
||||
<div id="help-priority"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-priority">
|
||||
<p>
|
||||
<?php echo __('Assignment priority if values match with others assigned by user, group or profile.'); ?>
|
||||
<?php
|
||||
echo __(
|
||||
'Assignment priority if values match with others assigned by user, group or profile.'
|
||||
); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -132,9 +174,11 @@ $preset = $_getvar('preset');
|
||||
pattern="[0-9]{1,3}"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="3" min="0" max="128"
|
||||
value="<?php echo $preset->getPriority(); ?>"/>
|
||||
value="<?php
|
||||
echo $preset->getPriority(); ?>"/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="priority"><?php echo __('Assignment Priority'); ?></label>
|
||||
for="priority"><?php
|
||||
echo __('Assignment Priority'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -150,16 +194,20 @@ $preset = $_getvar('preset');
|
||||
<input type="checkbox"
|
||||
id="fixed_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="fixed_enabled" <?php echo $preset->getFixed() ? 'checked' : ''; ?>/>
|
||||
name="fixed_enabled" <?php
|
||||
echo $preset->getFixed() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Forced'); ?></span>
|
||||
<span><?php
|
||||
echo __('Forced'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Enforces the values to be set either on creating or updating an item.'); ?>
|
||||
<?php
|
||||
echo __('Enforces the values to be set either on creating or updating an item.'); ?>
|
||||
<br>
|
||||
<?php echo __('Values will be merged with the existing ones.'); ?>
|
||||
<?php
|
||||
echo __('Values will be merged with the existing ones.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -171,22 +219,30 @@ $preset = $_getvar('preset');
|
||||
</div>
|
||||
|
||||
<div class="mdl-tabs__panel" id="presets-panel">
|
||||
<?php if ($_getvar('typeTemplate')) : include $this->includeTemplate($_getvar('typeTemplate'), 'itemshow'); endif; ?>
|
||||
<?php
|
||||
if ($_getvar('typeTemplate')) : include $this->includeTemplate(
|
||||
$_getvar('typeTemplate'),
|
||||
'itemshow'
|
||||
); endif; ?>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" name="type"
|
||||
value="<?php echo $preset->getType(); ?>">
|
||||
value="<?php
|
||||
echo $preset->getType(); ?>">
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</form>
|
||||
</div
|
||||
>
|
||||
<div class="action-in-box">
|
||||
<button
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
form="frmItemPreset"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,149 +24,204 @@
|
||||
|
||||
/**
|
||||
* @var PublicLinkListData $publicLink
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\PublicLinkListData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$publicLink = $_getvar('publicLink');
|
||||
?>
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
<form method="post" name="frmPublickLink" id="frmPublickLink"
|
||||
class="form-action"
|
||||
data-onsubmit="appMgmt/save"
|
||||
data-action-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-hash="">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Account'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Account'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Account'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Account'); ?></div>
|
||||
|
||||
<select id="accountId" name="accountId"
|
||||
class="select-box" <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Account'); ?></option>
|
||||
<?php /** @var SelectItem $account */
|
||||
class="select-box" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Account'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $account */
|
||||
foreach ($_getvar('accounts') as $account): ?>
|
||||
<option
|
||||
value="<?php echo $account->getId(); ?>"
|
||||
<?php echo $account->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php printf(
|
||||
'%s (%s)',
|
||||
htmlspecialchars($account->getName(), ENT_QUOTES),
|
||||
htmlspecialchars($account->getItemProperty('clientName'), ENT_QUOTES)
|
||||
value="<?php
|
||||
echo $account->getId(); ?>"
|
||||
<?php
|
||||
echo $account->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
printf(
|
||||
'%s (%s)',
|
||||
htmlspecialchars($account->getName(), ENT_QUOTES),
|
||||
htmlspecialchars($account->getItemProperty('clientName'), ENT_QUOTES)
|
||||
); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Notify'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Notify'); ?></td>
|
||||
<td class="valField">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect"
|
||||
for="notify"
|
||||
title="<?php echo __('Notify'); ?>">
|
||||
title="<?php
|
||||
echo __('Notify'); ?>">
|
||||
<input type="checkbox" id="notify"
|
||||
class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="notify" <?php echo $_getvar('isView') && $publicLink->isNotify() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
<span class="mdl-switch__label"><?php echo __('Notify'); ?></span>
|
||||
name="notify" <?php
|
||||
echo $_getvar('isView') && $publicLink->isNotify() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
<span class="mdl-switch__label"><?php
|
||||
echo __('Notify'); ?></span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($_getvar('isView')): ?>
|
||||
<?php
|
||||
if ($_getvar('isView')): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Creation Date'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Creation Date'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Creation Date'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Creation Date'); ?></div>
|
||||
|
||||
<?php echo $publicLink->getDateAddFormat(); ?>
|
||||
<?php
|
||||
echo $publicLink->getDateAddFormat(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Expiry Date '); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Expiry Date '); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Expiry Date '); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Expiry Date '); ?></div>
|
||||
|
||||
<?php echo $publicLink->getDateExpireFormat(); ?>
|
||||
<?php
|
||||
echo $publicLink->getDateExpireFormat(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('User'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('User'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('User'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('User'); ?></div>
|
||||
|
||||
<?php echo $publicLink->getUserLogin(); ?>
|
||||
<?php
|
||||
echo $publicLink->getUserLogin(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Visits'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Visits'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Visits'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Visits'); ?></div>
|
||||
|
||||
<?php echo $publicLink->getCountViewsString(); ?>
|
||||
<?php
|
||||
echo $publicLink->getCountViewsString(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Hash'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Hash'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Hash'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Hash'); ?></div>
|
||||
|
||||
<?php echo $publicLink->getHash(); ?>
|
||||
<?php
|
||||
echo $publicLink->getHash(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('URL'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('URL'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('URL'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('URL'); ?></div>
|
||||
|
||||
<a href="<?php echo $_getvar('publicLinkURL'); ?>"
|
||||
target="_blank"><?php echo $_getvar('publicLinkURL'); ?></a>
|
||||
<a href="<?php
|
||||
echo $_getvar('publicLinkURL'); ?>"
|
||||
target="_blank"><?php
|
||||
echo $_getvar('publicLinkURL'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if (is_array($_getvar('usageInfo'))): ?>
|
||||
<?php
|
||||
if (is_array($_getvar('usageInfo'))): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Use'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Use'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Use'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Use'); ?></div>
|
||||
|
||||
<div class="list-wrap">
|
||||
<ul class="mdl-list">
|
||||
<?php foreach ($_getvar('usageInfo') as $useInfo): ?>
|
||||
<?php
|
||||
foreach ($_getvar('usageInfo') as $useInfo): ?>
|
||||
<li class="mdl-list__item">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">access_time</i>
|
||||
<?php printf('%s - %s', $_getvar('isDemo') ? '*.*.*.*' : $useInfo['who'], date('Y-m-d H:i', $useInfo['time'])); ?>
|
||||
<?php
|
||||
printf(
|
||||
'%s - %s',
|
||||
$_getvar('isDemo') ? '*.*.*.*' : $useInfo['who'],
|
||||
date('Y-m-d H:i', $useInfo['time'])
|
||||
); ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</form>
|
||||
|
||||
<?php if (!$_getvar('isView')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView')): ?>
|
||||
<div class="action-in-box">
|
||||
<button form="frmPublickLink"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,23 +23,27 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr id="ldap-results">
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo $_getvar('header'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo $_getvar('header'); ?></div>
|
||||
<div class="list-wrap"></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,37 +24,44 @@
|
||||
|
||||
/**
|
||||
* @var TagData $tag
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\TagData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$tag = $_getvar('tag');
|
||||
?>
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<form method="post" name="frmTags" id="frmTags" class="form-action"
|
||||
data-onsubmit="appMgmt/save"
|
||||
data-action-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-hash="">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="name" name="name" type="text" required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50"
|
||||
value="<?php echo htmlspecialchars($tag->getName(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($tag->getName(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Tag name'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Tag name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -65,10 +72,13 @@ $tag = $_getvar('tag');
|
||||
</form>
|
||||
<div class="action-in-box">
|
||||
<button
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
form="frmTags"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,115 +24,149 @@
|
||||
|
||||
/**
|
||||
* @var UserData $user
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\UserData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$user = $_getvar('user');
|
||||
?>
|
||||
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
|
||||
<div class="mdl-tabs__tab-bar">
|
||||
<a href="#user-panel"
|
||||
class="mdl-tabs__tab is-active"><?php echo __('User'); ?></a>
|
||||
class="mdl-tabs__tab is-active"><?php
|
||||
echo __('User'); ?></a>
|
||||
<a href="#options-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Options'); ?></a>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Options'); ?></a>
|
||||
|
||||
<?php if ($_getvar('isView')): ?>
|
||||
<?php
|
||||
if ($_getvar('isView')): ?>
|
||||
<a href="#details-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Details'); ?></a>
|
||||
<?php endif; ?>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Details'); ?></a>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
<form method="post" name="frmUsers" id="frmUsers" class="form-action"
|
||||
data-onsubmit="appMgmt/save"
|
||||
data-action-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-hash="">
|
||||
|
||||
<div class="mdl-tabs__panel is-active" id="user-panel">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name') ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name') ?></td>
|
||||
<td class="valField">
|
||||
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="name" name="name" type="text"
|
||||
required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?>"
|
||||
maxlength="80" <?php echo $_getvar('readonly'); ?>>
|
||||
value="<?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?>"
|
||||
maxlength="80" <?php
|
||||
echo $_getvar('readonly'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Full username'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Full username'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Login'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Login'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="login" name="login" type="text"
|
||||
required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($user->getLogin(), ENT_QUOTES); ?>"
|
||||
maxlength="80" <?php echo $user->isLdap() ? 'readonly' : $_getvar('readonly'); ?>>
|
||||
value="<?php
|
||||
echo htmlspecialchars($user->getLogin(), ENT_QUOTES); ?>"
|
||||
maxlength="80" <?php
|
||||
echo $user->isLdap() ? 'readonly' : $_getvar('readonly'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="login"><?php echo __('Session login'); ?></label>
|
||||
for="login"><?php
|
||||
echo __('Session login'); ?></label>
|
||||
</div>
|
||||
<?php if ($user->isLdap()): ?>
|
||||
<i class="material-icons <?php echo $icons->getIconLdapUser()->getClass(); ?>"
|
||||
title="<?php echo $icons->getIconLdapUser()->getTitle(); ?>"><?php echo $icons->getIconLdapUser()->getIcon(); ?></i>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($user->isLdap()): ?>
|
||||
<i class="material-icons <?php
|
||||
echo $icons->ldapUser()->getClass(); ?>"
|
||||
title="<?php
|
||||
echo $icons->ldapUser()->getTitle(); ?>"><?php
|
||||
echo $icons->ldapUser()->getIcon(); ?></i>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($_getvar('isUseSSO')): ?>
|
||||
<?php
|
||||
if ($_getvar('isUseSSO')): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('SSO Login '); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('SSO Login '); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="login_sso" name="login_sso"
|
||||
type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($user->getSsoLogin(), ENT_QUOTES); ?>"
|
||||
maxlength="100" <?php echo $_getvar('readonly'); ?>>
|
||||
value="<?php
|
||||
echo htmlspecialchars($user->getSsoLogin(), ENT_QUOTES); ?>"
|
||||
maxlength="100" <?php
|
||||
echo $_getvar('readonly'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="login_sso"><?php echo __('Session login with SSO'); ?></label>
|
||||
for="login_sso"><?php
|
||||
echo __('Session login with SSO'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Email'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Email'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="email" name="email" type="email"
|
||||
required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($user->getEmail(), ENT_QUOTES); ?>"
|
||||
maxlength="50" <?php echo $_getvar('readonly'); ?>>
|
||||
value="<?php
|
||||
echo htmlspecialchars($user->getEmail(), ENT_QUOTES); ?>"
|
||||
maxlength="50" <?php
|
||||
echo $_getvar('readonly'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="email"><?php echo __('Email address'); ?></label>
|
||||
for="email"><?php
|
||||
echo __('Email address'); ?></label>
|
||||
</div
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<?php if ($_getvar('createAction')): ?>
|
||||
<?php
|
||||
if ($_getvar('createAction')): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="form-control">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -141,14 +175,16 @@ $user = $_getvar('user');
|
||||
class="mdl-textfield__input passwordfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50">
|
||||
<label class="mdl-textfield__label"
|
||||
for="password"><?php echo __('Password'); ?></label>
|
||||
for="password"><?php
|
||||
echo __('Password'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password (repeat)'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password (repeat)'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="password_repeat"
|
||||
@@ -157,66 +193,93 @@ $user = $_getvar('user');
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50">
|
||||
<label class="mdl-textfield__label"
|
||||
for="password_repeat"><?php echo __('Password (repeat)'); ?></label>
|
||||
for="password_repeat"><?php
|
||||
echo __('Password (repeat)'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Profile'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Profile'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Profile'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Profile'); ?></div>
|
||||
|
||||
<select id="userprofile_id" name="userprofile_id"
|
||||
class="select-box"
|
||||
required <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Profile'); ?></option>
|
||||
<?php /** @var SelectItem $profile */
|
||||
required <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Profile'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $profile */
|
||||
foreach ($_getvar('profiles') as $profile): ?>
|
||||
<option
|
||||
value="<?php echo $profile->getId(); ?>" <?php echo ($profile->getId() === $user->getUserProfileId()) ? 'selected' : ''; ?>><?php echo htmlspecialchars($profile->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $profile->getId(); ?>" <?php
|
||||
echo ($profile->getId() === $user->getUserProfileId()) ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($profile->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Group'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Group'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Group'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Group'); ?></div>
|
||||
|
||||
<select id="usergroup_id" name="usergroup_id"
|
||||
class="select-box"
|
||||
required <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Group'); ?></option>
|
||||
<?php /** @var SelectItem $group */
|
||||
required <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Group'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $group */
|
||||
foreach ($_getvar('groups') as $group): ?>
|
||||
<option
|
||||
value="<?php echo $group->getId(); ?>" <?php echo ($group->getId() === $user->getUserGroupId()) ? 'selected' : ''; ?>><?php echo htmlspecialchars($group->getName(), ENT_QUOTES); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value="<?php
|
||||
echo $group->getId(); ?>" <?php
|
||||
echo ($group->getId() === $user->getUserGroupId()) ? 'selected' : ''; ?>><?php
|
||||
echo htmlspecialchars($group->getName(), ENT_QUOTES); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Notes') ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Notes') ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<textarea class="mdl-textfield__input" rows="3"
|
||||
id="notes" name="notes"
|
||||
maxlength="1000" <?php echo $_getvar('readonly'); ?>>
|
||||
<?php echo htmlspecialchars($user->getNotes(), ENT_QUOTES); ?>
|
||||
maxlength="1000" <?php
|
||||
echo $_getvar('readonly'); ?>>
|
||||
<?php
|
||||
echo htmlspecialchars($user->getNotes(), ENT_QUOTES); ?>
|
||||
</textarea>
|
||||
<label class="mdl-textfield__label"
|
||||
for="notes"><?php echo __('Notes'); ?></label>
|
||||
for="notes"><?php
|
||||
echo __('Notes'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($_getvar('customFields')): ?>
|
||||
<?php include $this->includeTemplate('aux-customfields', 'common'); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($_getvar('customFields')): ?>
|
||||
<?php
|
||||
include $this->includeTemplate('aux-customfields', 'common'); ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -228,7 +291,8 @@ $user = $_getvar('user');
|
||||
<tr>
|
||||
<td>
|
||||
<ul class="user-list-action mdl-list">
|
||||
<?php if ($_getvar('ctx_userIsAdminApp') || $_getvar('isDemo')): ?>
|
||||
<?php
|
||||
if ($_getvar('ctx_userIsAdminApp') || $_getvar('isDemo')): ?>
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<div class="mdl-switch__box">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect"
|
||||
@@ -236,14 +300,18 @@ $user = $_getvar('user');
|
||||
<input type="checkbox"
|
||||
id="adminapp_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="adminapp_enabled" <?php echo $user->isAdminApp() ? 'checked' : ' '; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="adminapp_enabled" <?php
|
||||
echo $user->isAdminApp() ? 'checked' : ' '; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Application Admin'); ?></span>
|
||||
<span><?php
|
||||
echo __('Application Admin'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Application administrator'); ?>
|
||||
<?php
|
||||
echo __('Application administrator'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -255,20 +323,26 @@ $user = $_getvar('user');
|
||||
<input type="checkbox"
|
||||
id="adminacc_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="adminacc_enabled" <?php echo $user->isAdminAcc() ? 'checked' : ' '; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="adminacc_enabled" <?php
|
||||
echo $user->isAdminAcc() ? 'checked' : ' '; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Accounts Admin'); ?></span>
|
||||
<span><?php
|
||||
echo __('Accounts Admin'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Accounts administrator'); ?>
|
||||
<?php
|
||||
echo __('Accounts administrator'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($_getvar('mailEnabled')): ?>
|
||||
<?php
|
||||
if ($_getvar('mailEnabled')): ?>
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<div class="mdl-switch__box">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect"
|
||||
@@ -276,18 +350,23 @@ $user = $_getvar('user');
|
||||
<input type="checkbox"
|
||||
id="changepass_enabled"
|
||||
class="mdl-switch__input"
|
||||
name="changepass_enabled" <?php echo $user->isChangePass() ? 'checked' : ' '; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="changepass_enabled" <?php
|
||||
echo $user->isChangePass() ? 'checked' : ' '; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Password Change'); ?></span>
|
||||
<span><?php
|
||||
echo __('Password Change'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Force password change'); ?>
|
||||
<?php
|
||||
echo __('Force password change'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<div class="mdl-switch__box">
|
||||
@@ -295,12 +374,15 @@ $user = $_getvar('user');
|
||||
for="disabled">
|
||||
<input type="checkbox" id="disabled"
|
||||
class="mdl-switch__input"
|
||||
name="disabled" <?php echo $user->isDisabled() ? 'checked' : ' '; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="disabled" <?php
|
||||
echo $user->isDisabled() ? 'checked' : ' '; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Disabled'); ?></span>
|
||||
<span><?php
|
||||
echo __('Disabled'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"></span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -311,65 +393,85 @@ $user = $_getvar('user');
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php if ($_getvar('isView')): ?>
|
||||
<?php
|
||||
if ($_getvar('isView')): ?>
|
||||
<div class="mdl-tabs__panel" id="details-panel">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Entries'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Entries'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Entries'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Entries'); ?></div>
|
||||
|
||||
<?php echo $user->getLoginCount(); ?>
|
||||
<?php
|
||||
echo $user->getLoginCount(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Last Access'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Last Access'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Last Access'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Last Access'); ?></div>
|
||||
|
||||
<?php echo $user->getLastLogin(); ?>
|
||||
<?php
|
||||
echo $user->getLastLogin(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Last Modification'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Last Modification'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Last Modification'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Last Modification'); ?></div>
|
||||
|
||||
<?php echo $user->getLastUpdate(); ?>
|
||||
<?php
|
||||
echo $user->getLastUpdate(); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Master Password Date'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Master Password Date'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Master Password Date'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Master Password Date'); ?></div>
|
||||
|
||||
<?php echo gmdate('Y-m-d H:i:s', $user->getLastUpdateMPass()); ?>
|
||||
<?php
|
||||
echo gmdate('Y-m-d H:i:s', $user->getLastUpdateMPass()); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Used in'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Used in'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Used in'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Used in'); ?></div>
|
||||
<div class="list-wrap">
|
||||
<ul class="mdl-list">
|
||||
<?php foreach ($_getvar('usage') as $item): ?>
|
||||
<?php
|
||||
foreach ($_getvar('usage') as $item): ?>
|
||||
<li class="mdl-list__item mdl-list__item"
|
||||
title="<?php echo $item->ref; ?>">
|
||||
title="<?php
|
||||
echo $item->ref; ?>">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon"><?php echo $item->icon; ?></i>
|
||||
<?php printf(
|
||||
'%s: %s',
|
||||
$item->ref,
|
||||
htmlspecialchars($item->name, ENT_QUOTES) ?: $item->id
|
||||
<i class="material-icons mdl-list__item-icon"><?php
|
||||
echo $item->icon; ?></i>
|
||||
<?php
|
||||
printf(
|
||||
'%s: %s',
|
||||
$item->ref,
|
||||
htmlspecialchars($item->name, ENT_QUOTES) ?: $item->id
|
||||
); ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
@@ -378,21 +480,28 @@ $user = $_getvar('user');
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<input type="hidden" name="isLdap"
|
||||
value="<?php echo $user->isLdap(); ?>"/>
|
||||
value="<?php
|
||||
echo $user->isLdap(); ?>"/>
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if (!$_getvar('isView')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView')): ?>
|
||||
<div class="action-in-box">
|
||||
<button form="frmUsers"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -25,149 +25,198 @@
|
||||
/**
|
||||
* @var UserToUserGroupData $groupUsers
|
||||
* @var UserGroupData $group
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\UserGroupData;
|
||||
use SP\DataModel\UserToUserGroupData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$group = $_getvar('group');
|
||||
?>
|
||||
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<form method="post" name="frmGroups" id="frmGroups" class="form-action"
|
||||
data-onsubmit="appMgmt/save"
|
||||
data-action-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-hash="">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="name" name="name" type="text" required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50"
|
||||
value="<?php echo htmlspecialchars($group->getName(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($group->getName(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Group name'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Group name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Description'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Description'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="description" name="description" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50"
|
||||
value="<?php echo htmlspecialchars($group->getDescription(), ENT_QUOTES); ?>">
|
||||
value="<?php
|
||||
echo htmlspecialchars($group->getDescription(), ENT_QUOTES); ?>">
|
||||
<label class="mdl-textfield__label"
|
||||
for="description"><?php echo __('Group description'); ?></label>
|
||||
for="description"><?php
|
||||
echo __('Group description'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Users'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Users'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Users'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Users'); ?></div>
|
||||
|
||||
<?php if (!$_getvar('isView')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView')): ?>
|
||||
<select id="selUsers" name="users[]" multiple="multiple"
|
||||
class="select-box"
|
||||
title="<?php echo __('Users'); ?>" <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select Users'); ?></option>
|
||||
<?php /** @var SelectItem $user */
|
||||
title="<?php
|
||||
echo __('Users'); ?>" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select Users'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $user */
|
||||
foreach ($_getvar('users') as $user): ?>
|
||||
<option
|
||||
value="<?php echo $user->getId(); ?>"
|
||||
<?php echo $user->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?>
|
||||
value="<?php
|
||||
echo $user->getId(); ?>"
|
||||
<?php
|
||||
echo $user->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<div class="tag-list-box">
|
||||
<div class="tag-list-body">
|
||||
<div class="tags-list-items">
|
||||
<?php /** @var SelectItem $user */
|
||||
<?php
|
||||
/** @var SelectItem $user */
|
||||
foreach ($_getvar('users') as $user): ?>
|
||||
<?php if ($user->isSelected()): ?>
|
||||
<?php
|
||||
if ($user->isSelected()): ?>
|
||||
<span class="tag">
|
||||
<?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($_getvar('customFields')): ?>
|
||||
<?php include $this->includeTemplate('aux-customfields', 'common'); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($_getvar('customFields')): ?>
|
||||
<?php
|
||||
include $this->includeTemplate('aux-customfields', 'common'); ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($_getvar('usedBy')): ?>
|
||||
<?php
|
||||
if ($_getvar('usedBy')): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Used by'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Used by'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Used by'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Used by'); ?></div>
|
||||
<div class="list-wrap">
|
||||
<ul class="mdl-list">
|
||||
<?php /** @var stdClass $user */
|
||||
<?php
|
||||
/** @var stdClass $user */
|
||||
foreach ($_getvar('usedBy') as $user): ?>
|
||||
<li class="mdl-list__item mdl-list__item">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon"
|
||||
title="<?php echo __('User'); ?>">person</i>
|
||||
<?php if ($user->ref === 'UserGroup'): ?>
|
||||
<?php printf(
|
||||
'%s (%s)*',
|
||||
htmlspecialchars($user->name, ENT_QUOTES),
|
||||
htmlspecialchars($user->login, ENT_QUOTES)
|
||||
title="<?php
|
||||
echo __('User'); ?>">person</i>
|
||||
<?php
|
||||
if ($user->ref === 'UserGroup'): ?>
|
||||
<?php
|
||||
printf(
|
||||
'%s (%s)*',
|
||||
htmlspecialchars($user->name, ENT_QUOTES),
|
||||
htmlspecialchars($user->login, ENT_QUOTES)
|
||||
); ?>
|
||||
<?php else: ?>
|
||||
<?php printf(
|
||||
'%s (%s)',
|
||||
htmlspecialchars($user->name, ENT_QUOTES),
|
||||
htmlspecialchars($user->login, ENT_QUOTES)
|
||||
<?php
|
||||
else: ?>
|
||||
<?php
|
||||
printf(
|
||||
'%s (%s)',
|
||||
htmlspecialchars($user->name, ENT_QUOTES),
|
||||
htmlspecialchars($user->login, ENT_QUOTES)
|
||||
); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div><?php echo __('(*) Listed in group'); ?></div>
|
||||
<div><?php
|
||||
echo __('(*) Listed in group'); ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</form>
|
||||
<?php if (!$_getvar('isView')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView')): ?>
|
||||
<div class="action-in-box">
|
||||
<button
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
form="frmGroups"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,53 +24,62 @@
|
||||
|
||||
/**
|
||||
* @var UserData $user
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\UserData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$user = $_getvar('user');
|
||||
?>
|
||||
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<form method="post" name="updUsrPass" id="frmUpdUsrPass" class="form-action"
|
||||
data-onsubmit="user/savePassword"
|
||||
data-action-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-hash="">
|
||||
<table class="popup-data">
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield">
|
||||
<input id="name" name="name" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?>" readonly
|
||||
value="<?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?>" readonly
|
||||
disabled/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Login'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Login'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield">
|
||||
<input id="login" name="login" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo htmlspecialchars($user->getLogin(), ENT_QUOTES); ?>"
|
||||
value="<?php
|
||||
echo htmlspecialchars($user->getLogin(), ENT_QUOTES); ?>"
|
||||
readonly disabled/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="form-control">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -79,14 +88,16 @@ $user = $_getvar('user');
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__input"
|
||||
maxlength="50">
|
||||
<label class="mdl-textfield__label"
|
||||
for="password"><?php echo __('Password'); ?></label>
|
||||
for="password"><?php
|
||||
echo __('Password'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Password (repeat)'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Password (repeat)'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="password_repeat" name="password_repeat"
|
||||
@@ -94,7 +105,8 @@ $user = $_getvar('user');
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="50">
|
||||
<label class="mdl-textfield__label"
|
||||
for="password_repeat"><?php echo __('Password (repeat)'); ?></label>
|
||||
for="password_repeat"><?php
|
||||
echo __('Password (repeat)'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -103,9 +115,12 @@ $user = $_getvar('user');
|
||||
|
||||
<div class="action-in-box">
|
||||
<button form="frmUpdUsrPass"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -25,39 +25,47 @@
|
||||
/**
|
||||
* @var ProfileData $profileData
|
||||
* @var UserProfileData $profile
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\ProfileData;
|
||||
use SP\DataModel\UserProfileData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$profile = $_getvar('profile');
|
||||
$profileData = $_getvar('profileData');
|
||||
?>
|
||||
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<form method="post" name="frmProfile" id="frmProfile" class="form-action"
|
||||
data-onsubmit="appMgmt/save"
|
||||
data-action-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-hash="">
|
||||
|
||||
<div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
|
||||
<div class="mdl-tabs__tab-bar">
|
||||
<a href="#account-panel"
|
||||
class="mdl-tabs__tab is-active"><?php echo __('Accounts'); ?></a>
|
||||
class="mdl-tabs__tab is-active"><?php
|
||||
echo __('Accounts'); ?></a>
|
||||
<a href="#management-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Management'); ?></a>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Management'); ?></a>
|
||||
<a href="#config-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Configuration'); ?></a>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Configuration'); ?></a>
|
||||
<a href="#other-panel"
|
||||
class="mdl-tabs__tab"><?php echo __('Others'); ?></a>
|
||||
class="mdl-tabs__tab"><?php
|
||||
echo __('Others'); ?></a>
|
||||
</div>
|
||||
|
||||
<div class="mdl-tabs__panel is-active" id="account-panel">
|
||||
@@ -65,8 +73,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Add'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Create new account'); ?></span>
|
||||
<span><?php
|
||||
echo __('Add'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Create new account'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -74,7 +84,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_accadd">
|
||||
<input type="checkbox" id="profile_accadd"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accadd" <?php echo $profileData->isAccAdd() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accadd" <?php
|
||||
echo $profileData->isAccAdd() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -82,8 +94,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('View'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('View account details'); ?></span>
|
||||
<span><?php
|
||||
echo __('View'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('View account details'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -91,7 +105,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_accview">
|
||||
<input type="checkbox" id="profile_accview"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accview" <?php echo $profileData->isAccView() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accview" <?php
|
||||
echo $profileData->isAccView() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -99,8 +115,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('View password'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('View account password'); ?></span>
|
||||
<span><?php
|
||||
echo __('View password'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('View account password'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -108,7 +126,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_accviewpass">
|
||||
<input type="checkbox" id="profile_accviewpass"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accviewpass" <?php echo $profileData->isAccViewPass() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accviewpass" <?php
|
||||
echo $profileData->isAccViewPass() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -116,8 +136,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('View History'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('View account history'); ?></span>
|
||||
<span><?php
|
||||
echo __('View History'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('View account history'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -126,7 +148,9 @@ $profileData = $_getvar('profileData');
|
||||
<input type="checkbox"
|
||||
id="profile_accviewhistory"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accviewhistory" <?php echo $profileData->isAccViewHistory() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accviewhistory" <?php
|
||||
echo $profileData->isAccViewHistory() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -134,8 +158,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Edit'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Edit account'); ?></span>
|
||||
<span><?php
|
||||
echo __('Edit'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Edit account'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -143,7 +169,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_accedit">
|
||||
<input type="checkbox" id="profile_accedit"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accedit" <?php echo $profileData->isAccEdit() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accedit" <?php
|
||||
echo $profileData->isAccEdit() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -151,8 +179,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Edit Password'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Edit account password'); ?></span>
|
||||
<span><?php
|
||||
echo __('Edit Password'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Edit account password'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -160,7 +190,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_acceditpass">
|
||||
<input type="checkbox" id="profile_acceditpass"
|
||||
class="mdl-switch__input"
|
||||
name="profile_acceditpass" <?php echo $profileData->isAccEditPass() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_acceditpass" <?php
|
||||
echo $profileData->isAccEditPass() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -168,8 +200,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Delete'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Remove account'); ?></span>
|
||||
<span><?php
|
||||
echo __('Delete'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Remove account'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -177,7 +211,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_accdel">
|
||||
<input type="checkbox" id="profile_accdel"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accdel" <?php echo $profileData->isAccDelete() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accdel" <?php
|
||||
echo $profileData->isAccDelete() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -185,8 +221,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Files'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('View account files'); ?></span>
|
||||
<span><?php
|
||||
echo __('Files'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('View account files'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -194,7 +232,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_accfiles">
|
||||
<input type="checkbox" id="profile_accfiles"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accfiles" <?php echo $profileData->isAccFiles() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accfiles" <?php
|
||||
echo $profileData->isAccFiles() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -202,8 +242,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Share Link'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Share link to account'); ?></span>
|
||||
<span><?php
|
||||
echo __('Share Link'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Share link to account'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -211,7 +253,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_accpublinks">
|
||||
<input type="checkbox" id="profile_accpublinks"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accpublinks" <?php echo $profileData->isAccPublicLinks() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accpublinks" <?php
|
||||
echo $profileData->isAccPublicLinks() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -219,8 +263,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Private'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Create private account'); ?></span>
|
||||
<span><?php
|
||||
echo __('Private'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Create private account'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -228,7 +274,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_accprivate">
|
||||
<input type="checkbox" id="profile_accprivate"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accprivate" <?php echo $profileData->isAccPrivate() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accprivate" <?php
|
||||
echo $profileData->isAccPrivate() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -236,8 +284,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Private for Group'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Create private account for group'); ?></span>
|
||||
<span><?php
|
||||
echo __('Private for Group'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Create private account for group'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -246,7 +296,9 @@ $profileData = $_getvar('profileData');
|
||||
<input type="checkbox"
|
||||
id="profile_accprivategroup"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accprivategroup" <?php echo $profileData->isAccPrivateGroup() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accprivategroup" <?php
|
||||
echo $profileData->isAccPrivateGroup() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -254,8 +306,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Permissions'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Assign permissions'); ?></span>
|
||||
<span><?php
|
||||
echo __('Permissions'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Assign permissions'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -264,7 +318,9 @@ $profileData = $_getvar('profileData');
|
||||
<input type="checkbox"
|
||||
id="profile_accpermissions"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accpermissions" <?php echo $profileData->isAccPermission() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accpermissions" <?php
|
||||
echo $profileData->isAccPermission() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -272,8 +328,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Global search'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Global search'); ?></span>
|
||||
<span><?php
|
||||
echo __('Global search'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Global search'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -282,7 +340,9 @@ $profileData = $_getvar('profileData');
|
||||
<input type="checkbox"
|
||||
id="profile_accglobalsearch"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accglobalsearch" <?php echo $profileData->isAccGlobalSearch() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accglobalsearch" <?php
|
||||
echo $profileData->isAccGlobalSearch() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -294,8 +354,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Users'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Users management'); ?></span>
|
||||
<span><?php
|
||||
echo __('Users'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Users management'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -303,7 +365,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_users">
|
||||
<input type="checkbox" id="profile_users"
|
||||
class="mdl-switch__input"
|
||||
name="profile_users" <?php echo $profileData->isMgmUsers() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_users" <?php
|
||||
echo $profileData->isMgmUsers() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -311,8 +375,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Groups'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Groups management'); ?></span>
|
||||
<span><?php
|
||||
echo __('Groups'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Groups management'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -320,7 +386,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_groups">
|
||||
<input type="checkbox" id="profile_groups"
|
||||
class="mdl-switch__input"
|
||||
name="profile_groups" <?php echo $profileData->isMgmGroups() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_groups" <?php
|
||||
echo $profileData->isMgmGroups() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -328,8 +396,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Profiles'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Profiles management'); ?></span>
|
||||
<span><?php
|
||||
echo __('Profiles'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Profiles management'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -337,7 +407,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_profiles">
|
||||
<input type="checkbox" id="profile_profiles"
|
||||
class="mdl-switch__input"
|
||||
name="profile_profiles" <?php echo $profileData->isMgmProfiles() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_profiles" <?php
|
||||
echo $profileData->isMgmProfiles() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -345,8 +417,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Categories'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Categories management'); ?></span>
|
||||
<span><?php
|
||||
echo __('Categories'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Categories management'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -354,7 +428,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_categories">
|
||||
<input type="checkbox" id="profile_categories"
|
||||
class="mdl-switch__input"
|
||||
name="profile_categories" <?php echo $profileData->isMgmCategories() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_categories" <?php
|
||||
echo $profileData->isMgmCategories() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -362,8 +438,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Tags'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Tags management'); ?></span>
|
||||
<span><?php
|
||||
echo __('Tags'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Tags management'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -371,7 +449,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_tags">
|
||||
<input type="checkbox" id="profile_tags"
|
||||
class="mdl-switch__input"
|
||||
name="profile_tags" <?php echo $profileData->isMgmTags() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_tags" <?php
|
||||
echo $profileData->isMgmTags() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -379,8 +459,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Clients'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Customers management'); ?></span>
|
||||
<span><?php
|
||||
echo __('Clients'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Customers management'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -388,7 +470,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_customers">
|
||||
<input type="checkbox" id="profile_customers"
|
||||
class="mdl-switch__input"
|
||||
name="profile_customers" <?php echo $profileData->isMgmCustomers() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_customers" <?php
|
||||
echo $profileData->isMgmCustomers() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -396,8 +480,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Custom Fields'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Custom fields management'); ?></span>
|
||||
<span><?php
|
||||
echo __('Custom Fields'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Custom fields management'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -405,7 +491,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_customfields">
|
||||
<input type="checkbox" id="profile_customfields"
|
||||
class="mdl-switch__input"
|
||||
name="profile_customfields" <?php echo $profileData->isMgmCustomFields() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_customfields" <?php
|
||||
echo $profileData->isMgmCustomFields() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -413,8 +501,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('API Authorizations'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('API authorizations management'); ?></span>
|
||||
<span><?php
|
||||
echo __('API Authorizations'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('API authorizations management'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -422,7 +512,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_apitokens">
|
||||
<input type="checkbox" id="profile_apitokens"
|
||||
class="mdl-switch__input"
|
||||
name="profile_apitokens" <?php echo $profileData->isMgmApiTokens() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_apitokens" <?php
|
||||
echo $profileData->isMgmApiTokens() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -430,8 +522,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Public Links'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Links management'); ?></span>
|
||||
<span><?php
|
||||
echo __('Public Links'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Links management'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -439,7 +533,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_publinks">
|
||||
<input type="checkbox" id="profile_publinks"
|
||||
class="mdl-switch__input"
|
||||
name="profile_publinks" <?php echo $profileData->isMgmPublicLinks() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_publinks" <?php
|
||||
echo $profileData->isMgmPublicLinks() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -447,8 +543,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Accounts'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Accounts management'); ?></span>
|
||||
<span><?php
|
||||
echo __('Accounts'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Accounts management'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -456,7 +554,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_accounts">
|
||||
<input type="checkbox" id="profile_accounts"
|
||||
class="mdl-switch__input"
|
||||
name="profile_accounts" <?php echo $profileData->isMgmAccounts() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_accounts" <?php
|
||||
echo $profileData->isMgmAccounts() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -464,8 +564,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Files'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Files management'); ?></span>
|
||||
<span><?php
|
||||
echo __('Files'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Files management'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -473,7 +575,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_files">
|
||||
<input type="checkbox" id="profile_files"
|
||||
class="mdl-switch__input"
|
||||
name="profile_files" <?php echo $profileData->isMgmFiles() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_files" <?php
|
||||
echo $profileData->isMgmFiles() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -481,8 +585,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Default Values'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Default Values Management'); ?></span>
|
||||
<span><?php
|
||||
echo __('Default Values'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Default Values Management'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -490,7 +596,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_items_preset">
|
||||
<input type="checkbox" id="profile_items_preset"
|
||||
class="mdl-switch__input"
|
||||
name="profile_items_preset" <?php echo $profileData->isMgmItemsPreset() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_items_preset" <?php
|
||||
echo $profileData->isMgmItemsPreset() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -502,8 +610,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('General'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('General Configuration'); ?></span>
|
||||
<span><?php
|
||||
echo __('General'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('General Configuration'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -511,7 +621,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_config">
|
||||
<input type="checkbox" id="profile_config"
|
||||
class="mdl-switch__input"
|
||||
name="profile_config" <?php echo $profileData->isConfigGeneral() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_config" <?php
|
||||
echo $profileData->isConfigGeneral() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -519,8 +631,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Encryption'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Encryption options'); ?></span>
|
||||
<span><?php
|
||||
echo __('Encryption'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Encryption options'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -528,7 +642,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_configmpw">
|
||||
<input type="checkbox" id="profile_configmpw"
|
||||
class="mdl-switch__input"
|
||||
name="profile_configmpw" <?php echo $profileData->isConfigEncryption() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_configmpw" <?php
|
||||
echo $profileData->isConfigEncryption() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -536,8 +652,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Backup'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Make a backup and export'); ?></span>
|
||||
<span><?php
|
||||
echo __('Backup'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Make a backup and export'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -545,7 +663,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_configback">
|
||||
<input type="checkbox" id="profile_configback"
|
||||
class="mdl-switch__input"
|
||||
name="profile_configback" <?php echo $profileData->isConfigBackup() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_configback" <?php
|
||||
echo $profileData->isConfigBackup() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -553,8 +673,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Import'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('Make accounts import'); ?></span>
|
||||
<span><?php
|
||||
echo __('Import'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('Make accounts import'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -562,7 +684,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_configimport">
|
||||
<input type="checkbox" id="profile_configimport"
|
||||
class="mdl-switch__input"
|
||||
name="profile_configimport" <?php echo $profileData->isConfigImport() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_configimport" <?php
|
||||
echo $profileData->isConfigImport() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -574,8 +698,10 @@ $profileData = $_getvar('profileData');
|
||||
<li class="mdl-list__item mdl-list__item--two-line">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">vpn_key</i>
|
||||
<span><?php echo __('Event Log'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php echo __('View event log'); ?></span>
|
||||
<span><?php
|
||||
echo __('Event Log'); ?></span>
|
||||
<span class="mdl-list__item-sub-title"><?php
|
||||
echo __('View event log'); ?></span>
|
||||
</span>
|
||||
|
||||
<span class="mdl-list__item-secondary-action">
|
||||
@@ -583,7 +709,9 @@ $profileData = $_getvar('profileData');
|
||||
for="profile_eventlog">
|
||||
<input type="checkbox" id="profile_eventlog"
|
||||
class="mdl-switch__input"
|
||||
name="profile_eventlog" <?php echo $profileData->isEvl() ? 'CHECKED' : ''; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
name="profile_eventlog" <?php
|
||||
echo $profileData->isEvl() ? 'CHECKED' : ''; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@@ -594,41 +722,52 @@ $profileData = $_getvar('profileData');
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="profile_name" name="profile_name" type="text"
|
||||
required
|
||||
class="mdl-textfield__input"
|
||||
value="<?php echo htmlspecialchars($profile->getName(), ENT_QUOTES); ?>"
|
||||
maxlength="50" <?php echo $_getvar('readonly'); ?>>
|
||||
value="<?php
|
||||
echo htmlspecialchars($profile->getName(), ENT_QUOTES); ?>"
|
||||
maxlength="50" <?php
|
||||
echo $_getvar('readonly'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="profile_name"><?php echo __('Profile name'); ?></label>
|
||||
for="profile_name"><?php
|
||||
echo __('Profile name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($_getvar('isView')): ?>
|
||||
<?php
|
||||
if ($_getvar('isView')): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Used by'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Used by'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Used by'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Used by'); ?></div>
|
||||
<div class="list-wrap">
|
||||
<ul class="mdl-list">
|
||||
<?php foreach ($_getvar('usedBy') as $user): ?>
|
||||
<?php
|
||||
foreach ($_getvar('usedBy') as $user): ?>
|
||||
<li class="mdl-list__item mdl-list__item">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">person</i>
|
||||
<?php echo $user->login; ?>
|
||||
<?php
|
||||
echo $user->login; ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -636,13 +775,18 @@ $profileData = $_getvar('profileData');
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</form>
|
||||
|
||||
<?php if (!$_getvar('isView')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView')): ?>
|
||||
<div class="action-in-box">
|
||||
<button form="frmProfile"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,13 +23,15 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
@@ -47,7 +49,8 @@ use SP\Core\UI\ThemeIcons;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="80" autocomplete="off" autofocus>
|
||||
<label class="mdl-textfield__label"
|
||||
for="user"><?php echo __('User'); ?></label>
|
||||
for="user"><?php
|
||||
echo __('User'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +61,8 @@ use SP\Core\UI\ThemeIcons;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255" autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="pass"><?php echo __('Password'); ?></label>
|
||||
for="pass"><?php
|
||||
echo __('Password'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -69,7 +73,8 @@ use SP\Core\UI\ThemeIcons;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255" autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="oldpass"><?php echo __('Previous Password'); ?></label>
|
||||
for="oldpass"><?php
|
||||
echo __('Previous Password'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -80,16 +85,21 @@ use SP\Core\UI\ThemeIcons;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="255" autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="mpass"><?php echo __('Master Password'); ?></label>
|
||||
for="mpass"><?php
|
||||
echo __('Master Password'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($_getvar('from') && $_getvar('from_hash')): ?>
|
||||
<?php
|
||||
if ($_getvar('from') && $_getvar('from_hash')): ?>
|
||||
<input type="hidden" name="from"
|
||||
value="<?php echo $_getvar('from'); ?>"/>
|
||||
value="<?php
|
||||
echo $_getvar('from'); ?>"/>
|
||||
<input type="hidden" name="h"
|
||||
value="<?php echo $_getvar('from_hash'); ?>"/>
|
||||
<?php endif; ?>
|
||||
value="<?php
|
||||
echo $_getvar('from_hash'); ?>"/>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<input type="hidden" name="login" value="1"/>
|
||||
<input type="hidden" name="isAjax" value="1"/>
|
||||
@@ -97,41 +107,53 @@ use SP\Core\UI\ThemeIcons;
|
||||
<div id="box-buttons">
|
||||
<button id="btnLogin" type="submit" form="frmLogin"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored mdl-color--indigo-400"
|
||||
title="<?php echo __('Sign in'); ?>">
|
||||
title="<?php
|
||||
echo __('Sign in'); ?>">
|
||||
<i class="material-icons">play_arrow</i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Close boxData -->
|
||||
<?php if ($_getvar('mailEnabled')): ?>
|
||||
<?php
|
||||
if ($_getvar('mailEnabled')): ?>
|
||||
<div id="box-actions">
|
||||
<a href="index.php?r=userPassReset"><?php echo __('Forgot password?'); ?></a>
|
||||
<a href="index.php?r=userPassReset"><?php
|
||||
echo __('Forgot password?'); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div><!-- Close boxLogin -->
|
||||
|
||||
<?php if ($_getvar('updated')): ?>
|
||||
<?php
|
||||
if ($_getvar('updated')): ?>
|
||||
<div id="box-updated"
|
||||
class="round5"><?php echo __('Application successfully updated'); ?></div>
|
||||
<?php endif; ?>
|
||||
class="round5"><?php
|
||||
echo __('Application successfully updated'); ?></div>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($_getvar('isDemo')): ?>
|
||||
<?php
|
||||
if ($_getvar('isDemo')): ?>
|
||||
<div id="demo-info">
|
||||
<ul>
|
||||
<li title="<?php echo __('User'); ?>">
|
||||
<li title="<?php
|
||||
echo __('User'); ?>">
|
||||
<i class="material-icons">perm_identity</i>
|
||||
<span>demo</span>
|
||||
</li>
|
||||
<li title="<?php echo __('Password'); ?>">
|
||||
<li title="<?php
|
||||
echo __('Password'); ?>">
|
||||
<i class="material-icons">vpn_key</i>
|
||||
<span>syspass</span>
|
||||
</li>
|
||||
<li title="<?php echo __('Master Password'); ?>">
|
||||
<li title="<?php
|
||||
echo __('Master Password'); ?>">
|
||||
<i class="material-icons">vpn_key</i>
|
||||
<span>12345678900</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,30 +23,39 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<?php if ($_getvar('numNotices', 0) > 0): ?>
|
||||
<?php
|
||||
if ($_getvar('numNotices', 0) > 0): ?>
|
||||
<a href="https://github.com/nuxsmin/sysPass/labels/Notices" target="_blank">
|
||||
<div id="notices-info"
|
||||
class="material-icons mdl-badge mdl-badge--overlap mdl-color-text--amber-200"
|
||||
data-badge="<?php echo $_getvar('numNotices'); ?>">feedback
|
||||
data-badge="<?php
|
||||
echo $_getvar('numNotices'); ?>">feedback
|
||||
</div>
|
||||
</a>
|
||||
<span for="notices-info"
|
||||
class="mdl-tooltip mdl-tooltip--top"><?php echo $_getvar('noticesTitle'); ?></span>
|
||||
<?php endif; ?>
|
||||
class="mdl-tooltip mdl-tooltip--top"><?php
|
||||
echo $_getvar('noticesTitle'); ?></span>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($_getvar('hasUpdates')): ?>
|
||||
<a id="link-updates" href="<?php echo $_getvar('url'); ?>" target="_blank">
|
||||
<?php echo $_getvar('title'); ?>
|
||||
<?php
|
||||
if ($_getvar('hasUpdates')): ?>
|
||||
<a id="link-updates" href="<?php
|
||||
echo $_getvar('url'); ?>" target="_blank">
|
||||
<?php
|
||||
echo $_getvar('title'); ?>
|
||||
|
||||
<div id="help-hasupdates"
|
||||
class="icon material-icons mdl-color-text--indigo-200">
|
||||
@@ -54,18 +63,24 @@ use SP\Core\UI\ThemeIcons;
|
||||
</div>
|
||||
</a>
|
||||
<span for="link-updates"
|
||||
class="mdl-tooltip mdl-tooltip--top"><?php echo $_getvar('description'); ?></span>
|
||||
<?php elseif ($_getvar('updateStatus') === true): ?>
|
||||
class="mdl-tooltip mdl-tooltip--top"><?php
|
||||
echo $_getvar('description'); ?></span>
|
||||
<?php
|
||||
elseif ($_getvar('updateStatus') === true): ?>
|
||||
<div id="updates-info" class="icon material-icons mdl-color-text--teal-200">
|
||||
check_circle
|
||||
</div>
|
||||
<span for="updates-info"
|
||||
class="mdl-tooltip mdl-tooltip--top"><?php echo __('Updated'); ?></span>
|
||||
<?php elseif ($_getvar('updateStatus') === false): ?>
|
||||
class="mdl-tooltip mdl-tooltip--top"><?php
|
||||
echo __('Updated'); ?></span>
|
||||
<?php
|
||||
elseif ($_getvar('updateStatus') === false): ?>
|
||||
<div id="updates-info"
|
||||
class="icon material-icons mdl-color-text--amber-200">
|
||||
warning
|
||||
</div>
|
||||
<span for="updates-info"
|
||||
class="mdl-tooltip mdl-tooltip--top"><?php echo __('Error while checking for updates'); ?></span>
|
||||
<?php endif; ?>
|
||||
class="mdl-tooltip mdl-tooltip--top"><?php
|
||||
echo __('Error while checking for updates'); ?></span>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,16 +23,20 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
?>
|
||||
<main class="mdl-layout__content">
|
||||
<div id="actions" class="upgrade">
|
||||
<div id="page-title">
|
||||
<h1><?php use SP\Core\UI\ThemeIcons;
|
||||
<h1><?php
|
||||
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
use SP\Util\VersionUtil;
|
||||
|
||||
printf(__('Update %s'), $_getvar('upgradeVersion')); ?></h1>
|
||||
@@ -41,46 +45,66 @@
|
||||
<form id="frmUpgrade" method="get" class="form-action"
|
||||
data-onsubmit="main/upgrade">
|
||||
<fieldset>
|
||||
<?php if ($_getvar('type') === 'db'): ?>
|
||||
<legend><?php echo __('DB Update'); ?></legend>
|
||||
<?php elseif ($_getvar('type') === 'app'): ?>
|
||||
<legend><?php echo __('Application Update'); ?></legend>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($_getvar('type') === 'db'): ?>
|
||||
<legend><?php
|
||||
echo __('DB Update'); ?></legend>
|
||||
<?php
|
||||
elseif ($_getvar('type') === 'app'): ?>
|
||||
<legend><?php
|
||||
echo __('Application Update'); ?></legend>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="h" name="h" type="text" required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off" autofocus>
|
||||
<label class="mdl-textfield__label"
|
||||
for="h"><?php echo __('Security Code'); ?></label>
|
||||
for="h"><?php
|
||||
echo __('Security Code'); ?></label>
|
||||
</div>
|
||||
|
||||
<div id="help-code"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>">
|
||||
<?php echo $icons->getIconHelp()->getIcon(); ?>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>">
|
||||
<?php
|
||||
echo $icons->help()->getIcon(); ?>
|
||||
</div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large" for="help-code">
|
||||
<?php echo __('This code is set in sysPass config file within the tag name "upgradekey"'); ?>
|
||||
<?php
|
||||
echo __('This code is set in sysPass config file within the tag name "upgradekey"'); ?>
|
||||
</div>
|
||||
|
||||
<?php if (VersionUtil::checkVersion($_getvar('version'), '130.16011001')
|
||||
&& count($_getvar('constraints')) > 0):
|
||||
<?php
|
||||
if (VersionUtil::checkVersion($_getvar('version'), '130.16011001')
|
||||
&& count($_getvar('constraints')) > 0
|
||||
):
|
||||
?>
|
||||
<div>
|
||||
<ul class="errors">
|
||||
<li class="msg-warning">
|
||||
<i class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></i>
|
||||
<?php echo __('Some orphaned items have been found. Please, modify those items or enter the default IDs for them.'); ?>
|
||||
<i class="icon material-icons <?php
|
||||
echo $icons->warning()->getClass(); ?>"><?php
|
||||
echo $icons->warning()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo __(
|
||||
'Some orphaned items have been found. Please, modify those items or enter the default IDs for them.'
|
||||
); ?>
|
||||
<br>
|
||||
<?php echo __('If items IDs are not set, they will be created.'); ?>
|
||||
<?php
|
||||
echo __('If items IDs are not set, they will be created.'); ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="errors">
|
||||
<?php foreach ($_getvar('constraints') as $msg): ?>
|
||||
<li class="msg-warning"><?php echo $msg; ?></li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
foreach ($_getvar('constraints') as $msg): ?>
|
||||
<li class="msg-warning"><?php
|
||||
echo $msg; ?></li>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -98,65 +122,97 @@
|
||||
autocomplete="off" min="0" max="1000"
|
||||
value="0">
|
||||
<label class="mdl-textfield__label"
|
||||
for="userid"><?php echo __('Enter a valid user ID for the accounts'); ?></label>
|
||||
for="userid"><?php
|
||||
echo __('Enter a valid user ID for the accounts'); ?></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($checkConstraints->accounts_category > 0
|
||||
|| $checkConstraints->accountshistory_category > 0): ?>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="categoryid" name="categoryid" type="number"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off" min="0" max="1000" value="0">
|
||||
<label class="mdl-textfield__label"
|
||||
for="categoryid"><?php echo __('Enter a valid category ID for the accounts'); ?></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($checkConstraints->accounts_category > 0
|
||||
|| $checkConstraints->accountshistory_category > 0
|
||||
): ?>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="categoryid" name="categoryid" type="number"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off" min="0" max="1000" value="0">
|
||||
<label class="mdl-textfield__label"
|
||||
for="categoryid"><?php
|
||||
echo __('Enter a valid category ID for the accounts'); ?></label>
|
||||
</div>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($checkConstraints->accounts_customer > 0
|
||||
|| $checkConstraints->accountshistory_customer > 0): ?>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="customerid" name="customerid" type="number"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off" min="0" max="1000" value="0">
|
||||
<label class="mdl-textfield__label"
|
||||
for="customerid"><?php echo __('Enter a valid client ID for the accounts'); ?></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($checkConstraints->accounts_customer > 0
|
||||
|| $checkConstraints->accountshistory_customer > 0
|
||||
): ?>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="customerid" name="customerid" type="number"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off" min="0" max="1000" value="0">
|
||||
<label class="mdl-textfield__label"
|
||||
for="customerid"><?php
|
||||
echo __('Enter a valid client ID for the accounts'); ?></label>
|
||||
</div>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($checkConstraints->users_group > 0
|
||||
|| $checkConstraints->accounts_group > 0
|
||||
|| $checkConstraints->accountshistory_group > 0): ?>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="groupid" name="groupid" type="number"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off" min="0" max="1000" value="0">
|
||||
<label class="mdl-textfield__label"
|
||||
for="groupid"><?php echo __('Enter a valid group ID for the users'); ?></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($checkConstraints->users_group > 0
|
||||
|| $checkConstraints->accounts_group > 0
|
||||
|| $checkConstraints->accountshistory_group > 0
|
||||
): ?>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="groupid" name="groupid" type="number"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off" min="0" max="1000" value="0">
|
||||
<label class="mdl-textfield__label"
|
||||
for="groupid"><?php
|
||||
echo __('Enter a valid group ID for the users'); ?></label>
|
||||
</div>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if ($checkConstraints->users_profile > 0): ?>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="profileid" name="profileid" type="number"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off" min="0" max="1000" value="0">
|
||||
<label class="mdl-textfield__label"
|
||||
for="profileid"><?php echo __('Enter a valid profile ID for the users'); ?></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
if ($checkConstraints->users_profile > 0): ?>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="profileid" name="profileid" type="number"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off" min="0" max="1000" value="0">
|
||||
<label class="mdl-textfield__label"
|
||||
for="profileid"><?php
|
||||
echo __('Enter a valid profile ID for the users'); ?></label>
|
||||
</div>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<?php if (VersionUtil::checkVersion($_getvar('version'), '210.17022601')): ?>
|
||||
<?php
|
||||
if (VersionUtil::checkVersion($_getvar('version'), '210.17022601')): ?>
|
||||
<div>
|
||||
<ul class="errors">
|
||||
<li class="msg-warning">
|
||||
<i class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></i>
|
||||
<?php echo __('This update uses a new encryption schema, so it will be needed to reencrypt the whole encrypted data.'); ?>
|
||||
<i class="icon material-icons <?php
|
||||
echo $icons->warning()->getClass(); ?>"><?php
|
||||
echo $icons->warning()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo __(
|
||||
'This update uses a new encryption schema, so it will be needed to reencrypt the whole encrypted data.'
|
||||
); ?>
|
||||
<br>
|
||||
<strong><?php printf(__('It will be updated %s accounts. This process could take some time long.'), $_getvar('numAccounts')); ?></strong>
|
||||
<strong><?php
|
||||
printf(
|
||||
__('It will be updated %s accounts. This process could take some time long.'),
|
||||
$_getvar('numAccounts')
|
||||
); ?></strong>
|
||||
<br>
|
||||
<?php printf(__('You could get more info on: %s'), '<a target="_blank" href="https://doc.syspass.org">https://doc.syspass.org</a>'); ?>
|
||||
<?php
|
||||
printf(
|
||||
__('You could get more info on: %s'),
|
||||
'<a target="_blank" href="https://doc.syspass.org">https://doc.syspass.org</a>'
|
||||
); ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -166,7 +222,8 @@
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400 passwordfield__input-show"
|
||||
maxlength="255" required/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="masterkey"><?php echo __('Current Master Password'); ?></label>
|
||||
for="masterkey"><?php
|
||||
echo __('Current Master Password'); ?></label>
|
||||
</div>
|
||||
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
@@ -175,30 +232,39 @@
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="userlogin"><?php echo __('Enter a valid user login'); ?></label>
|
||||
for="userlogin"><?php
|
||||
echo __('Enter a valid user login'); ?></label>
|
||||
</div>
|
||||
|
||||
<?php if ($_getvar('numAccounts') >= 500): ?>
|
||||
<?php
|
||||
if ($_getvar('numAccounts') >= 500): ?>
|
||||
<input type="hidden" name="useTask" value="1">
|
||||
<input type="hidden" name="taskId"
|
||||
value="<?php echo $_getvar('taskId'); ?>">
|
||||
value="<?php
|
||||
echo $_getvar('taskId'); ?>">
|
||||
<input type="hidden" name="lock" value="upgrade">
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect"
|
||||
for="chkConfirm">
|
||||
<input type="checkbox" id="chkConfirm"
|
||||
class="mdl-checkbox__input" name="chkConfirm">
|
||||
<span class="mdl-checkbox__label"><?php echo __('I\'ve done a full sysPass backup'); ?></span>
|
||||
<span class="mdl-checkbox__label"><?php
|
||||
echo __('I\'ve done a full sysPass backup'); ?></span>
|
||||
</label>
|
||||
|
||||
<input type="hidden" name="a"
|
||||
value="<?php echo $_getvar('action'); ?>">
|
||||
value="<?php
|
||||
echo $_getvar('action'); ?>">
|
||||
<input type="hidden" name="type"
|
||||
value="<?php echo $_getvar('type'); ?>">
|
||||
value="<?php
|
||||
echo $_getvar('type'); ?>">
|
||||
<input type="hidden" name="version"
|
||||
value="<?php echo $_getvar('version'); ?>">
|
||||
value="<?php
|
||||
echo $_getvar('version'); ?>">
|
||||
<input type="hidden" name="upgrade" value="1">
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</fieldset>
|
||||
@@ -206,8 +272,11 @@
|
||||
<div>
|
||||
<ul class="errors">
|
||||
<li class="msg-warning">
|
||||
<i class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></i>
|
||||
<?php echo __('Please, wait while the process is running'); ?>
|
||||
<i class="icon material-icons <?php
|
||||
echo $icons->warning()->getClass(); ?>"><?php
|
||||
echo $icons->warning()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo __('Please, wait while the process is running'); ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -216,9 +285,12 @@
|
||||
<button id="btnChange"
|
||||
class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent"
|
||||
type="submit">
|
||||
<?php echo __('Update'); ?>
|
||||
<?php
|
||||
echo __('Update'); ?>
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Start Update'); ?>"><?php echo $icons->getIconPlay()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Start Update'); ?>"><?php
|
||||
echo $icons->play()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,165 +24,220 @@
|
||||
|
||||
/**
|
||||
* @var NotificationData $notification
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\NotificationData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
use SP\Util\DateUtil;
|
||||
|
||||
$notification = $_getvar('notification');
|
||||
?>
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<form method="post" name="frmNotices" id="frmNotices" class="form-action"
|
||||
data-onsubmit="notification/save"
|
||||
data-route="<?php echo $_getvar('route', ''); ?>"
|
||||
data-action-next="<?php echo $_getvar('nextAction'); ?>"
|
||||
data-route="<?php
|
||||
echo $_getvar('route', ''); ?>"
|
||||
data-action-next="<?php
|
||||
echo $_getvar('nextAction'); ?>"
|
||||
data-hash="">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Type'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Type'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="notification_type" name="notification_type"
|
||||
type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo $notification->getType(); ?>" <?php echo $_getvar('disabled'); ?>>
|
||||
value="<?php
|
||||
echo $notification->getType(); ?>" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="notification_type"><?php echo __('Type'); ?></label>
|
||||
for="notification_type"><?php
|
||||
echo __('Type'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Component'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Component'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="notification_component"
|
||||
name="notification_component" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo $notification->getComponent(); ?>" <?php echo $_getvar('disabled'); ?>>
|
||||
value="<?php
|
||||
echo $notification->getComponent(); ?>" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="notification_component"><?php echo __('Component'); ?></label>
|
||||
for="notification_component"><?php
|
||||
echo __('Component'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($_getvar('isView')): ?>
|
||||
<?php
|
||||
if ($_getvar('isView')): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Date'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Date'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="notification_date"
|
||||
name="notification_date" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo DateUtil::getDateFromUnix($notification->getDate()); ?>"
|
||||
<?php echo $_getvar('disabled'); ?>>
|
||||
value="<?php
|
||||
echo DateUtil::getDateFromUnix($notification->getDate()); ?>"
|
||||
<?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="notification_date"><?php echo __('Date'); ?></label>
|
||||
for="notification_date"><?php
|
||||
echo __('Date'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Description'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Description'); ?></td>
|
||||
<td class="valField">
|
||||
<?php if ($_getvar('isView') === false): ?>
|
||||
<?php
|
||||
if ($_getvar('isView') === false): ?>
|
||||
<div class="mdl-textfield mdl-js-textfield">
|
||||
<textarea
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
type="text" rows="3"
|
||||
id="notification_description"
|
||||
name="notification_description" <?php echo $_getvar('readonly'); ?>>
|
||||
<?php echo htmlspecialchars($notification->getDescription(), ENT_QUOTES); ?>
|
||||
name="notification_description" <?php
|
||||
echo $_getvar('readonly'); ?>>
|
||||
<?php
|
||||
echo htmlspecialchars($notification->getDescription(), ENT_QUOTES); ?>
|
||||
</textarea>
|
||||
<label class="mdl-textfield__label"
|
||||
for="notification_description"><?php echo __('Description'); ?></label>
|
||||
for="notification_description"><?php
|
||||
echo __('Description'); ?></label>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<div class="notification-description">
|
||||
<?php echo htmlspecialchars($notification->getDescription(), ENT_QUOTES); ?>
|
||||
<?php
|
||||
echo htmlspecialchars($notification->getDescription(), ENT_QUOTES); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if (!$_getvar('isView') && $_getvar('ctx_userIsAdminApp')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView') && $_getvar('ctx_userIsAdminApp')): ?>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('User'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('User'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('User'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('User'); ?></div>
|
||||
|
||||
<select id="notification_user" name="notification_user"
|
||||
class="select-box select-box-deselect" <?php echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php echo __('Select User'); ?></option>
|
||||
<?php /** @var SelectItem $user */
|
||||
class="select-box select-box-deselect" <?php
|
||||
echo $_getvar('disabled'); ?>>
|
||||
<option value=""><?php
|
||||
echo __('Select User'); ?></option>
|
||||
<?php
|
||||
/** @var SelectItem $user */
|
||||
foreach ($_getvar('users') as $user): ?>
|
||||
<option value="<?php echo $user->getId(); ?>"
|
||||
<?php echo $user->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars($user->getName(), ENT_QUOTES); ?>
|
||||
<option value="<?php
|
||||
echo $user->getId(); ?>"
|
||||
<?php
|
||||
echo $user->isSelected() ? 'selected' : ''; ?>>
|
||||
<?php
|
||||
echo htmlspecialchars($user->getName(), ENT_QUOTES); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Options'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Options'); ?></td>
|
||||
<td class="valField checkbox">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect"
|
||||
for="notification_sticky"
|
||||
title="<?php echo __('Global notification'); ?>">
|
||||
title="<?php
|
||||
echo __('Global notification'); ?>">
|
||||
<input type="checkbox" id="notification_sticky"
|
||||
class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="notification_sticky" <?php echo $notification->isSticky() ? 'checked'
|
||||
: ' '; ?> <?php echo $_getvar('disabled'); ?>/>
|
||||
<span class="mdl-switch__label"><?php echo __('Global'); ?></span>
|
||||
name="notification_sticky" <?php
|
||||
echo $notification->isSticky() ? 'checked'
|
||||
: ' '; ?> <?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
<span class="mdl-switch__label"><?php
|
||||
echo __('Global'); ?></span>
|
||||
</label>
|
||||
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect"
|
||||
for="notification_onlyadmin"
|
||||
title="<?php echo __('Only for application administrators'); ?>">
|
||||
title="<?php
|
||||
echo __('Only for application administrators'); ?>">
|
||||
<input type="checkbox" id="notification_onlyadmin"
|
||||
class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="notification_onlyadmin"
|
||||
<?php echo $notification->isOnlyAdmin() ? 'checked' : ' '; ?>
|
||||
<?php echo $_getvar('disabled'); ?>/>
|
||||
<span class="mdl-switch__label"><?php echo __('Only Admins'); ?></span>
|
||||
<?php
|
||||
echo $notification->isOnlyAdmin() ? 'checked' : ' '; ?>
|
||||
<?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
<span class="mdl-switch__label"><?php
|
||||
echo __('Only Admins'); ?></span>
|
||||
</label>
|
||||
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect"
|
||||
for="notification_checkout"
|
||||
title="<?php echo __('Read'); ?>">
|
||||
title="<?php
|
||||
echo __('Read'); ?>">
|
||||
<input type="checkbox" id="notification_checkout"
|
||||
class="mdl-switch__input mdl-color-text--indigo-400"
|
||||
name="notification_checkout"
|
||||
<?php echo $notification->isChecked() ? 'checked' : ' '; ?>
|
||||
<?php echo $_getvar('disabled'); ?>/>
|
||||
<span class="mdl-switch__label"><?php echo __('Read'); ?></span>
|
||||
<?php
|
||||
echo $notification->isChecked() ? 'checked' : ' '; ?>
|
||||
<?php
|
||||
echo $_getvar('disabled'); ?>/>
|
||||
<span class="mdl-switch__label"><?php
|
||||
echo __('Read'); ?></span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<?php if (!$_getvar('isView')): ?>
|
||||
<?php
|
||||
if (!$_getvar('isView')): ?>
|
||||
<div class="action-in-box">
|
||||
<button
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave(
|
||||
)->getClassButton(); ?>"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
form="frmNotices"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -25,14 +25,16 @@
|
||||
/**
|
||||
* @var PluginModel $plugin
|
||||
* @var PluginInterface $pluginInfo
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Infrastructure\Plugin\Repositories\PluginModel;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
use SP\Plugin\PluginInterface;
|
||||
|
||||
$plugin = $_getvar('plugin');
|
||||
@@ -40,76 +42,98 @@ $pluginInfo = $_getvar('pluginInfo');
|
||||
?>
|
||||
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $_getvar('header'); ?><i
|
||||
<h2 class="center"><?php
|
||||
echo $_getvar('header'); ?><i
|
||||
class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
<form method="post" name="frmCategories" id="frmPlugins">
|
||||
<table class="popup-data">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Name'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Name'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="name" name="name" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo $plugin->getName(); ?>" <?php echo $_getvar('readonly'); ?>>
|
||||
value="<?php
|
||||
echo $plugin->getName(); ?>" <?php
|
||||
echo $_getvar('readonly'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="name"><?php echo __('Plugin name'); ?></label>
|
||||
for="name"><?php
|
||||
echo __('Plugin name'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Version'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Version'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="version" name="version" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo implode('.', $pluginInfo->getVersion()); ?>" <?php echo $_getvar('readonly'); ?>>
|
||||
value="<?php
|
||||
echo implode('.', $pluginInfo->getVersion()); ?>" <?php
|
||||
echo $_getvar('readonly'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="version"><?php echo __('Plugin version'); ?></label>
|
||||
for="version"><?php
|
||||
echo __('Plugin version'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Compatible Version'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Compatible Version'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="compatible_version" name="compatible_version"
|
||||
type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo implode('.', $pluginInfo->getCompatibleVersion()); ?>" <?php echo $_getvar('readonly'); ?>>
|
||||
value="<?php
|
||||
echo implode('.', $pluginInfo->getCompatibleVersion()); ?>" <?php
|
||||
echo $_getvar('readonly'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="compatible_version"><?php echo __('sysPass compatible version'); ?></label>
|
||||
for="compatible_version"><?php
|
||||
echo __('sysPass compatible version'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Author'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Author'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input id="author" name="author" type="text"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo $pluginInfo->getAuthor(); ?>" <?php echo $_getvar('readonly'); ?>>
|
||||
value="<?php
|
||||
echo $pluginInfo->getAuthor(); ?>" <?php
|
||||
echo $_getvar('readonly'); ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="author"><?php echo __('Plugin author'); ?></label>
|
||||
for="author"><?php
|
||||
echo __('Plugin author'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Events'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Events'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Events'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Events'); ?></div>
|
||||
|
||||
<div class="list-wrap">
|
||||
<ul class="mdl-list">
|
||||
<?php foreach ($pluginInfo->getEvents() as $event): ?>
|
||||
<?php
|
||||
foreach ($pluginInfo->getEvents() as $event): ?>
|
||||
<li class="mdl-list__item">
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<i class="material-icons mdl-list__item-icon">flash_on</i>
|
||||
<?php echo $event; ?>
|
||||
<?php
|
||||
echo $event; ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -1,23 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var ThemeIcons $icons
|
||||
/*
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* sysPass is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Mvc\View\Template;
|
||||
/**
|
||||
* @var TemplateInterface $this
|
||||
* @var ThemeIconsInterface $icons
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
<div id="actions" class="installer" align="center">
|
||||
<ul class="errors round">
|
||||
<li class="msg-warning">
|
||||
<i class="material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></i>
|
||||
<strong><?php echo __('The application needs to be updated'); ?></strong>
|
||||
<i class="material-icons <?php
|
||||
echo $icons->warning()->getClass(); ?>"><?php
|
||||
echo $icons->warning()->getIcon(); ?></i>
|
||||
<strong><?php
|
||||
echo __('The application needs to be updated'); ?></strong>
|
||||
<p class="hint">
|
||||
<?php echo __('Please contact to the administrator'); ?>
|
||||
<?php
|
||||
echo __('Please contact to the administrator'); ?>
|
||||
</p>
|
||||
<p class="hint">
|
||||
<?php echo __('Please enter the security code to start the upgrade'); ?>
|
||||
<?php
|
||||
echo __('Please enter the security code to start the upgrade'); ?>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -31,22 +59,27 @@ use SP\Mvc\View\Template;
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off" autofocus>
|
||||
<label class="mdl-textfield__label"
|
||||
for="key"><?php echo __('Security Code'); ?></label>
|
||||
for="key"><?php
|
||||
echo __('Security Code'); ?></label>
|
||||
</div>
|
||||
|
||||
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect"
|
||||
for="chkConfirm">
|
||||
<input type="checkbox" id="chkConfirm"
|
||||
class="mdl-checkbox__input" name="chkConfirm" required>
|
||||
<span class="mdl-checkbox__label"><?php echo __('I\'ve done a full sysPass backup'); ?></span>
|
||||
<span class="mdl-checkbox__label"><?php
|
||||
echo __('I\'ve done a full sysPass backup'); ?></span>
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
<div>
|
||||
<ul class="errors">
|
||||
<li class="msg-warning">
|
||||
<i class="icon material-icons <?php echo $icons->getIconWarning()->getClass(); ?>"><?php echo $icons->getIconWarning()->getIcon(); ?></i>
|
||||
<?php echo __('Please, wait while the process is running'); ?>
|
||||
<i class="icon material-icons <?php
|
||||
echo $icons->warning()->getClass(); ?>"><?php
|
||||
echo $icons->warning()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo __('Please, wait while the process is running'); ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -55,10 +88,13 @@ use SP\Mvc\View\Template;
|
||||
<button id="btnChange"
|
||||
class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent"
|
||||
type="submit">
|
||||
<?php echo __('Update'); ?>
|
||||
<?php
|
||||
echo __('Update'); ?>
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Start Update'); ?>"><?php echo $icons->getIconPlay()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Start Update'); ?>"><?php
|
||||
echo $icons->play()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,38 @@
|
||||
<?php /** @var $icons ThemeIcons */
|
||||
<?php
|
||||
/*
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
* sysPass is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* sysPass is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with sysPass. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons; ?>
|
||||
/** @var $icons ThemeIconsInterface */
|
||||
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
|
||||
?>
|
||||
|
||||
<div id="box-pub-noheader">
|
||||
<div class="box-spacer"></div>
|
||||
<div class="box-header">
|
||||
<?php echo __('Request Password Change'); ?>
|
||||
<?php
|
||||
echo __('Request Password Change'); ?>
|
||||
</div>
|
||||
<div id="box-passreset" class="box-form round">
|
||||
<form id="frmPassReset" action="" method="post" class="form-action"
|
||||
@@ -19,7 +46,8 @@ use SP\Core\UI\ThemeIcons; ?>
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off" autofocus>
|
||||
<label class="mdl-textfield__label"
|
||||
for="login"><?php echo __('User'); ?></label>
|
||||
for="login"><?php
|
||||
echo __('User'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
@@ -29,7 +57,8 @@ use SP\Core\UI\ThemeIcons; ?>
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="email"><?php echo __('User\'s Email'); ?></label>
|
||||
for="email"><?php
|
||||
echo __('User\'s Email'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
@@ -39,15 +68,21 @@ use SP\Core\UI\ThemeIcons; ?>
|
||||
<button id="btnBack" type="button"
|
||||
class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent">
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Go back to login'); ?>"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
<?php echo __('Back'); ?>
|
||||
title="<?php
|
||||
echo __('Go back to login'); ?>"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo __('Back'); ?>
|
||||
</button>
|
||||
|
||||
<button id="btnRequest"
|
||||
class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent">
|
||||
<?php echo __('Request'); ?>
|
||||
<?php
|
||||
echo __('Request'); ?>
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Request'); ?>"><?php echo $icons->getIconPlay()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Request'); ?>"><?php
|
||||
echo $icons->play()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,20 +23,23 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
?>
|
||||
|
||||
<div id="box-pub-noheader">
|
||||
<div class="box-spacer"></div>
|
||||
<div class="box-header">
|
||||
<?php echo __('Request Password Change'); ?>
|
||||
<?php
|
||||
echo __('Request Password Change'); ?>
|
||||
</div>
|
||||
<div id="box-passreset" class="box-form round">
|
||||
<form id="frmUserPassReset" action="" method="post" class="form-action"
|
||||
@@ -52,7 +55,8 @@ use SP\Core\UI\ThemeIcons;
|
||||
value="" maxlength="255"
|
||||
autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="password"><?php echo __('Password'); ?></label>
|
||||
for="password"><?php
|
||||
echo __('Password'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
@@ -64,11 +68,13 @@ use SP\Core\UI\ThemeIcons;
|
||||
value="" maxlength="255"
|
||||
autocomplete="off">
|
||||
<label class="mdl-textfield__label"
|
||||
for="password_repeat"><?php echo __('Password (repeat)'); ?></label>
|
||||
for="password_repeat"><?php
|
||||
echo __('Password (repeat)'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="hash"
|
||||
value="<?php echo $_getvar('hash'); ?>">
|
||||
value="<?php
|
||||
echo $_getvar('hash'); ?>">
|
||||
<input type="hidden" name="isAjax" value="1">
|
||||
</fieldset>
|
||||
|
||||
@@ -76,15 +82,21 @@ use SP\Core\UI\ThemeIcons;
|
||||
<button id="btnBack" type="button"
|
||||
class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent">
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Go back to login'); ?>"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
<?php echo __('Back'); ?>
|
||||
title="<?php
|
||||
echo __('Go back to login'); ?>"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
<?php
|
||||
echo __('Back'); ?>
|
||||
</button>
|
||||
|
||||
<button id="btnChange"
|
||||
class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent">
|
||||
<?php echo __('Change'); ?>
|
||||
<?php
|
||||
echo __('Change'); ?>
|
||||
<i class="material-icons"
|
||||
title="<?php echo __('Change'); ?>"><?php echo $icons->getIconPlay()->getIcon(); ?></i>
|
||||
title="<?php
|
||||
echo __('Change'); ?>"><?php
|
||||
echo $icons->play()->getIcon(); ?></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -24,71 +24,93 @@
|
||||
|
||||
/**
|
||||
* @var UserPreferencesData $userPreferences
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\DataModel\UserPreferencesData;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\Components\SelectItem;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$userPreferences = $_getvar('userPreferences');
|
||||
?>
|
||||
|
||||
<div id="title" class="titleNormal">
|
||||
<i class="material-icons">home</i>
|
||||
<?php echo __('Site'); ?>
|
||||
<?php
|
||||
echo __('Site'); ?>
|
||||
</div>
|
||||
|
||||
<form method="post" name="frmPreferences" id="frmPreferences"
|
||||
class="form-action"
|
||||
data-onsubmit="user/saveSettings"
|
||||
data-action-route="<?php echo $_getvar('route'); ?>"
|
||||
data-action-route="<?php
|
||||
echo $_getvar('route'); ?>"
|
||||
data-reload="1"
|
||||
data-hash="">
|
||||
|
||||
<table id="tblSite" class="data tblConfig round">
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Language'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Language'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Language'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Language'); ?></div>
|
||||
|
||||
<select name="userlang" id="sel-userlang" size="1"
|
||||
class="select-box sel-chosen-ns">
|
||||
<?php /** @var SelectItem $lang */
|
||||
<?php
|
||||
/** @var SelectItem $lang */
|
||||
foreach ($_getvar('langs') as $langName => $lang): ?>
|
||||
<option
|
||||
value='<?php echo $lang->getId(); ?>' <?php echo $lang->isSelected() ? 'selected' : ""; ?>><?php echo $lang->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value='<?php
|
||||
echo $lang->getId(); ?>' <?php
|
||||
echo $lang->isSelected() ? 'selected' : ""; ?>><?php
|
||||
echo $lang->getName(); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Visual Theme'); ?></td>
|
||||
<td class="descField"><?php
|
||||
echo __('Visual Theme'); ?></td>
|
||||
<td class="valField">
|
||||
<div class="lowres-title"><?php echo __('Visual Theme'); ?></div>
|
||||
<div class="lowres-title"><?php
|
||||
echo __('Visual Theme'); ?></div>
|
||||
|
||||
<select name="usertheme" id="sel-usertheme" size="1"
|
||||
class="select-box sel-chosen-ns">
|
||||
<?php /** @var SelectItem $theme */
|
||||
<?php
|
||||
/** @var SelectItem $theme */
|
||||
foreach ($_getvar('themes') as $theme): ?>
|
||||
<option
|
||||
value='<?php echo $theme->getId(); ?>' <?php echo $theme->isSelected() ? 'selected' : ""; ?>><?php echo $theme->getName(); ?></option>
|
||||
<?php endforeach; ?>
|
||||
value='<?php
|
||||
echo $theme->getId(); ?>' <?php
|
||||
echo $theme->isSelected() ? 'selected' : ""; ?>><?php
|
||||
echo $theme->getName(); ?></option>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="descField">
|
||||
<?php echo __('Results per page'); ?>
|
||||
<?php
|
||||
echo __('Results per page'); ?>
|
||||
<div id="help-account_count"
|
||||
class="icon material-icons <?php echo $icons->getIconHelp()->getClass(); ?>"><?php echo $icons->getIconHelp()->getIcon(); ?></div>
|
||||
class="icon material-icons <?php
|
||||
echo $icons->help()->getClass(); ?>"><?php
|
||||
echo $icons->help()->getIcon(); ?></div>
|
||||
<div class="mdl-tooltip mdl-tooltip--large"
|
||||
for="help-account_count">
|
||||
<p>
|
||||
<?php echo __('Number of results per page to display when performing a search.'); ?>
|
||||
<?php
|
||||
echo __('Number of results per page to display when performing a search.'); ?>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -99,10 +121,12 @@ $userPreferences = $_getvar('userPreferences');
|
||||
pattern="[0-9]{1,5}"
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
maxlength="5"
|
||||
value="<?php echo $userPreferences->getResultsPerPage(); ?>"
|
||||
value="<?php
|
||||
echo $userPreferences->getResultsPerPage(); ?>"
|
||||
required/>
|
||||
<label class="mdl-textfield__label"
|
||||
for="resultsperpage"><?php echo __('Results per page'); ?></label>
|
||||
for="resultsperpage"><?php
|
||||
echo __('Results per page'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -116,14 +140,17 @@ $userPreferences = $_getvar('userPreferences');
|
||||
for="account_link">
|
||||
<input type="checkbox" id="account_link"
|
||||
class="mdl-switch__input"
|
||||
name="account_link" <?php echo $userPreferences->isAccountLink() ? 'checked' : ''; ?>/>
|
||||
name="account_link" <?php
|
||||
echo $userPreferences->isAccountLink() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Account name as link'); ?></span>
|
||||
<span><?php
|
||||
echo __('Account name as link'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Enables to use the account name as a link to account details.'); ?>
|
||||
<?php
|
||||
echo __('Enables to use the account name as a link to account details.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -134,14 +161,17 @@ $userPreferences = $_getvar('userPreferences');
|
||||
for="sort_views">
|
||||
<input type="checkbox" id="sort_views"
|
||||
class="mdl-switch__input"
|
||||
name="sort_views" <?php echo $userPreferences->isSortViews() ? 'checked' : ''; ?>/>
|
||||
name="sort_views" <?php
|
||||
echo $userPreferences->isSortViews() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Sort search results by views'); ?></span>
|
||||
<span><?php
|
||||
echo __('Sort search results by views'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Sorts accounts search results by the number of account\'s views'); ?>
|
||||
<?php
|
||||
echo __('Sorts accounts search results by the number of account\'s views'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -152,14 +182,17 @@ $userPreferences = $_getvar('userPreferences');
|
||||
for="top_navbar">
|
||||
<input type="checkbox" id="top_navbar"
|
||||
class="mdl-switch__input"
|
||||
name="top_navbar" <?php echo $userPreferences->isTopNavbar() ? 'checked' : ''; ?>/>
|
||||
name="top_navbar" <?php
|
||||
echo $userPreferences->isTopNavbar() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Navigation bar on top'); ?></span>
|
||||
<span><?php
|
||||
echo __('Navigation bar on top'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Displays a navigation bar on top of the search results.'); ?>
|
||||
<?php
|
||||
echo __('Displays a navigation bar on top of the search results.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -170,14 +203,17 @@ $userPreferences = $_getvar('userPreferences');
|
||||
for="optional_actions">
|
||||
<input type="checkbox" id="optional_actions"
|
||||
class="mdl-switch__input"
|
||||
name="optional_actions" <?php echo $userPreferences->isOptionalActions() ? 'checked' : ''; ?>/>
|
||||
name="optional_actions" <?php
|
||||
echo $userPreferences->isOptionalActions() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Show Hidden Actions'); ?></span>
|
||||
<span><?php
|
||||
echo __('Show Hidden Actions'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Always display hidden actions on the accounts search page.'); ?>
|
||||
<?php
|
||||
echo __('Always display hidden actions on the accounts search page.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -188,14 +224,17 @@ $userPreferences = $_getvar('userPreferences');
|
||||
for="resultsascards">
|
||||
<input type="checkbox" id="resultsascards"
|
||||
class="mdl-switch__input"
|
||||
name="resultsascards" <?php echo $userPreferences->isResultsAsCards() ? 'checked' : ''; ?>/>
|
||||
name="resultsascards" <?php
|
||||
echo $userPreferences->isResultsAsCards() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Results like Cards'); ?></span>
|
||||
<span><?php
|
||||
echo __('Results like Cards'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Displays account\'s search results on a card like format.'); ?>
|
||||
<?php
|
||||
echo __('Displays account\'s search results on a card like format.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -206,14 +245,17 @@ $userPreferences = $_getvar('userPreferences');
|
||||
for="check_notifications">
|
||||
<input type="checkbox" id="check_notifications"
|
||||
class="mdl-switch__input"
|
||||
name="check_notifications" <?php echo $userPreferences->isCheckNotifications() ? 'checked' : ''; ?>/>
|
||||
name="check_notifications" <?php
|
||||
echo $userPreferences->isCheckNotifications() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('In-App Notifications'); ?></span>
|
||||
<span><?php
|
||||
echo __('In-App Notifications'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Enables the active In-App notifications polling'); ?>
|
||||
<?php
|
||||
echo __('Enables the active In-App notifications polling'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -225,14 +267,17 @@ $userPreferences = $_getvar('userPreferences');
|
||||
<input type="checkbox"
|
||||
id="show_account_search_filters"
|
||||
class="mdl-switch__input"
|
||||
name="show_account_search_filters" <?php echo $userPreferences->isShowAccountSearchFilters() ? 'checked' : ''; ?>/>
|
||||
name="show_account_search_filters" <?php
|
||||
echo $userPreferences->isShowAccountSearchFilters() ? 'checked' : ''; ?>/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<span class="mdl-list__item-primary-content">
|
||||
<span><?php echo __('Show Filters'); ?></span>
|
||||
<span><?php
|
||||
echo __('Show Filters'); ?></span>
|
||||
<span class="mdl-list__item-sub-title">
|
||||
<?php echo __('Displays the additional filters selection on the accounts search.'); ?>
|
||||
<?php
|
||||
echo __('Displays the additional filters selection on the accounts search.'); ?>
|
||||
</span>
|
||||
</span>
|
||||
</li>
|
||||
@@ -247,16 +292,22 @@ $userPreferences = $_getvar('userPreferences');
|
||||
<ul>
|
||||
<li>
|
||||
<button id="btnBack" type="button"
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconBack()->getClassButton(); ?>"
|
||||
title="<?php echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconBack()->getIcon(); ?></i>
|
||||
class="btn-back mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->back()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo __('Back'); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->back()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button form="frmPreferences"
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php echo $icons->getIconSave()->getClassButton(); ?>"
|
||||
title="<?php echo $icons->getIconSave()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php echo $icons->getIconSave()->getIcon(); ?></i>
|
||||
class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored <?php
|
||||
echo $icons->save()->getClassButton(); ?>"
|
||||
title="<?php
|
||||
echo $icons->save()->getTitle(); ?>">
|
||||
<i class="material-icons"><?php
|
||||
echo $icons->save()->getIcon(); ?></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2022, Rubén Domínguez nuxsmin@$syspass.org
|
||||
* @copyright 2012-2023, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
*
|
||||
@@ -23,13 +23,15 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var ThemeIcons $icons
|
||||
* @var \SP\Domain\Config\Ports\ConfigDataInterface $configData
|
||||
* @var ThemeIconsInterface $icons
|
||||
* @var ConfigDataInterface $configData
|
||||
* @var callable $_getvar
|
||||
* @var \SP\Mvc\View\TemplateInterface $this
|
||||
* @var TemplateInterface $this
|
||||
*/
|
||||
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Core\UI\ThemeIconsInterface;
|
||||
use SP\Domain\Config\Ports\ConfigDataInterface;
|
||||
use SP\Mvc\View\TemplateInterface;
|
||||
|
||||
$header = $_getvar('header');
|
||||
$pageData = $_getvar('pageData');
|
||||
@@ -38,31 +40,58 @@ $pageInfo = $_getvar('pageInfo');
|
||||
?>
|
||||
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo (is_array($header) && !empty($header[0])) ? $header[0] : __('View Wiki'); ?></h2>
|
||||
<h2 class="center"><?php
|
||||
echo (is_array($header) && !empty($header[0])) ? $header[0] : __('View Wiki'); ?></h2>
|
||||
|
||||
<div id="wikiPage">
|
||||
<?php if (is_array($pageData) && !empty($pageData[0])): ?>
|
||||
<?php echo $pageData[0]; ?>
|
||||
<?php elseif (count($pageSearch) > 0): ?>
|
||||
<h1><?php echo __('Page not found'); ?></h1>
|
||||
<?php
|
||||
if (is_array($pageData) && !empty($pageData[0])): ?>
|
||||
<?php
|
||||
echo $pageData[0]; ?>
|
||||
<?php
|
||||
elseif (count($pageSearch) > 0): ?>
|
||||
<h1><?php
|
||||
echo __('Page not found'); ?></h1>
|
||||
<hr>
|
||||
<?php printf(__('Search results of \'%s\''), $_getvar('pageName')); ?>
|
||||
<?php
|
||||
printf(__('Search results of \'%s\''), $_getvar('pageName')); ?>
|
||||
<ul>
|
||||
<?php foreach ($pageSearch as $result): ?>
|
||||
<li><?php printf('%s: <a href="%s" target="_blank">%s</a>', __('Page'), $_getvar('wikiUrlBase') . '/' . $result['id'], $result['id']); ?></li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
foreach ($pageSearch as $result): ?>
|
||||
<li><?php
|
||||
printf(
|
||||
'%s: <a href="%s" target="_blank">%s</a>',
|
||||
__('Page'),
|
||||
$_getvar('wikiUrlBase') . '/' . $result['id'],
|
||||
$result['id']
|
||||
); ?></li>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<h1><?php echo __('Page not found'); ?></h1>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
else: ?>
|
||||
<h1><?php
|
||||
echo __('Page not found'); ?></h1>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
<div id="wikiPageInfo">
|
||||
<?php if ($pageInfo): ?>
|
||||
<?php
|
||||
if ($pageInfo): ?>
|
||||
<ul>
|
||||
<li><?php printf('%s: <a href="%s" target="_blank">%s</a>', __('Page'), $_getvar('wikiUrlBase') . $pageInfo['name'], $pageInfo['name']); ?></li>
|
||||
<li><?php printf('%s: %s', __('Date'), $pageInfo['lastModified']); ?></li>
|
||||
<li><?php printf('%s: %s', __('Author'), $pageInfo['author']); ?></li>
|
||||
<li><?php
|
||||
printf(
|
||||
'%s: <a href="%s" target="_blank">%s</a>',
|
||||
__('Page'),
|
||||
$_getvar('wikiUrlBase') . $pageInfo['name'],
|
||||
$pageInfo['name']
|
||||
); ?></li>
|
||||
<li><?php
|
||||
printf('%s: %s', __('Date'), $pageInfo['lastModified']); ?></li>
|
||||
<li><?php
|
||||
printf('%s: %s', __('Author'), $pageInfo['author']); ?></li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
namespace SP\Core;
|
||||
|
||||
use SP\Core\Context\ContextInterface;
|
||||
use SP\Core\Context\SessionContextInterface;
|
||||
use SP\Core\Events\EventDispatcherInterface;
|
||||
use SP\Domain\Config\Ports\ConfigInterface;
|
||||
|
||||
@@ -38,12 +39,12 @@ final class Application
|
||||
*
|
||||
* @param ConfigInterface $config
|
||||
* @param EventDispatcherInterface $eventDispatcher
|
||||
* @param ContextInterface $context
|
||||
* @param SessionContextInterface|ContextInterface $context
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly ConfigInterface $config,
|
||||
private readonly EventDispatcherInterface $eventDispatcher,
|
||||
private readonly ContextInterface $context
|
||||
private readonly ConfigInterface $config,
|
||||
private readonly EventDispatcherInterface $eventDispatcher,
|
||||
private readonly SessionContextInterface|ContextInterface $context
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -57,7 +58,7 @@ final class Application
|
||||
return $this->eventDispatcher;
|
||||
}
|
||||
|
||||
public function getContext(): ContextInterface
|
||||
public function getContext(): ContextInterface|SessionContextInterface
|
||||
{
|
||||
return $this->context;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user