mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-04 07:34:09 +01:00
* [MOD] Improved mail event handling
* [FIX] Bugfixes. Work in progress
This commit is contained in:
@@ -34,7 +34,7 @@ use SP\Core\Events\EventMessage;
|
||||
use SP\Core\Exceptions\SPException;
|
||||
use SP\Core\Exceptions\ValidationException;
|
||||
use SP\Core\Session\Session;
|
||||
use SP\Core\UI\ThemeIconsBase;
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\DataModel\AccountExtData;
|
||||
use SP\Http\JsonResponse;
|
||||
use SP\Http\Request;
|
||||
@@ -70,7 +70,7 @@ class AccountController extends ControllerBase implements CrudControllerInterfac
|
||||
*/
|
||||
protected $accountService;
|
||||
/**
|
||||
* @var ThemeIconsBase
|
||||
* @var ThemeIcons
|
||||
*/
|
||||
protected $icons;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ use SP\Account\AccountAcl;
|
||||
use SP\Account\AccountSearchItem;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\UI\ThemeIconsBase;
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Html\DataGrid\DataGridAction;
|
||||
use SP\Html\DataGrid\DataGridActionType;
|
||||
use SP\Modules\Web\Controllers\Helpers\HelperBase;
|
||||
@@ -41,7 +41,7 @@ use SP\Modules\Web\Controllers\Helpers\HelperBase;
|
||||
class AccountActionsHelper extends HelperBase
|
||||
{
|
||||
/**
|
||||
* @var ThemeIconsBase
|
||||
* @var ThemeIcons
|
||||
*/
|
||||
protected $icons;
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,7 @@ defined('APP_ROOT') || die();
|
||||
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\ActionsInterface;
|
||||
use SP\Core\UI\ThemeIconsBase;
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\DataModel\ItemSearchData;
|
||||
use SP\Html\Assets\FontIcon;
|
||||
use SP\Html\DataGrid\DataGrid;
|
||||
@@ -52,7 +52,7 @@ class ItemsGridHelper extends HelperBase
|
||||
{
|
||||
protected $queryTimeStart;
|
||||
/**
|
||||
* @var ThemeIconsBase
|
||||
* @var ThemeIcons
|
||||
*/
|
||||
protected $icons;
|
||||
/**
|
||||
|
||||
@@ -23,70 +23,58 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Theme;
|
||||
|
||||
defined('APP_ROOT') || die();
|
||||
|
||||
use SP\Core\UI\ThemeIconsBase;
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Html\Assets\FontIcon;
|
||||
|
||||
/**
|
||||
* Class Icons con los iconos del tema visual
|
||||
*
|
||||
* @package Theme
|
||||
*/
|
||||
class Icons extends ThemeIconsBase
|
||||
{
|
||||
/**
|
||||
* Establecer los iconos utilizados en el DataGrid
|
||||
*/
|
||||
public function setIcons()
|
||||
{
|
||||
// Iconos de Acciones
|
||||
$this->iconAdd = new FontIcon('add', 'mdl-color-text--indigo-A200', __u('Añadir'));
|
||||
$this->iconView = new FontIcon('visibility', 'mdl-color-text--indigo-A200', __u('Ver Detalles'));
|
||||
$this->iconViewPass = new FontIcon('lock_open', 'mdl-color-text--indigo-A200', __u('Ver Clave'));
|
||||
$this->iconEdit = new FontIcon('mode_edit', 'mdl-color-text--amber-A200', __u('Editar'));
|
||||
$this->iconDelete = new FontIcon('remove_circle', 'mdl-color-text--red-A200', __u('Eliminar'));
|
||||
$this->iconEditPass = new FontIcon('lock_outline', 'mdl-color-text--amber-A200', __u('Cambiar Clave'));
|
||||
$this->iconAppAdmin = new FontIcon('star', 'mdl-color-text--amber-A100', __u('Admin Aplicación'));
|
||||
$this->iconAccAdmin = new FontIcon('star_half', 'mdl-color-text--amber-A100', __u('Admin Cuentas'));
|
||||
$this->iconLdapUser = new FontIcon('business', 'mdl-color-text--deep-purple-A100', __u('Usuario de LDAP'));
|
||||
$this->iconDisabled = new FontIcon('error', 'mdl-color-text--red-A100', __u('Deshabilitado'));
|
||||
$this->iconEnabled = new FontIcon('check_circle', 'mdl-color-text--teal-500', __u('Habilitado'));
|
||||
$this->iconRefresh = new FontIcon('refresh', 'mdl-color-text--teal-500', __u('Actualizar'));
|
||||
$this->iconCopy = new FontIcon('content_copy', 'mdl-color-text--indigo-A200', __u('Copiar'));
|
||||
$this->iconClipboard = new FontIcon('content_paste', 'mdl-color-text--indigo-A200');
|
||||
$this->iconEmail = new FontIcon('email', 'mdl-color-text--indigo-A200', __u('Email'));
|
||||
$this->iconOptional = new FontIcon('settings');
|
||||
$this->iconPublicLink = new FontIcon('link', 'mdl-color-text--teal-500');
|
||||
$this->iconBack = new FontIcon('arrow_back', 'mdl-color-text--indigo-A200', __u('Volver'));
|
||||
$this->iconRestore = new FontIcon('restore', 'mdl-color-text--teal-500', __u('Restaurar'));
|
||||
$this->iconSave = new FontIcon('save', 'mdl-color-text--teal-500', __u('Guardar'));
|
||||
$this->iconHelp = new FontIcon('help_outline', 'mdl-color-text--indigo-A100', __u('Ayuda'));
|
||||
$this->iconClear = new FontIcon('clear_all', 'mdl-color--indigo-A200', __u('Limpiar'));
|
||||
$this->iconPlay = new FontIcon('play_circle_filled', 'mdl-color-text--teal-500', __u('Realizar'));
|
||||
$this->iconDownload = new FontIcon('file_download', 'mdl-color-text--indigo-A200', __u('Descargar'));
|
||||
$this->iconWarning = new FontIcon('warning', 'mdl-color-text--amber-A100', __u('Aviso'));
|
||||
$this->iconCheck = new FontIcon('cached', 'mdl-color-text--indigo-A200', __u('Comprobar'));
|
||||
$this->iconSearch = new FontIcon('search', 'mdl-color-text--indigo-A200', __u('Buscar'));
|
||||
$this->iconAccount = new FontIcon('account_box', 'mdl-color-text--indigo-A200');
|
||||
$this->iconGroup = new FontIcon('group_work', 'mdl-color-text--indigo-A200');
|
||||
$this->iconSettings = new FontIcon('settings', 'mdl-color-text--indigo-A200', __u('Configuración'));
|
||||
$this->iconHeadline = new FontIcon('view_headline', 'mdl-color-text--indigo-A200');
|
||||
$this->iconInfo = new FontIcon('info_outline', 'mdl-color-text--indigo-A200', __u('Información'));
|
||||
$this->iconCritical = new FontIcon('error_outline', 'mdl-color-text--red-A200', __u('Crítico'));
|
||||
$this->iconNotices = new FontIcon('notifications', 'mdl-color-text--indigo-A200', __u('Notificaciones'));
|
||||
$this->iconRemove = new FontIcon('remove', 'mdl-color-text--indigo-A200', __u('Eliminar'));
|
||||
$themeIcons = new ThemeIcons();
|
||||
|
||||
// Iconos de Navegación
|
||||
$this->iconNavPrev = new FontIcon('chevron_left', null, __u('Página anterior'));
|
||||
$this->iconNavNext = new FontIcon('chevron_right', null, __u('Página siguiente'));
|
||||
$this->iconNavFirst = new FontIcon('arrow_back', null, __u('Primera página'));
|
||||
$this->iconNavLast = new FontIcon('arrow_forward', null, __u('Última página'));
|
||||
// Iconos de Acciones
|
||||
$themeIcons->iconAdd = new FontIcon('add', 'mdl-color-text--indigo-A200', __u('Añadir'));
|
||||
$themeIcons->iconView = new FontIcon('visibility', 'mdl-color-text--indigo-A200', __u('Ver Detalles'));
|
||||
$themeIcons->iconViewPass = new FontIcon('lock_open', 'mdl-color-text--indigo-A200', __u('Ver Clave'));
|
||||
$themeIcons->iconEdit = new FontIcon('mode_edit', 'mdl-color-text--amber-A200', __u('Editar'));
|
||||
$themeIcons->iconDelete = new FontIcon('remove_circle', 'mdl-color-text--red-A200', __u('Eliminar'));
|
||||
$themeIcons->iconEditPass = new FontIcon('lock_outline', 'mdl-color-text--amber-A200', __u('Cambiar Clave'));
|
||||
$themeIcons->iconAppAdmin = new FontIcon('star', 'mdl-color-text--amber-A100', __u('Admin Aplicación'));
|
||||
$themeIcons->iconAccAdmin = new FontIcon('star_half', 'mdl-color-text--amber-A100', __u('Admin Cuentas'));
|
||||
$themeIcons->iconLdapUser = new FontIcon('business', 'mdl-color-text--deep-purple-A100', __u('Usuario de LDAP'));
|
||||
$themeIcons->iconDisabled = new FontIcon('error', 'mdl-color-text--red-A100', __u('Deshabilitado'));
|
||||
$themeIcons->iconEnabled = new FontIcon('check_circle', 'mdl-color-text--teal-500', __u('Habilitado'));
|
||||
$themeIcons->iconRefresh = new FontIcon('refresh', 'mdl-color-text--teal-500', __u('Actualizar'));
|
||||
$themeIcons->iconCopy = new FontIcon('content_copy', 'mdl-color-text--indigo-A200', __u('Copiar'));
|
||||
$themeIcons->iconClipboard = new FontIcon('content_paste', 'mdl-color-text--indigo-A200');
|
||||
$themeIcons->iconEmail = new FontIcon('email', 'mdl-color-text--indigo-A200', __u('Email'));
|
||||
$themeIcons->iconOptional = new FontIcon('settings');
|
||||
$themeIcons->iconPublicLink = new FontIcon('link', 'mdl-color-text--teal-500');
|
||||
$themeIcons->iconBack = new FontIcon('arrow_back', 'mdl-color-text--indigo-A200', __u('Volver'));
|
||||
$themeIcons->iconRestore = new FontIcon('restore', 'mdl-color-text--teal-500', __u('Restaurar'));
|
||||
$themeIcons->iconSave = new FontIcon('save', 'mdl-color-text--teal-500', __u('Guardar'));
|
||||
$themeIcons->iconHelp = new FontIcon('help_outline', 'mdl-color-text--indigo-A100', __u('Ayuda'));
|
||||
$themeIcons->iconClear = new FontIcon('clear_all', 'mdl-color--indigo-A200', __u('Limpiar'));
|
||||
$themeIcons->iconPlay = new FontIcon('play_circle_filled', 'mdl-color-text--teal-500', __u('Realizar'));
|
||||
$themeIcons->iconDownload = new FontIcon('file_download', 'mdl-color-text--indigo-A200', __u('Descargar'));
|
||||
$themeIcons->iconWarning = new FontIcon('warning', 'mdl-color-text--amber-A100', __u('Aviso'));
|
||||
$themeIcons->iconCheck = new FontIcon('cached', 'mdl-color-text--indigo-A200', __u('Comprobar'));
|
||||
$themeIcons->iconSearch = new FontIcon('search', 'mdl-color-text--indigo-A200', __u('Buscar'));
|
||||
$themeIcons->iconAccount = new FontIcon('account_box', 'mdl-color-text--indigo-A200');
|
||||
$themeIcons->iconGroup = new FontIcon('group_work', 'mdl-color-text--indigo-A200');
|
||||
$themeIcons->iconSettings = new FontIcon('settings', 'mdl-color-text--indigo-A200', __u('Configuración'));
|
||||
$themeIcons->iconHeadline = new FontIcon('view_headline', 'mdl-color-text--indigo-A200');
|
||||
$themeIcons->iconInfo = new FontIcon('info_outline', 'mdl-color-text--indigo-A200', __u('Información'));
|
||||
$themeIcons->iconCritical = new FontIcon('error_outline', 'mdl-color-text--red-A200', __u('Crítico'));
|
||||
$themeIcons->iconNotices = new FontIcon('notifications', 'mdl-color-text--indigo-A200', __u('Notificaciones'));
|
||||
$themeIcons->iconRemove = new FontIcon('remove', 'mdl-color-text--indigo-A200', __u('Eliminar'));
|
||||
|
||||
// Iconos de Ordenación
|
||||
$this->iconUp = new FontIcon('arrow_drop_up');
|
||||
$this->iconDown = new FontIcon('arrow_drop_down');
|
||||
}
|
||||
}
|
||||
// Iconos de Navegación
|
||||
$themeIcons->iconNavPrev = new FontIcon('chevron_left', null, __u('Página anterior'));
|
||||
$themeIcons->iconNavNext = new FontIcon('chevron_right', null, __u('Página siguiente'));
|
||||
$themeIcons->iconNavFirst = new FontIcon('arrow_back', null, __u('Primera página'));
|
||||
$themeIcons->iconNavLast = new FontIcon('arrow_forward', null, __u('Última página'));
|
||||
|
||||
// Iconos de Ordenación
|
||||
$themeIcons->iconUp = new FontIcon('arrow_drop_up');
|
||||
$themeIcons->iconDown = new FontIcon('arrow_drop_down');
|
||||
|
||||
return $themeIcons;
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php /** @var \SP\Core\UI\ThemeIconsBase $icons */
|
||||
<?php /** @var \SP\Core\UI\ThemeIcons $icons */
|
||||
/** @var \SP\Html\Assets\IconInterface $userType */
|
||||
if ($useLayout === true): ?>
|
||||
</div> <!-- Close mdl-layout -->
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $icons \SP\Core\UI\ThemeIconsBase
|
||||
* @var $icons \SP\Core\UI\ThemeIcons
|
||||
*/
|
||||
?>
|
||||
<?php if (count($errors) > 0): ?>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var $icons \SP\Core\UI\ThemeIconsBase
|
||||
* @var $icons \SP\Core\UI\ThemeIcons
|
||||
* @var \SP\Mvc\View\Template $this
|
||||
*/
|
||||
?>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/** @var \SP\Account\AccountAcl $accountAcl */
|
||||
/** @var \SP\DataModel\AccountExtData $accountData */
|
||||
/** @var $icons \SP\Core\UI\ThemeIconsBase */
|
||||
/** @var $icons \SP\Core\UI\ThemeIcons */
|
||||
?>
|
||||
|
||||
<fieldset class="data round">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* @var \SP\Account\AccountAcl $accountAcl
|
||||
* @var \SP\Core\UI\ThemeIconsBase $icons
|
||||
* @var \SP\Account\AccountAcl $accountAcl
|
||||
* @var \SP\Core\UI\ThemeIcons $icons
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @var $this \SP\Mvc\View\Template
|
||||
* @var $action \SP\Html\DataGrid\DataGridActionBase
|
||||
* @var $actionMenu \SP\Html\DataGrid\DataGridActionBase
|
||||
* @var $icons \SP\Core\UI\ThemeIconsBase
|
||||
* @var $icons \SP\Core\UI\ThemeIcons
|
||||
*/
|
||||
?>
|
||||
<div id="data-search">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @var $data SP\Html\DataGrid\DataGridTab
|
||||
* @var $account SP\Account\AccountSearchItem
|
||||
* @var $this \SP\Mvc\View\Template
|
||||
* @var $icons \SP\Core\UI\ThemeIconsBase
|
||||
* @var $icons \SP\Core\UI\ThemeIcons
|
||||
*/
|
||||
?>
|
||||
<div id="searchbox" class="round5 shadow">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/** @var \SP\DataModel\CategoryData $category */
|
||||
/** @var \SP\Core\UI\ThemeIconsBase $icons */
|
||||
/** @var \SP\Core\UI\ThemeIcons $icons */
|
||||
?>
|
||||
<div id="box-popup" class="box-password-view">
|
||||
<?php if (!$isLinked): ?>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $icons SP\Core\UI\ThemeIconsBase
|
||||
* @var $icons SP\Core\UI\ThemeIcons
|
||||
* @var $this \SP\Mvc\View\Template
|
||||
* @var $tabs \SP\Mvc\View\Components\DataTab[]
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @var $icons SP\Core\UI\ThemeIconsBase
|
||||
* @var $icons SP\Core\UI\ThemeIcons
|
||||
* @var $data SP\Html\DataGrid\DataGridTab
|
||||
* @var $this \SP\Mvc\View\Template
|
||||
* @var $action SP\Html\DataGrid\DataGridAction|SP\Html\DataGrid\DataGridActionSearch
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<?php
|
||||
/**
|
||||
* @var $icons SP\Core\UI\ThemeIconsBase
|
||||
* @var $icons SP\Core\UI\ThemeIcons
|
||||
* @var $data SP\Html\DataGrid\DataGridTab
|
||||
* @var $this \SP\Mvc\View\Template
|
||||
* @var $action SP\Html\DataGrid\DataGridAction|SP\Html\DataGrid\DataGridActionSearch
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/** @var \SP\DataModel\AuthTokenData $authToken */
|
||||
/** @var \SP\Core\UI\ThemeIconsBase $icons */
|
||||
/** @var \SP\Core\UI\ThemeIcons $icons */
|
||||
?>
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $header; ?><i class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/** @var \SP\DataModel\CategoryData $category */
|
||||
/** @var \SP\Core\UI\ThemeIconsBase $icons */
|
||||
/** @var \SP\Core\UI\ThemeIcons $icons */
|
||||
?>
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $header; ?><i class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/** @var \SP\DataModel\PluginData $plugin */
|
||||
/** @var \SP\Core\Plugin\PluginInterface $pluginInfo */
|
||||
/** @var \SP\Core\UI\ThemeIconsBase $icons */
|
||||
/** @var \SP\Core\UI\ThemeIcons $icons */
|
||||
?>
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $header; ?><i class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/** @var $tag \SP\DataModel\TagData */
|
||||
/** @var $icons \SP\Core\UI\ThemeIconsBase */
|
||||
/** @var $icons \SP\Core\UI\ThemeIcons */
|
||||
?>
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $header; ?><i class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/** @var $icons \SP\Core\UI\ThemeIconsBase */
|
||||
/** @var $icons \SP\Core\UI\ThemeIcons */
|
||||
/** @var $user \SP\DataModel\UserData */
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/** @var \SP\DataModel\NotificationData $notification */
|
||||
/** @var \SP\Core\UI\ThemeIconsBase $icons */
|
||||
/** @var \SP\Core\UI\ThemeIcons $icons */
|
||||
?>
|
||||
<div id="box-popup">
|
||||
<h2 class="center"><?php echo $header; ?><i class="btn-popup-close material-icons">close</i></h2>
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace SP\Controller\Grids;
|
||||
use SP\Config\ConfigData;
|
||||
use SP\Core\Session\Session;
|
||||
use SP\Core\UI\Theme;
|
||||
use SP\Core\UI\ThemeIconsBase;
|
||||
use SP\Core\UI\ThemeIcons;
|
||||
use SP\Html\DataGrid\DataGridActionSearch;
|
||||
use SP\Html\DataGrid\DataGridPager;
|
||||
|
||||
@@ -39,7 +39,7 @@ use SP\Html\DataGrid\DataGridPager;
|
||||
abstract class GridBase
|
||||
{
|
||||
/**
|
||||
* @var ThemeIconsBase
|
||||
* @var ThemeIcons
|
||||
*/
|
||||
protected $icons;
|
||||
/**
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2018, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -48,7 +48,7 @@ class MailMessage extends MessageBase implements MessageInterface
|
||||
{
|
||||
$message[] = '<div class="mail-message" style="font-family: Helvetica, Arial, sans-serif">';
|
||||
$message[] = '<h3>' . $this->title . '</h3>';
|
||||
$message[] = '<div class="mail-description">' . implode('<br>', $this->description) . '</div>';
|
||||
$message[] = '<div class="mail-description">' . nl2br(implode('<br>', $this->getDescription())) . '</div>';
|
||||
$message[] = '<footer>' . implode('<br>', $this->footer) . '</footer>';
|
||||
$message[] = '</div>';
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace SP\Core\UI;
|
||||
use SP\Bootstrap;
|
||||
use SP\Config\Config;
|
||||
use SP\Config\ConfigData;
|
||||
use SP\Core\Exceptions\InvalidClassException;
|
||||
use SP\Core\Session\Session;
|
||||
use SP\Storage\FileCache;
|
||||
use SP\Storage\FileException;
|
||||
@@ -67,7 +68,7 @@ class Theme implements ThemeInterface
|
||||
*/
|
||||
protected $viewsPath = '';
|
||||
/**
|
||||
* @var ThemeIconsBase
|
||||
* @var ThemeIcons
|
||||
*/
|
||||
protected $icons;
|
||||
/**
|
||||
@@ -90,9 +91,10 @@ class Theme implements ThemeInterface
|
||||
/**
|
||||
* Theme constructor.
|
||||
*
|
||||
* @param $module
|
||||
* @param Config $config
|
||||
* @param Session $session
|
||||
* @param string $module
|
||||
* @param Config $config
|
||||
* @param Session $session
|
||||
* @param FileCache $fileCache
|
||||
*/
|
||||
public function __construct($module, Config $config, Session $session, FileCache $fileCache)
|
||||
{
|
||||
@@ -151,6 +153,7 @@ class Theme implements ThemeInterface
|
||||
* Inicializar los iconos del tema actual
|
||||
*
|
||||
* @return ThemeIconsInterface
|
||||
* @throws InvalidClassException
|
||||
*/
|
||||
protected function initIcons()
|
||||
{
|
||||
@@ -169,9 +172,9 @@ class Theme implements ThemeInterface
|
||||
$iconsClass = $this->themePathFull . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'Icons.php';
|
||||
|
||||
if (file_exists($iconsClass)) {
|
||||
require $iconsClass;
|
||||
|
||||
$this->icons = new Icons();
|
||||
if (!($this->icons = require $iconsClass) instanceof ThemeIcons) {
|
||||
throw new InvalidClassException(__u('Clase no válida para iconos'));
|
||||
}
|
||||
|
||||
try {
|
||||
$this->fileCache->save(self::ICONS_CACHE_FILE, $this->icons);
|
||||
@@ -260,7 +263,7 @@ class Theme implements ThemeInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ThemeIconsBase
|
||||
* @return ThemeIcons
|
||||
*/
|
||||
public function getIcons()
|
||||
{
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* sysPass
|
||||
*
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @author nuxsmin
|
||||
* @link https://syspass.org
|
||||
* @copyright 2012-2018, Rubén Domínguez nuxsmin@$syspass.org
|
||||
*
|
||||
* This file is part of sysPass.
|
||||
@@ -34,98 +34,90 @@ defined('APP_ROOT') || die();
|
||||
*
|
||||
* @package SP\Core
|
||||
*/
|
||||
abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
class ThemeIcons
|
||||
{
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconAdd;
|
||||
public $iconAdd;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconView;
|
||||
public $iconView;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconEdit;
|
||||
public $iconEdit;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconDelete;
|
||||
public $iconDelete;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconNavPrev;
|
||||
public $iconNavPrev;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconNavNext;
|
||||
public $iconNavNext;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconNavFirst;
|
||||
public $iconNavFirst;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconNavLast;
|
||||
public $iconNavLast;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconEditPass;
|
||||
public $iconEditPass;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconAppAdmin;
|
||||
public $iconAppAdmin;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconAccAdmin;
|
||||
public $iconAccAdmin;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconLdapUser;
|
||||
public $iconLdapUser;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconDisabled;
|
||||
public $iconDisabled;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconEnabled;
|
||||
public $iconEnabled;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconViewPass;
|
||||
public $iconViewPass;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconCopy;
|
||||
public $iconCopy;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconClipboard;
|
||||
public $iconClipboard;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconEmail;
|
||||
public $iconEmail;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconOptional;
|
||||
public $iconOptional;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconUp;
|
||||
public $iconUp;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconDown;
|
||||
public $iconDown;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconRefresh;
|
||||
public $iconRefresh;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconPublicLink;
|
||||
public $iconPublicLink;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconBack;
|
||||
public $iconBack;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconRestore;
|
||||
public $iconRestore;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconSave;
|
||||
public $iconSave;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconHelp;
|
||||
public $iconHelp;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconClear;
|
||||
public $iconClear;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconPlay;
|
||||
public $iconPlay;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconDownload;
|
||||
public $iconDownload;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconWarning;
|
||||
public $iconWarning;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconCheck;
|
||||
public $iconCheck;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconSearch;
|
||||
public $iconSearch;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconAccount;
|
||||
public $iconAccount;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconGroup;
|
||||
public $iconGroup;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconSettings;
|
||||
public $iconSettings;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconHeadline;
|
||||
public $iconHeadline;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconInfo;
|
||||
public $iconInfo;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconCritical;
|
||||
public $iconCritical;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconNotices;
|
||||
public $iconNotices;
|
||||
/** @var FontIcon|ImageIcon */
|
||||
protected $iconRemove;
|
||||
|
||||
/**
|
||||
* Icons constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->setIcons();
|
||||
}
|
||||
public $iconRemove;
|
||||
|
||||
/**
|
||||
* @return FontIcon|ImageIcon
|
||||
@@ -383,14 +375,6 @@ abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
return $this->iconSearch;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FontIcon|ImageIcon $iconSearch
|
||||
*/
|
||||
public function setIconSearch($iconSearch)
|
||||
{
|
||||
$this->iconSearch = $iconSearch;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FontIcon|ImageIcon
|
||||
*/
|
||||
@@ -399,14 +383,6 @@ abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
return $this->iconAccount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FontIcon|ImageIcon $iconAccount
|
||||
*/
|
||||
public function setIconAccount($iconAccount)
|
||||
{
|
||||
$this->iconAccount = $iconAccount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FontIcon|ImageIcon
|
||||
*/
|
||||
@@ -415,14 +391,6 @@ abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
return $this->iconGroup;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FontIcon|ImageIcon $iconGroup
|
||||
*/
|
||||
public function setIconGroup($iconGroup)
|
||||
{
|
||||
$this->iconGroup = $iconGroup;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FontIcon|ImageIcon
|
||||
*/
|
||||
@@ -431,14 +399,6 @@ abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
return $this->iconSettings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FontIcon|ImageIcon $iconSettings
|
||||
*/
|
||||
public function setIconSettings($iconSettings)
|
||||
{
|
||||
$this->iconSettings = $iconSettings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FontIcon|ImageIcon
|
||||
*/
|
||||
@@ -447,14 +407,6 @@ abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
return $this->iconHeadline;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FontIcon|ImageIcon $iconHeadline
|
||||
*/
|
||||
public function setIconHeadline($iconHeadline)
|
||||
{
|
||||
$this->iconHeadline = $iconHeadline;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FontIcon|ImageIcon
|
||||
*/
|
||||
@@ -463,14 +415,6 @@ abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
return $this->iconInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FontIcon|ImageIcon $iconInfo
|
||||
*/
|
||||
public function setIconInfo($iconInfo)
|
||||
{
|
||||
$this->iconInfo = $iconInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FontIcon|ImageIcon
|
||||
*/
|
||||
@@ -479,14 +423,6 @@ abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
return $this->iconCritical;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FontIcon|ImageIcon $iconCritical
|
||||
*/
|
||||
public function setIconCritical($iconCritical)
|
||||
{
|
||||
$this->iconCritical = $iconCritical;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FontIcon|ImageIcon
|
||||
*/
|
||||
@@ -495,14 +431,6 @@ abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
return $this->iconEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FontIcon|ImageIcon $iconEnabled
|
||||
*/
|
||||
public function setIconEnabled($iconEnabled)
|
||||
{
|
||||
$this->iconEnabled = $iconEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FontIcon|ImageIcon
|
||||
*/
|
||||
@@ -511,14 +439,6 @@ abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
return $this->iconNotices;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FontIcon|ImageIcon $iconNotices
|
||||
*/
|
||||
public function setIconNotices($iconNotices)
|
||||
{
|
||||
$this->iconNotices = $iconNotices;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return FontIcon|ImageIcon
|
||||
*/
|
||||
@@ -526,12 +446,4 @@ abstract class ThemeIconsBase implements ThemeIconsInterface
|
||||
{
|
||||
return $this->iconRemove;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FontIcon|ImageIcon $iconRemove
|
||||
*/
|
||||
public function setIconRemove($iconRemove)
|
||||
{
|
||||
$this->iconRemove = $iconRemove;
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,7 @@ interface ThemeInterface
|
||||
public function getThemeName();
|
||||
|
||||
/**
|
||||
* @return ThemeIconsBase
|
||||
* @return ThemeIcons
|
||||
*/
|
||||
public function getIcons();
|
||||
|
||||
|
||||
@@ -57,7 +57,8 @@ class LogHandler extends Provider implements EventReceiver
|
||||
'refresh.masterPassword',
|
||||
'update.',
|
||||
'import.ldap.',
|
||||
'run.'
|
||||
'run.',
|
||||
'send.mail'
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,7 @@ use SP\Core\Events\EventReceiver;
|
||||
use SP\Core\Messages\MailMessage;
|
||||
use SP\Providers\Provider;
|
||||
use SP\Services\MailService;
|
||||
use SP\Util\HttpUtil;
|
||||
use SplSubject;
|
||||
|
||||
/**
|
||||
@@ -72,16 +73,19 @@ class MailHandler extends Provider implements EventReceiver
|
||||
* Evento de actualización
|
||||
*
|
||||
* @param string $eventType Nombre del evento
|
||||
* @param Event $event Objeto del evento
|
||||
* @param Event $event Objeto del evento
|
||||
*/
|
||||
public function updateEvent($eventType, Event $event)
|
||||
{
|
||||
if (($eventMessage = $event->getEventMessage()) !== null) {
|
||||
try {
|
||||
$configData = $this->config->getConfigData();
|
||||
$userData = $this->session->getUserData();
|
||||
|
||||
$mailMessage = new MailMessage();
|
||||
$mailMessage->setDescription($eventMessage->getDescriptionRaw());
|
||||
$mailMessage->addDescription($eventMessage->composeText());
|
||||
$mailMessage->addDescription(sprintf(__('Realizado por: %s (%s)'), $userData->getName(), $userData->getLogin()));
|
||||
$mailMessage->addDescription(sprintf(__('Dirección IP: %s'), HttpUtil::getClientAddress(true)));
|
||||
|
||||
$this->mailService->send($eventMessage->getDescription(), $configData->getMailFrom(), $mailMessage);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@@ -37,6 +37,7 @@ use SP\Util\Util;
|
||||
|
||||
/**
|
||||
* Class MailService
|
||||
*
|
||||
* @package SP\Services
|
||||
*/
|
||||
class MailService extends Service
|
||||
@@ -54,7 +55,7 @@ class MailService extends Service
|
||||
* Checks mail params by sending a test email
|
||||
*
|
||||
* @param MailParams $mailParams
|
||||
* @param string $to
|
||||
* @param string $to
|
||||
* @throws ServiceException
|
||||
*/
|
||||
public function check(MailParams $mailParams, $to)
|
||||
@@ -111,8 +112,8 @@ class MailService extends Service
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $subject
|
||||
* @param string $to
|
||||
* @param string $subject
|
||||
* @param string $to
|
||||
* @param MailMessage $mailMessage
|
||||
* @throws ServiceException
|
||||
*/
|
||||
@@ -134,10 +135,12 @@ class MailService extends Service
|
||||
try {
|
||||
$this->mailer->send();
|
||||
|
||||
$this->eventDispatcher->notifyEvent('send.mail', new Event($this,
|
||||
EventMessage::factory()
|
||||
->addDescription(__u('Correo enviado'))
|
||||
->addDetail(__u('Destinatario'), implode(',', $this->mailer->getToAddresses())))
|
||||
$this->eventDispatcher->notifyEvent('send.mail',
|
||||
new Event($this, EventMessage::factory()
|
||||
->addDescription(__u('Correo enviado'))
|
||||
->addDetail(__u('Destinatario'), implode(',', array_map(function ($value) {
|
||||
return $value[0];
|
||||
}, $this->mailer->getToAddresses()))))
|
||||
);
|
||||
} catch (\Exception $e) {
|
||||
processException($e);
|
||||
@@ -149,8 +152,8 @@ class MailService extends Service
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $subject
|
||||
* @param array $to
|
||||
* @param string $subject
|
||||
* @param array $to
|
||||
* @param MailMessage $mailMessage
|
||||
* @throws ServiceException
|
||||
*/
|
||||
|
||||
2
public/js/app-actions.min.js
vendored
2
public/js/app-actions.min.js
vendored
@@ -1,5 +1,5 @@
|
||||
var $jscomp={scope:{},findInternal:function(b,e,l){b instanceof String&&(b=String(b));for(var f=b.length,h=0;h<f;h++){var m=b[h];if(e.call(l,m,h,b))return{i:h,v:m}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(b,e,l){if(l.get||l.set)throw new TypeError("ES3 does not support getters and setters.");b!=Array.prototype&&b!=Object.prototype&&(b[e]=l.value)};
|
||||
$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(b,e,l,f){if(e){l=$jscomp.global;b=b.split(".");for(f=0;f<b.length-1;f++){var h=b[f];h in l||(l[h]={});l=l[h]}b=b[b.length-1];f=l[b];e=e(f);e!=f&&null!=e&&$jscomp.defineProperty(l,b,{configurable:!0,writable:!0,value:e})}};
|
||||
$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(b,e,l,f){if(e){l=$jscomp.global;b=b.split(".");for(f=0;f<b.length-1;f++){var h=b[f];h in l||(l[h]={});l=l[h]}b=b[b.length-1];f=l[b];e=e(f);e!=f&&null!=e&&$jscomp.defineProperty(l,b,{configurable:!0,writable:!0,value:e})}};
|
||||
$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(b,l){return $jscomp.findInternal(this,b,l).v}},"es6-impl","es3");
|
||||
sysPass.Actions=function(b){var e=b.log,l=0,f={entrypoint:"/index.php"};Object.freeze(f);var h=function(a,c){e.info("getContent");a.isAjax=1;var d=b.appRequests().getRequestOpts();d.url=f.entrypoint;d.method="get";d.type="html";d.addHistory=!0;d.data=a;b.appRequests().getActionCall(d,function(a){var d=$("#content");d.empty().html(a);a=b.triggers().views;a.common(d);if(void 0!==c&&"function"===typeof a[c])a[c]();d=$(".mdl-layout__content");0<d.scrollTop()&&d.animate({scrollTop:0},1E3)})},m=function(a,
|
||||
c){$.magnificPopup.open({items:{src:a||"",type:"inline"},callbacks:{open:function(){var a=$("#box-popup");b.appTriggers().views.common(a);a.find(":input:text:visible:first").focus();void 0!==c&&"function"===typeof c.open&&c.open()},close:function(){void 0!==c&&"function"===typeof c.close&&c.close()}},showCloseBtn:!1})},w=function(a,c){var d=$('<div id="box-popup" class="image">'+c+"</div>"),g=d.find("img");if(0===g.length)return m(c);g.hide();$.magnificPopup.open({items:{src:d,type:"inline"},callbacks:{open:function(){var a=
|
||||
|
||||
2
public/js/app-triggers.min.js
vendored
2
public/js/app-triggers.min.js
vendored
@@ -1,5 +1,5 @@
|
||||
var $jscomp={scope:{},findInternal:function(b,e,d){b instanceof String&&(b=String(b));for(var f=b.length,a=0;a<f;a++){var c=b[a];if(e.call(d,c,a,b))return{i:a,v:c}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(b,e,d){if(d.get||d.set)throw new TypeError("ES3 does not support getters and setters.");b!=Array.prototype&&b!=Object.prototype&&(b[e]=d.value)};
|
||||
$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(b,e,d,f){if(e){d=$jscomp.global;b=b.split(".");for(f=0;f<b.length-1;f++){var a=b[f];a in d||(d[a]={});d=d[a]}b=b[b.length-1];f=d[b];e=e(f);e!=f&&null!=e&&$jscomp.defineProperty(d,b,{configurable:!0,writable:!0,value:e})}};
|
||||
$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(b,e,d,f){if(e){d=$jscomp.global;b=b.split(".");for(f=0;f<b.length-1;f++){var a=b[f];a in d||(d[a]={});d=d[a]}b=b[b.length-1];f=d[b];e=e(f);e!=f&&null!=e&&$jscomp.defineProperty(d,b,{configurable:!0,writable:!0,value:e})}};
|
||||
$jscomp.polyfill("Array.prototype.find",function(b){return b?b:function(b,d){return $jscomp.findInternal(this,b,d).v}},"es6-impl","es3");
|
||||
sysPass.Triggers=function(b){var e=b.log,d=function(a){var c={valueField:"id",labelField:"name",searchField:["name"]};a.find(".select-box").each(function(a){var e=$(this);c.plugins=e.hasClass("select-box-deselect")?{clear_selection:{title:b.config().LANG[51]}}:{};if(e.data("onchange")){var g=e.data("onchange").split("/");c.onChange=function(a){if(0<a)if(2===g.length)sysPassApp.actions()[g[0]][g[1]](e);else sysPassApp.actions()[g[0]](e)}}e.selectize(c)});a.find("#allowed_exts").selectize({create:function(a){return{value:a.toUpperCase(),
|
||||
text:a.toUpperCase()}},createFilter:/^[a-z0-9]{1,4}$/i,plugins:["remove_button"]});a.find("#wikifilter").selectize({create:!0,createFilter:/^[a-z0-9:._-]+$/i,plugins:["remove_button"]});a.find(".select-items-tag").selectize({create:function(a){return{value:a.toLowerCase(),text:a.toLowerCase()}},createFilter:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/,plugins:["remove_button"]})},f={main:function(a){e.info("views:main");
|
||||
|
||||
Reference in New Issue
Block a user