mirror of
https://github.com/webmasterskaya/joomla-oauth-server.git
synced 2024-11-24 02:44:51 +03:00
_JEXEC & copyright
This commit is contained in:
parent
e406da6ad7
commit
cce9466306
@ -1,8 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_oauthserver
|
||||||
|
*
|
||||||
|
* @copyright (c) 2024. Webmasterskaya. <https://webmasterskaya.xyz>
|
||||||
|
* @license MIT; see LICENSE.txt
|
||||||
|
**/
|
||||||
|
|
||||||
use Joomla\CMS\HTML\HTMLHelper;
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
use Joomla\CMS\Language\Text;
|
use Joomla\CMS\Language\Text;
|
||||||
use Joomla\CMS\Layout\LayoutHelper;
|
|
||||||
use Joomla\CMS\Router\Route;
|
use Joomla\CMS\Router\Route;
|
||||||
|
|
||||||
defined('_JEXEC') or die;
|
defined('_JEXEC') or die;
|
||||||
@ -17,7 +23,10 @@ $wa->useScript('keepalive')
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form action="<?php echo Route::_('index.php?option=com_oauthserver&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="client-form" aria-label="<?php echo Text::_('COM_OAUTHSERVER_CLIENT_FORM_' . ((int) $this->item->id === 0 ? 'NEW' : 'EDIT'), true); ?>" class="form-validate">
|
<form action="<?php echo Route::_('index.php?option=com_oauthserver&layout=edit&id=' . (int) $this->item->id); ?>"
|
||||||
|
method="post" name="adminForm" id="client-form"
|
||||||
|
aria-label="<?php echo Text::_('COM_OAUTHSERVER_CLIENT_FORM_' . ((int) $this->item->id === 0 ? 'NEW' : 'EDIT'), true); ?>"
|
||||||
|
class="form-validate">
|
||||||
|
|
||||||
<div class="main-card">
|
<div class="main-card">
|
||||||
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'details', 'recall' => true, 'breakpoint' => 768]); ?>
|
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', ['active' => 'details', 'recall' => true, 'breakpoint' => 768]); ?>
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_oauthserver
|
||||||
|
*
|
||||||
|
* @copyright (c) 2024. Webmasterskaya. <https://webmasterskaya.xyz>
|
||||||
|
* @license MIT; see LICENSE.txt
|
||||||
|
**/
|
||||||
|
|
||||||
use Joomla\CMS\Factory;
|
use Joomla\CMS\Factory;
|
||||||
use Joomla\CMS\HTML\HTMLHelper;
|
use Joomla\CMS\HTML\HTMLHelper;
|
||||||
@ -15,10 +22,10 @@ defined('_JEXEC') or die;
|
|||||||
$wa = $this->document->getWebAssetManager();
|
$wa = $this->document->getWebAssetManager();
|
||||||
$wa->useScript('table.columns')
|
$wa->useScript('table.columns')
|
||||||
->useScript('multiselect');
|
->useScript('multiselect');
|
||||||
$user = Factory::getApplication()->getIdentity();
|
$user = Factory::getApplication()->getIdentity();
|
||||||
$userId = $user->get('id');
|
$userId = $user->get('id');
|
||||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form action="<?php echo Route::_('index.php?option=com_oauthserver&view=clients'); ?>" method="post" name="adminForm"
|
<form action="<?php echo Route::_('index.php?option=com_oauthserver&view=clients'); ?>" method="post" name="adminForm"
|
||||||
@ -34,7 +41,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
|
|||||||
<?php if (empty($this->items)) : ?>
|
<?php if (empty($this->items)) : ?>
|
||||||
<div class="alert alert-info">
|
<div class="alert alert-info">
|
||||||
<span class="icon-info-circle" aria-hidden="true"></span><span
|
<span class="icon-info-circle" aria-hidden="true"></span><span
|
||||||
class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
|
class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
|
||||||
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
<?php echo Text::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
@ -70,9 +77,9 @@ $listDirn = $this->escape($this->state->get('list.direction'));
|
|||||||
<?php foreach ($this->items as $i => $item) : ?>
|
<?php foreach ($this->items as $i => $item) : ?>
|
||||||
|
|
||||||
<?php $canCreate = $user->authorise('core.create', 'com_oauthserver.clients');
|
<?php $canCreate = $user->authorise('core.create', 'com_oauthserver.clients');
|
||||||
$canEdit = $user->authorise('core.edit', 'com_oauthserver.clients');
|
$canEdit = $user->authorise('core.edit', 'com_oauthserver.clients');
|
||||||
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || is_null($item->checked_out);
|
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || is_null($item->checked_out);
|
||||||
$canChange = $user->authorise('core.edit.state', 'com_oauthserver.clients') && $canCheckin; ?>
|
$canChange = $user->authorise('core.edit.state', 'com_oauthserver.clients') && $canCheckin; ?>
|
||||||
<tr class="row<?php echo $i % 2; ?>">
|
<tr class="row<?php echo $i % 2; ?>">
|
||||||
<td class="w-1 text-center">
|
<td class="w-1 text-center">
|
||||||
<?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->name); ?>
|
<?php echo HTMLHelper::_('grid.id', $i, $item->id, false, 'cid', 'cb', $item->name); ?>
|
||||||
@ -83,7 +90,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
|
|||||||
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'clients.', $canCheckin); ?>
|
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'clients.', $canCheckin); ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($canEdit) : ?>
|
<?php if ($canEdit) : ?>
|
||||||
<a href="<?php echo Route::_('index.php?option=com_oauthserver&task=client.edit&id=' . (int)$item->id); ?>"
|
<a href="<?php echo Route::_('index.php?option=com_oauthserver&task=client.edit&id=' . (int) $item->id); ?>"
|
||||||
title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape($item->name); ?>">
|
title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo $this->escape($item->name); ?>">
|
||||||
<?php echo $this->escape($item->name); ?></a>
|
<?php echo $this->escape($item->name); ?></a>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
@ -102,7 +109,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
|
|||||||
</code>
|
</code>
|
||||||
</td>
|
</td>
|
||||||
<td class="d-none d-md-table-cell">
|
<td class="d-none d-md-table-cell">
|
||||||
<?php echo Text::_((bool)$item->public ? 'JYES' : 'JNO'); ?>
|
<?php echo Text::_((bool) $item->public ? 'JYES' : 'JNO'); ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="w-1 text-center">
|
<td class="w-1 text-center">
|
||||||
<?php echo $item->id; ?>
|
<?php echo $item->id; ?>
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Joomla.Administrator
|
||||||
|
* @subpackage com_oauthserver
|
||||||
|
*
|
||||||
|
* @copyright (c) 2024. Webmasterskaya. <https://webmasterskaya.xyz>
|
||||||
|
* @license MIT; see LICENSE.txt
|
||||||
|
**/
|
||||||
|
|
||||||
use Joomla\CMS\Layout\LayoutHelper;
|
use Joomla\CMS\Layout\LayoutHelper;
|
||||||
|
|
||||||
@ -11,7 +17,7 @@ use Joomla\CMS\Layout\LayoutHelper;
|
|||||||
|
|
||||||
$displayData = [
|
$displayData = [
|
||||||
'textPrefix' => 'COM_OAUTHSERVER_ORDERS',
|
'textPrefix' => 'COM_OAUTHSERVER_ORDERS',
|
||||||
'icon' => 'icon-copy',
|
'icon' => 'icon-copy',
|
||||||
];
|
];
|
||||||
|
|
||||||
$user = $this->getCurrentUser();
|
$user = $this->getCurrentUser();
|
||||||
@ -20,7 +26,8 @@ if ($user->authorise('core.create', 'com_oauthserver')
|
|||||||
|| count($user->getAuthorisedCategories('com_oauthserver', 'core.create')) > 0
|
|| count($user->getAuthorisedCategories('com_oauthserver', 'core.create')) > 0
|
||||||
|| $user->authorise('product.create', 'com_oauthserver')
|
|| $user->authorise('product.create', 'com_oauthserver')
|
||||||
|| count($user->getAuthorisedCategories('com_oauthserver', 'client.create')) > 0
|
|| count($user->getAuthorisedCategories('com_oauthserver', 'client.create')) > 0
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
$displayData['createURL'] = 'index.php?option=com_oauthserver&task=client.add';
|
$displayData['createURL'] = 'index.php?option=com_oauthserver&task=client.add';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user