Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions _build/templates/default/sass/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1561,16 +1561,18 @@ iframe[classname="x-hidden"] {
.x-panel-bwrap {
background-color: transparent !important;
}

p {
&:not(:first-of-type) {
margin-top: 0.5rem;
}
}
}

.with-title .panel-desc {
margin: 0;
}

.panel-desc p {
padding: 0;
}

/* All the other wrapped element (forms need to be wrapped in a panel isolated from the other components) */
.main-wrapper {
background-color: $white;
Expand Down
1 change: 1 addition & 0 deletions core/lexicon/en/access.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
$_lang['resource_group_err_create'] = 'An error occurred while trying to create the resource group.';
$_lang['resource_group_err_nf'] = 'Resource group not found.';
$_lang['resource_group_err_ns'] = 'Resource group not specified.';
$_lang['resource_group_err_name_ns'] = 'Please enter a name for the Resource Group.';
$_lang['resource_group_err_remove'] = 'An error occurred while trying to delete the resource group.';
$_lang['resource_group_remove'] = 'Delete Resource Group';
$_lang['resource_group_remove_confirm'] = 'Are you sure you want to delete the resource group: "[[+resource_group]]"?';
Expand Down
2 changes: 2 additions & 0 deletions core/lexicon/en/default.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@
$_lang['resource_group'] = 'Resource Group';
$_lang['resource_group_id'] = 'RG ID';
$_lang['resource_groups'] = 'Resource Groups';
$_lang['resource_groups_panel_desc'] = '<p>Drag Resources into and between Resource Groups.</p><p>By default, dragging a Resource from one group to another will <em>move</em> it, not copy it. To <em>copy</em> a Resource in one group to another group, press and hold the <strong>option/alt</strong> key before clicking and dragging the Resource.</p>';
$_lang['resource_management'] = 'Manage resources';
$_lang['resource_name'] = 'Resource name';
$_lang['resource_name_new'] = 'New Resource Name';
Expand Down Expand Up @@ -564,6 +565,7 @@

// Temporarily match old keys to new ones to ensure compatibility
$_lang['clear_cache_on_save_msg'] = $_lang['clear_cache_on_save_desc'];
$_lang['rrg_drag'] = $_lang['resource_groups_panel_desc'];

/*
Shared lang entries for elements --
Expand Down
1 change: 0 additions & 1 deletion core/lexicon/en/user.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
$_lang['role_remove_confirm'] = 'Are you sure you want to delete this role?';
$_lang['role_warn_authority_locked'] = 'This Role’s authority can not be changed because this Role is currently assigned to one or more Access Control List entries.';
$_lang['roles'] = 'Roles';
$_lang['rrg_drag'] = 'Drag resources into resource groups here.';
$_lang['ugc_grid_title'] = 'User Group Access to Contexts';
$_lang['ugc_remove'] = 'Delete User Group Access to this Context';
$_lang['ugrg_grid_title'] = 'User Group Access to Resource Groups';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
* This file is part of MODX Revolution.
*
Expand Down Expand Up @@ -50,7 +51,7 @@ public function beforeSave()
{
$name = $this->getProperty('name');
if (empty($name)) {
$this->addFieldError('name', $this->modx->lexicon('resource_group_ns_name'));
$this->addFieldError('name', $this->modx->lexicon('resource_group_err_name_ns'));
}

if ($this->doesAlreadyExist(['name' => $name])) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
* This file is part of MODX Revolution.
*
Expand Down Expand Up @@ -82,7 +83,7 @@ public function validate()
{
$name = $this->getProperty('name');
if (empty($name)) {
$this->addFieldError('name', $this->modx->lexicon('resource_group_err_ns_name'));
$this->addFieldError('name', $this->modx->lexicon('resource_group_err_name_ns'));
}

if ($this->alreadyExists($name)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
* This file is part of MODX Revolution.
*
Expand Down Expand Up @@ -38,9 +39,8 @@ class UpdateResourcesIn extends CreateProcessor
*/
public function beforeSave()
{
/* format data */
$resourceId = substr(strrchr($this->getProperty('resource', ''), '_'), 1);
$resourceGroupId = substr(strrchr($this->getProperty('resourceGroup', ''), '_'), 1);
$resourceId = $this->getProperty('resource', '');
$resourceGroupId = $this->getProperty('resourceGroup', '');

if (empty($resourceId) || empty($resourceGroupId)) {
return $this->modx->lexicon('invalid_data');
Expand All @@ -56,10 +56,12 @@ public function beforeSave()
return $this->modx->lexicon('resource_group_err_nf');
}

if ($this->doesAlreadyExist([
'document' => $this->resource->get('id'),
'document_group' => $this->resourceGroup->get('id'),
])) {
if (
$this->doesAlreadyExist([
'document' => $this->resource->get('id'),
'document_group' => $this->resourceGroup->get('id'),
])
) {
return $this->modx->lexicon($this->objectType . '_err_ae');
}

Expand Down Expand Up @@ -91,5 +93,4 @@ public function cleanup()

return $this->success('', $objArray);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MODx.panel.ResourceGroups = function(config) {
,layout: 'form'
,defaults: { border: false ,autoHeight: true }
,items: [{
html: '<p>'+_('rrg_drag')+'</p>'
html: _('resource_groups_panel_desc')
,xtype: 'modx-description'
},{
layout: 'column'
Expand Down
Loading