Skip to content

Commit

Permalink
Merge branch 'upstream/4.0-dev' into origin/feature/joomla#68-Making-…
Browse files Browse the repository at this point in the history
…the-Cassiopeia-template-more-accessible
  • Loading branch information
hans2103 committed Jul 20, 2020
2 parents 6b6c165 + db50419 commit 63c86fd
Show file tree
Hide file tree
Showing 236 changed files with 1,761 additions and 647 deletions.
31 changes: 16 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# IDE & System Related Files #
# IDE & System Related Files
.buildpath
.project
.settings
.DS_Store
.idea
.vscode
.docker
/docker-compose.yml

# Local System Files (i.e. cache, logs, etc.) #
# Local System Files (i.e. cache, logs, etc.)
/administrator/cache
/administrator/logs
/cache
Expand All @@ -20,15 +22,15 @@
/.php_cs.cache
/media

# Template CSS files generated by NPM.
# Template CSS files generated by NPM
/administrator/templates/atum/css
/installation/template/css/template-rtl.min.css
/installation/template/css/template-rtl.css
/installation/template/css/template.min.css
/installation/template/css/template.css
/templates/cassiopeia/css

# Test Related Files #
# Test Related Files
/phpunit.xml
selenium.log
composer.phar
Expand All @@ -39,7 +41,7 @@ composer.phar
/tests/Codeception/api.suite.yml


# Vendor directory handeling
# Vendor directory handling
/libraries/vendor
!libraries/vendor/.gitkeep

Expand All @@ -49,31 +51,31 @@ composer.phar
# Stubs file holding mapped classes
/stubs.php

# JS/CSS Build #
# JS/CSS Build
node_modules/
/build/assets_tmp
/scss-lint-report.xml

# Removed in Joomla 4 #
# Removed in Joomla 4
administrator/templates/isis
administrator/templates/hathor
templates/beez3
build/generatecss.php
media/jui/less

# CSS map files #
# CSS map files
.map

# phpDocumentor Logs #
# phpDocumentor Logs
phpdoc-*

# Patch Tester #
# Patch Tester
/administrator/components/com_patchtester
/administrator/templates/atum/html/com_patchtester
/components/com_patchtester
/media/com_patchtester

