mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-20 15:26:50 +01:00
* [MOD] Show date when listing accounts history
* [MOD] Minor tweaks for demo mode
This commit is contained in:
@@ -40,7 +40,7 @@ define('PLUGINS_PATH', __DIR__ . DIRECTORY_SEPARATOR . 'Plugins');
|
||||
define('LOCALES_PATH', __DIR__ . DIRECTORY_SEPARATOR . 'locales');
|
||||
define('SQL_PATH', __DIR__ . DIRECTORY_SEPARATOR . 'sql');
|
||||
|
||||
define('DEBUG', true);
|
||||
define('DEBUG', false);
|
||||
|
||||
require 'SplClassLoader.php';
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ class AccountHistoryUtil
|
||||
public static function getAccountsMgmtSearch(ItemSearchData $SearchData)
|
||||
{
|
||||
$Data = new QueryData();
|
||||
$Data->setSelect('acchistory_id, acchistory_name, customer_name, acchistory_dateEdit, BIN(acchistory_isModify) as acchistory_isModify, BIN(acchistory_isDeleted) as acchistory_isDeleted');
|
||||
$Data->setSelect('acchistory_id, acchistory_name, customer_name, IFNULL(acchistory_dateEdit,acchistory_dateAdd) as acchistory_date, BIN(acchistory_isModify) as acchistory_isModify, BIN(acchistory_isDeleted) as acchistory_isDeleted');
|
||||
$Data->setFrom('accHistory LEFT JOIN customers ON acchistory_customerId = customer_id');
|
||||
$Data->setOrder('acchistory_name, customer_name, acchistory_id DESC');
|
||||
|
||||
|
||||
@@ -412,7 +412,7 @@ class Items extends GridBase
|
||||
$GridData->setDataRowSourceId('acchistory_id');
|
||||
$GridData->addDataRowSource('acchistory_name');
|
||||
$GridData->addDataRowSource('customer_name');
|
||||
$GridData->addDataRowSource('acchistory_dateEdit');
|
||||
$GridData->addDataRowSource('acchistory_date');
|
||||
$GridData->addDataRowSourceWithIcon('acchistory_isModify', $iconEdit->setTitle(__('Modificada'))->setClass('opacity50'));
|
||||
$GridData->addDataRowSourceWithIcon('acchistory_isDeleted', $iconDelete->setTitle(__('Eliminada'))->setClass('opacity50'));
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ class ItemShowController extends ControllerBase implements ActionsInterface, Ite
|
||||
$this->view->addTemplate('users');
|
||||
|
||||
$this->view->assign('user', $this->itemId ? User::getItem()->getById($this->itemId) : new UserData());
|
||||
$this->view->assign('isDisabled', ($this->view->isDemo || $this->view->actionId === self::ACTION_USR_USERS_VIEW) ? 'disabled' : '');
|
||||
$this->view->assign('isDisabled', $this->view->actionId === self::ACTION_USR_USERS_VIEW ? 'disabled' : '');
|
||||
$this->view->assign('isReadonly', $this->view->isDisabled ? 'readonly' : '');
|
||||
$this->view->assign('groups', Group::getItem()->getItemsForSelect());
|
||||
$this->view->assign('profiles', Profile::getItem()->getItemsForSelect());
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<?php
|
||||
/** @var $icons \SP\Core\UI\ThemeIconsBase */
|
||||
/** @var $user \SP\DataModel\UserData */
|
||||
|
||||
if ($user->getUserLogin() === 'demo') {
|
||||
$isReadonly = 'readonly';
|
||||
$isDisabled = 'disabled';
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="box-popup">
|
||||
@@ -35,7 +40,7 @@
|
||||
<input id="login" name="login" type="text" required
|
||||
class="mdl-textfield__input mdl-color-text--indigo-400"
|
||||
value="<?php echo $user->getUserLogin(); ?>"
|
||||
maxlength="80" <?php echo $user->isUserIsLdap() || $isReadonly; ?>>
|
||||
maxlength="80" <?php echo $user->isUserIsLdap() || $isReadonly ? $isReadonly : ''; ?>>
|
||||
<label class="mdl-textfield__label"
|
||||
for="login"><?php echo __('Login de inicio de sesión'); ?></label>
|
||||
</div>
|
||||
@@ -123,16 +128,12 @@
|
||||
<tr>
|
||||
<td class="descField"><?php echo __('Notas') ?></td>
|
||||
<td class="valField">
|
||||
<?php if (!$isView): ?>
|
||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<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 $isReadonly; ?>><?php echo $user->getUserNotes(); ?></textarea>
|
||||
<label class="mdl-textfield__label"
|
||||
for="notes"><?php echo __('Notas sobre la cuenta'); ?></label>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php echo $user->getUserNotes(); ?>
|
||||
<?php endif; ?>
|
||||
<label class="mdl-textfield__label"
|
||||
for="notes"><?php echo __('Notas sobre la cuenta'); ?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -84,8 +84,9 @@
|
||||
<?php if ($isDemoMode): ?>
|
||||
<div id="demo-info">
|
||||
<ul>
|
||||
<li><i class="material-icons">perm_identity</i><span>demo</span></li>
|
||||
<li><i class="material-icons">vpn_key</i><span>syspass</span></li>
|
||||
<li title="<?php echo __('Usuario'); ?>"><i class="material-icons">perm_identity</i><span>demo</span></li>
|
||||
<li title="<?php echo __('Clave'); ?>"><i class="material-icons">vpn_key</i><span>syspass</span></li>
|
||||
<li title="<?php echo __('Clave Maestra'); ?>"><i class="material-icons">vpn_key</i><span>12345678900</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user