Skip to content

[Port to 3.x] Fix Various Issues with Resource/Element Validation and Field Display #15887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
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
653 changes: 345 additions & 308 deletions _build/templates/default/sass/_forms.scss

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions _build/templates/default/sass/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,17 @@ iframe[classname="x-hidden"] {
.x-panel-bwrap {
background-color: transparent !important;
}

a {
text-decoration: none;
border-bottom: 1px dotted $colorSplash;
color: $colorSplash;

&:hover {
color: $black;
}
}

}

.with-title .panel-desc {
Expand Down
29 changes: 21 additions & 8 deletions core/lexicon/en/chunk.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
* @package modx
* @subpackage lexicon
*/

// Entry out of alpha order because it must come before the entry it's used in below
$_lang['example_tag_chunk_name'] = 'NameOfChunk';

$_lang['chunk'] = 'Chunk';
$_lang['chunk_desc_category'] = 'The Category this Chunk belongs in.';
$_lang['chunk_desc_description'] = 'A short description of this chunk.';
$_lang['chunk_desc_name'] = 'The name of this chunk. It will be available using the [[$nameOfChunk]] tags.';
$_lang['chunk_code'] = 'Chunk code (html)';
$_lang['chunk_desc'] = 'Description';
$_lang['chunk_category_desc'] = 'Use to group Chunks within the Elements tree.';
$_lang['chunk_code'] = 'Chunk Code (HTML)';
$_lang['chunk_description_desc'] = 'Usage information for this Chunk shown in search results and as a tooltip in the Elements tree.';
$_lang['chunk_delete_confirm'] = 'Are you sure you want to delete this chunk?';
$_lang['chunk_duplicate_confirm'] = 'Are you sure you want to duplicate this chunk?';
$_lang['chunk_err_create'] = 'An error occurred while trying to create the chunk.';
Expand All @@ -26,11 +28,22 @@
$_lang['chunk_err_ns'] = 'Chunk not specified.';
$_lang['chunk_err_ns_name'] = 'Please specify a name.';
$_lang['chunk_lock'] = 'Lock chunk for editing';
$_lang['chunk_lock_msg'] = 'Users must have the edit_locked attribute in order to edit this chunk.';
$_lang['chunk_msg'] = 'Here you can create/edit chunks. Remember: Chunks are \'raw\' HTML code; so any PHP code won\'t be processed.';
$_lang['chunk_name'] = 'Chunk name';
$_lang['chunk_lock_desc'] = 'Only users with “edit_locked” permissions can edit this Chunk.';
$_lang['chunk_name_desc'] = 'Place the content generated by this Chunk in a Resource, Template, or other Chunk using the following MODX tag: <span class="copy-this">[[$<span class="example-replace-name">'.$_lang['example_tag_chunk_name'].'</span>]]</span>';
$_lang['chunk_new'] = 'Create Chunk';
$_lang['chunk_properties'] = 'Default Properties';
$_lang['chunk_tab_general_desc'] = 'Here you can enter the basic attributes for this <em>Chunk</em> as well as its content. The content must be HTML, either placed in the <a href="#x-form-el-modx-chunk-snippet">Chunk Code</a> field below or in a static external file, and may include MODX tags. Note, however, that PHP code will not run in this element.';
$_lang['chunk_tag_copied'] = 'Chunk tag copied!';
$_lang['chunk_title'] = 'Create/edit chunk';
$_lang['chunk_untitled'] = 'Untitled Chunk';
$_lang['chunks'] = 'Chunks';

// Temporarily match old keys to new ones to ensure compatibility
// --fields
$_lang['chunk_desc_category'] = $_lang['chunk_category_desc'];
$_lang['chunk_desc_description'] = $_lang['chunk_description_desc'];
$_lang['chunk_desc_name'] = $_lang['chunk_name_desc'];
$_lang['chunk_lock_msg'] = $_lang['chunk_lock_desc'];

// --tabs
$_lang['chunk_msg'] = $_lang['chunk_tab_general_desc'];
1 change: 1 addition & 0 deletions core/lexicon/en/element.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
$_lang['element_err_nf'] = 'Element not found.';
$_lang['element_err_ns'] = 'Element not specified.';
$_lang['element_err_staticfile_exists'] = 'A static file already exists within the specified path.';
$_lang['element_lock'] = 'Restrict Editing';
$_lang['element_static_source_immutable'] = 'The static file specified as the element source is not writable! You cannot edit the content of this element in the manager.';
$_lang['element_static_source_protected_invalid'] = 'You cannot point your Element to the MODX configuration directory; this is a protected, non-accessible directory.';
$_lang['is_static'] = 'Is Static';
Expand Down
28 changes: 18 additions & 10 deletions core/lexicon/en/plugin.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
$_lang['events'] = 'Events';
$_lang['plugin'] = 'Plugin';
$_lang['plugin_add'] = 'Add Plugin';
$_lang['plugin_code'] = 'Plugin code (php)';
$_lang['plugin_category_desc'] = 'Use to group Plugins within the Elements tree.';
$_lang['plugin_code'] = 'Plugin Code (PHP)';
$_lang['plugin_config'] = 'Plugin configuration';
$_lang['plugin_desc'] = 'Description';
$_lang['plugin_desc_category'] = 'The Category this Plugin belongs in.';
$_lang['plugin_desc_description'] = 'A short description of this Plugin.';
$_lang['plugin_desc_name'] = 'The name of this Plugin.';
$_lang['plugin_description_desc'] = 'Usage information for this Plugin shown in search results and as a tooltip in the Elements tree.';
$_lang['plugin_delete_confirm'] = 'Are you sure you want to delete this plugin?';
$_lang['plugin_disabled'] = 'Inactive plugin';
$_lang['plugin_disabled_msg'] = 'Plugin is deactivated and will not respond to events.';
$_lang['plugin_disabled'] = 'Deactivate Plugin';
$_lang['plugin_disabled_msg'] = 'When deactivated, this Plugin will not respond to events.';
$_lang['plugin_duplicate_confirm'] = 'Are you sure you want to duplicate this plugin?';
$_lang['plugin_err_create'] = 'An error occurred while creating the plugin.';
$_lang['plugin_err_ae'] = 'A plugin already exists with the name "[[+name]]".';
Expand All @@ -37,14 +35,24 @@
$_lang['plugin_event_msg'] = 'Select the events that you would like this plugin to listen to.';
$_lang['plugin_event_plugin_remove_confirm'] = 'Are you sure you want to delete this plugin from this event?';
$_lang['plugin_lock'] = 'Plugin locked for editing';
$_lang['plugin_lock_msg'] = 'Users must have the edit_locked attribute in order to edit this plugin.';
$_lang['plugin_lock_desc'] = 'Only users with “edit_locked” permissions can edit this Plugin.';
$_lang['plugin_locked_message'] = 'This plugin is locked.';
$_lang['plugin_management_msg'] = 'Here you can choose which plugin you wish to edit.';
$_lang['plugin_msg'] = 'Here you can create/edit plugins. Plugins are \'raw\' PHP codes that are invoked whenever the selected System Events are triggered.';
$_lang['plugin_name'] = 'Plugin name';
$_lang['plugin_name_desc'] = 'The name of this Plugin.';
$_lang['plugin_new'] = 'Create Plugin';
$_lang['plugin_priority'] = 'Edit Plugin Execution Order by Event';
$_lang['plugin_properties'] = 'Plugin Properties';
$_lang['plugin_tab_general_desc'] = 'Here you can enter the basic attributes for this <em>Plugin</em> as well as its content. The content must be PHP, either placed in the <a href="#x-form-el-modx-plugin-plugincode">Plugin Code</a> field below or in a static external file. The PHP code entered runs in response to one or more MODX System Events that you specify.';
$_lang['plugin_title'] = 'Create/edit plugin';
$_lang['plugin_untitled'] = 'Untitled plugin';
$_lang['plugins'] = 'Plugins';

// Temporarily match old keys to new ones to ensure compatibility
// --fields
$_lang['plugin_desc_category'] = $_lang['plugin_category_desc'];
$_lang['plugin_desc_description'] = $_lang['plugin_description_desc'];
$_lang['plugin_desc_name'] = $_lang['plugin_name_desc'];
$_lang['plugin_lock_msg'] = $_lang['plugin_lock_desc'];

// --tabs
$_lang['plugin_msg'] = $_lang['plugin_tab_general_desc'];
6 changes: 3 additions & 3 deletions core/lexicon/en/resource.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
$_lang['resource_settings'] = 'Resource Settings';
$_lang['resource_status'] = 'Status';
$_lang['resource_status_help'] = 'If published, the resource is available to the public immediately after saving it. Otherwise, it is hidden from the public site.';
$_lang['resource_summary'] = 'Summary (introtext)';
$_lang['resource_summary'] = 'Summary';
$_lang['resource_summary_help'] = 'A brief summary of the resource.';
$_lang['resource_syncsite'] = 'Empty Cache';
$_lang['resource_syncsite_help'] = 'When enabled, this will make MODX empty the cache after you save the resource. This way your visitors will not see an older version of the resource.';
Expand All @@ -138,7 +138,7 @@
$_lang['resource_undelete'] = 'Undelete';
$_lang['resource_unpublish'] = 'Unpublish';
$_lang['resource_unpublish_confirm'] = 'Un-publishing this resource now will delete any (un)publishing dates that may have been set. If you wish to set or keep publish or unpublish dates, please choose to edit the resource instead. <br /><br />Proceed?';
$_lang['resource_unpublishdate'] = 'Unpublish date';
$_lang['resource_unpublishdate'] = 'Unpublish Date';
$_lang['resource_unpublishdate_help'] = 'If you set an unpublish date, the resource will be unpublished as soon as the unpublish date is reached. Click on the calendar icon to select a date, or leave it blank to set it so the resource is never automatically unpublished.';
$_lang['resource_unpublished'] = 'Unpublished';
$_lang['resource_untitled'] = 'Untitled Resource';
Expand Down Expand Up @@ -174,4 +174,4 @@

$_lang['resource_right_top_title'] = 'Publishing';
$_lang['resource_right_middle_title'] = 'Template';
$_lang['resource_right_bottom_title'] = 'Behaviour in menu';
$_lang['resource_right_bottom_title'] = 'Behaviour in Menu';
26 changes: 18 additions & 8 deletions core/lexicon/en/snippet.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
* @package modx
* @subpackage lexicon
*/
$_lang['example_tag_snippet_name'] = 'NameOfSnippet';
$_lang['snippet'] = 'Snippet';
$_lang['snippets_available'] = 'Snippets available for you to include in your page';
$_lang['snippet_code'] = 'Snippet code (php)';
$_lang['snippet_category_desc'] = 'Use to group Snippets within the Elements tree.';
$_lang['snippet_code'] = 'Snippet Code (PHP)';
$_lang['snippet_delete_confirm'] = 'Are you sure you want to delete this snippet?';
$_lang['snippet_desc'] = 'Description';
$_lang['snippet_desc_category'] = 'The Category this Snippet belongs in.';
$_lang['snippet_desc_description'] = 'A short description of this Snippet.';
$_lang['snippet_desc_name'] = 'The name of this Snippet. It will be available using the [[NameOfSnippet]] tags.';
$_lang['snippet_description_desc'] = 'Usage information for this Snippet shown in search results and as a tooltip in the Elements tree.';
$_lang['snippet_duplicate_confirm'] = 'Are you sure you want to duplicate this snippet?';
$_lang['snippet_duplicate_error'] = 'An error occurred while duplicating the snippet.';
$_lang['snippet_err_create'] = 'An error occurred while creating the snippet.';
Expand All @@ -29,12 +28,23 @@
$_lang['snippet_err_save'] = 'An error occurred while saving the snippet.';
$_lang['snippet_execonsave'] = 'Execute snippet after saving.';
$_lang['snippet_lock'] = 'Lock snippet for editing';
$_lang['snippet_lock_msg'] = 'Users must have the edit_locked attribute in order to be able to edit this snippet.';
$_lang['snippet_lock_desc'] = 'Only users with “edit_locked” permissions can edit this Snippet.';
$_lang['snippet_management_msg'] = 'Here you can choose which snippet you wish to edit.';
$_lang['snippet_msg'] = 'Here you can create/edit snippets. Remember, snippets are \'raw\' PHP code, and if you expect the output of the snippet to be shown at a certain point within the template, you need to return a value from within the snippet.';
$_lang['snippet_name'] = 'Snippet name';
$_lang['snippet_name_desc'] = 'Place the content generated by this Snippet in a Resource, Template, or Chunk using the following MODX tag: <span class="copy-this">[[<span class="example-replace-name">'.$_lang['example_tag_snippet_name'].'</span>]]</span>';
$_lang['snippet_new'] = 'Create Snippet';
$_lang['snippet_properties'] = 'Default Properties';
$_lang['snippet_tab_general_desc'] = 'Here you can enter the basic attributes for this <em>Snippet</em> as well as its content. The content must be PHP, either placed in the <a href="#x-form-el-modx-snippet-snippet">Snippet Code</a> field below or in a static external file. To receive output from your Snippet at the point where it is called (within a Template or Chunk), a value must be returned from within the code.';
$_lang['snippet_tag_copied'] = 'Snippet tag copied!';
$_lang['snippet_title'] = 'Create/edit snippet';
$_lang['snippet_untitled'] = 'Untitled snippet';
$_lang['snippets'] = 'Snippets';

// Temporarily match old keys to new ones to ensure compatibility
// --fields
$_lang['snippet_desc_category'] = $_lang['snippet_category_desc'];
$_lang['snippet_desc_description'] = $_lang['snippet_description_desc'];
$_lang['snippet_desc_name'] = $_lang['snippet_name_desc'];
$_lang['snippet_lock_msg'] = $_lang['snippet_lock_desc'];

// --tabs
$_lang['snippet_msg'] = $_lang['snippet_tab_general_desc'];
37 changes: 23 additions & 14 deletions core/lexicon/en/template.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
$_lang['rank'] = 'Rank';
$_lang['template'] = 'Template';
$_lang['template_assignedtv_tab'] = 'Assigned TVs';
$_lang['template_code'] = 'Template code (HTML)';
$_lang['template_desc'] = 'Description';
$_lang['template_desc_category'] = 'The Category this Template belongs in.';
$_lang['template_desc_description'] = 'A short description of this Template.';
$_lang['template_desc_name'] = 'The name of this Template.';
$_lang['template_category_desc'] = 'Use to group Templates within the Elements tree.';
$_lang['template_code'] = 'Template Code (HTML)';
$_lang['template_delete_confirm'] = 'Are you sure you want to delete this template?';
$_lang['template_description_desc'] = 'Usage information for this Template shown in search results and as a tooltip in the Elements tree.';
$_lang['template_duplicate_confirm'] = 'Are you sure you want to duplicate this template?';
$_lang['template_edit_tab'] = 'Edit Template';
$_lang['template_empty'] = '(empty)';
Expand All @@ -26,33 +24,44 @@
$_lang['template_err_duplicate'] = 'An error occured while duplicating the template.';
$_lang['template_err_ae'] = 'A template already exists with the name "[[+name]]".';
$_lang['template_err_in_use'] = 'This template is in use. Please set the documents using the template to another template. Documents using this template:<br />';
$_lang['template_err_invalid_name'] = 'Template name is invalid.';
$_lang['template_err_locked'] = 'Template is locked from editing.';
$_lang['template_err_nf'] = 'Template not found!';
$_lang['template_err_ns'] = 'Template not specified.';
$_lang['template_err_ns_name'] = 'Please specify a name for the template.';
$_lang['template_err_remove'] = 'An error occurred while trying to delete the template.';
$_lang['template_err_save'] = 'An error occurred while saving the template.';
$_lang['template_icon'] = 'Icon';
$_lang['template_icon_description'] = 'Optional. A custom CSS icon class for all resources with this template. For example a Font Awesome (free) class such as icon-home or fa-home.';
$_lang['template_icon'] = 'Manager Icon Class';
$_lang['template_icon_desc'] = 'A CSS class to assign an icon (shown in the document trees) for all resources using this template. Font Awesome Free 5 classes such as “fa-home” may be used.';
$_lang['template_lock'] = 'Lock template for editing';
$_lang['template_lock_msg'] = 'Users must have the edit_locked attribute to edit this template.';
$_lang['template_lock_desc'] = 'Only users with “edit_locked” permissions can edit this Template.';
$_lang['template_locked_message'] = 'This template is locked.';
$_lang['template_management_msg'] = 'Here you can choose which template you wish to edit.';
$_lang['template_msg'] = 'Create and edit templates. Changed or new templates won\'t be visible in your site\'s cached pages until the cache is emptied; however, you can use the preview function on a page to see the template in action.';
$_lang['template_name'] = 'Template name';
$_lang['template_name_desc'] = 'The name of this Template.';
$_lang['template_new'] = 'Create Template';
$_lang['template_no_tv'] = 'No TVs have been assigned to this template yet.';
$_lang['template_preview'] = 'Preview Image';
$_lang['template_preview_desc'] = 'Used to preview the layout of this Template when creating a new Resource. (Minimum size: 335 x 236)';
$_lang['template_properties'] = 'Default Properties';
$_lang['template_reset_all'] = 'Reset all pages to use Default template';
$_lang['template_reset_specific'] = 'Reset only \'%s\' pages';
$_lang['template_source'] = 'Media Source';
$_lang['template_source_desc'] = 'The media source to select a static file or preview. Using "None" will assume you are specifying an absolute path.';
$_lang['template_tab_general_desc'] = 'Here you can enter the basic attributes for this <em>Template</em> as well as its content. The content must be HTML, either placed in the <a href="#x-form-el-modx-template-content">Template Code</a> field below or in a static external file, and may include MODX tags. Note that changed or new templates won’t be visible in your site’s cached pages until the cache is emptied; however, you can use the preview function on a page to see the template in action.';
$_lang['template_title'] = 'Create/edit template';
$_lang['template_tv_edit'] = 'Edit the sort order of the TVs';
$_lang['template_tv_msg'] = 'The <abbr title="Template Variables">TVs</abbr> assigned to this template are listed below.';
$_lang['template_untitled'] = 'Untitled Template';
$_lang['templates'] = 'Templates';
$_lang['tvt_err_nf'] = 'TV does not have access to the specified Template.';
$_lang['tvt_err_remove'] = 'An error occurred while trying to delete the TV from the template.';
$_lang['template_source'] = 'Media Source';
$_lang['template_source_description'] = 'The media source to select a static file or preview. Using "None" will assume you are specifying an absolute path.';
$_lang['template_preview'] = 'Template preview';
$_lang['template_preview_description'] = 'A screenshot of the template to use as preview in the template picker. Best size is 335 x 236 (w x h)';

// Temporarily match old keys to new ones to ensure compatibility
// --fields
$_lang['template_desc_category'] = $_lang['template_category_desc'];
$_lang['template_desc_description'] = $_lang['template_description_desc'];
$_lang['template_desc_name'] = $_lang['template_name_desc'];
$_lang['template_lock_msg'] = $_lang['template_lock_desc'];

// --tabs
$_lang['template_msg'] = $_lang['template_tab_general_desc'];
Loading