# Languages #
# Languages
administrator/language/*
!administrator/language/en-GB
administrator/manifests/packages/*
Expand All @@ -85,21 +87,20 @@ language/*
!language/en-GB
!language/overrides/index.html

# OSX #
# OSX
._*
.Spotlight-V100
.Trashes

# Windows #
# Windows
Thumbs.db
Desktop.ini

# Never ignore #
# Never ignore
# Only apply this rule to the main repository's gitignore files
!/.gitignore
!/build/.gitignore


# Build related
RoboFile.ini

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
ToolbarHelper::title(Text::_('COM_ACTIONLOGS_MANAGER_USERLOGS'), 'list-2');
ToolbarHelper::title(Text::_('COM_ACTIONLOGS_MANAGER_USERLOGS'), 'fas fa-list-ul');

ToolbarHelper::custom('actionlogs.exportSelectedLogs', 'download', '', 'COM_ACTIONLOGS_EXPORT_CSV', true);
ToolbarHelper::custom('actionlogs.exportLogs', 'download', '', 'COM_ACTIONLOGS_EXPORT_ALL_CSV', false);
Expand Down
148 changes: 148 additions & 0 deletions administrator/components/com_admin/forms/profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<form>
<fieldset
name="user_details"
label="COM_ADMIN_PROFILE_FIELDSET_USER_DETAILS_LABEL"
>
<field
name="name"
type="text"
label="COM_ADMIN_PROFILE_HEADING_NAME"
required="true"
size="30"
/>

<field
name="username"
type="text"
label="COM_ADMIN_PROFILE_FIELD_USERNAME_LABEL"
required="true"
size="30"
/>

<field
name="password"
type="password"
label="JGLOBAL_PASSWORD"
autocomplete="new-password"
class="validate-password-strength"
filter="raw"
validate="password"
strengthmeter="true"
force="on"
size="30"
/>

<field
name="password2"
type="password"
label="COM_ADMIN_PROFILE_FIELD_PASSWORD2_LABEL"
autocomplete="new-password"
class="validate-passwordExtra"
filter="raw"
message="COM_ADMIN_PROFILE_FIELD_PASSWORD1_MESSAGE"
size="30"
validate="equals"
field="password"
/>

<field
name="email"
type="email"
label="JGLOBAL_EMAIL"
class="validate-email"
required="true"
size="30"
validate="email"
/>

<field
name="registerDate"
type="calendar"
label="COM_ADMIN_PROFILE_FIELD_REGISTERDATE_LABEL"
class="readonly"
readonly="true"
translateformat="true"
showtime="true"
size="22"
filter="user_utc"
/>

<field
name="lastvisitDate"
type="calendar"
label="COM_ADMIN_PROFILE_FIELD_LASTVISIT_LABEL"
class="readonly"
readonly="true"
translateformat="true"
showtime="true"
size="22"
filter="user_utc"
/>

<field
name="id"
type="number"
label="JGLOBAL_FIELD_ID_LABEL"
class="readonly"
default="0"
readonly="true"
filter="unset"
/>

</fieldset>

<fields name="params">

<fieldset
name="settings"
label="COM_ADMIN_PROFILE_FIELDSET_SETTINGS_LABEL"
>
<field
name="admin_style"
type="templatestyle"
label="COM_ADMIN_PROFILE_FIELD_BACKEND_TEMPLATE_LABEL"
client="administrator"
filter="uint"
>
<option value="">JOPTION_USE_DEFAULT</option>
</field>

<field
name="admin_language"
type="language"
label="COM_ADMIN_PROFILE_FIELD_BACKEND_LANGUAGE_LABEL"
client="administrator"
>
<option value="">JOPTION_USE_DEFAULT</option>
</field>

<field
name="language"
type="language"
label="COM_ADMIN_PROFILE_FIELD_FRONTEND_LANGUAGE_LABEL"
client="site"
>
<option value="">JOPTION_USE_DEFAULT</option>
</field>

<field
name="editor"
type="plugins"
label="COM_ADMIN_PROFILE_FIELD_EDITOR_LABEL"
folder="editors"
useaccess="true"
>
<option value="">JOPTION_USE_DEFAULT</option>
</field>

<field
name="timezone"
type="timezone"
label="COM_ADMIN_PROFILE_FIELD_TIMEZONE_LABEL"
>
<option value="">JOPTION_USE_DEFAULT</option>
</field>
</fieldset>
</fields>
</form>
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_admin
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

namespace Joomla\Component\Admin\Administrator\Controller;

\defined('_JEXEC') or die;

use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;

/**
* User profile controller class.
*
* @since 1.6
*/
class ProfileController extends FormController
{
/**
* Method to check if you can edit a record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = [], $key = 'id')
{
return isset($data['id']) && $data['id'] == $this->app->getIdentity()->id;
}

/**
* Overrides parent save method to check the submitted passwords match.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 3.2
*/
public function save($key = null, $urlVar = null)
{
$result = parent::save();

if ($this->getTask() !== 'apply')
{
$return = base64_decode($this->input->get('return', '', 'BASE64'));

if ($return !== '' && Uri::isInternal($return))
{
// Redirect to return URL.
$this->setRedirect(Route::_($return, false));
}
else
{
// Redirect to the main page.
$this->setRedirect(Route::_('index.php', false));
}
}

return $result;
}

/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 1.6
*/
public function cancel($key = null)
{
$result = parent::cancel($key);
$return = base64_decode($this->input->get('return', '', 'BASE64'));

if ($return !== '' && Uri::isInternal($return))
{
// Redirect to return URL.
$this->setRedirect(Route::_($return, false));
}
else
{
// Redirect to the main page.
$this->setRedirect(Route::_('index.php', false));
}

return $result;
}
}
Loading

0 comments on commit 63c86fd

Please sign in to comment.