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
17 changes: 11 additions & 6 deletions core/lexicon/en/default.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,6 @@
$_lang['tree_expand'] = 'Expand tree';
$_lang['tree_refresh'] = 'Refresh tree';
$_lang['tree_sort'] = 'Sort tree';
$_lang['tv'] = 'TV';
$_lang['tv_value_inherited'] = 'Value Inherited';
$_lang['type'] = 'Type';
$_lang['uncategorized'] = 'uncategorized';
Expand Down Expand Up @@ -571,10 +570,6 @@
$_lang['friday'] = 'Friday';
$_lang['saturday'] = 'Saturday';

// 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 All @@ -591,7 +586,11 @@
$_lang['template_missing_reassign'] = '(missing — please select a template or “empty” from this list)';
$_lang['template_missing_desc'] = '(Note: The assigned template no longer exists)';

// TVs
// TVs (some entries also used in Form Customization)
$_lang['tv_abbr'] = 'TV';
$_lang['tv_long'] = 'Template Variable';
$_lang['tvs_abbr'] = 'TVs';
$_lang['tvs_long'] = 'Template Variables';
$_lang['tv_type'] = 'Input Type';
$_lang['tv_default'] = 'Default Value';
$_lang['tv_default_desc'] = 'The content this TV will show if user-entered content is not provided.';
Expand All @@ -600,3 +599,9 @@
$_lang['tv_description_desc'] = 'Usage information for this TV shown next to its caption in Resource editing pages and as a tooltip in the Elements tree.';
$_lang['tv_elements'] = 'Input Option Values';
$_lang['tv_elements_short_desc'] = 'Defines the selectable options for this TV, which may be manually entered or built with a one-line <a href="https://docs.modx.com/current/en/building-sites/elements/template-variables/bindings/select-binding" target="_blank">database query</a>.';

// 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'];
$_lang['tv'] = $_lang['tv_abbr'];
$_lang['tvs'] = $_lang['tvs_long'];
Comment thread
smg6511 marked this conversation as resolved.
2 changes: 0 additions & 2 deletions core/lexicon/en/formcustomization.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,11 @@
$_lang['tab_remove_confirm'] = 'Are you sure you want to delete this tab?';
$_lang['tab_visible'] = 'Tab Visible';
$_lang['tabs'] = 'Tabs';
$_lang['tv'] = 'TV';
$_lang['tv_default'] = 'TV Default Value';
$_lang['tv_label'] = 'TV Label';
$_lang['tv_name'] = 'Name';
$_lang['tv_move'] = 'Move TV to Tab';
$_lang['tv_visible'] = 'TV Visible';
$_lang['tvs'] = 'Template Variables';
$_lang['usergroup'] = 'User Group';
$_lang['usergroup_create'] = 'Create User Group';
$_lang['usergroup_desc'] = 'Optional. If set, will restrict this Profile to only Users in the specified User Group.';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ MODx.grid.TemplateTV = function(config = {}) {
sortBy: 'category_name, tv_rank',
grouping: true,
groupBy: 'category_name',
singleText: _('tv'),
pluralText: _('tvs'),
singleText: _('tv_long'),
pluralText: _('tvs_long'),
enableDragDrop: true,
ddGroup: 'template-tvs-ddsort',
sm: new Ext.grid.RowSelectionModel({
Expand Down
25 changes: 21 additions & 4 deletions manager/assets/modext/widgets/fc/modx.panel.fcset.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ MODx.grid.FCSetFields = function(config = {}) {
header: _('visible'),
dataIndex: 'visible',
width: 40,
sortable: false
sortable: false,
groupRenderer: function(v) {
return v ? _('yes') : _('no');
}
});
Comment thread
smg6511 marked this conversation as resolved.
Ext.applyIf(config, {
id: 'modx-grid-fc-set-fields',
Expand All @@ -286,10 +289,12 @@ MODx.grid.FCSetFields = function(config = {}) {
sortBy: 'rank',
sortDir: 'ASC',
hideGroupedColumn: true,
groupTextTpl: `{[values.rs[0].data.tab]} ({[values.rs.length]} {[values.rs.length > 1 ? "${_('fields')}" : "${_('field')}"]})`,
singleText: _('field'),
pluralText: _('fields'),
Comment thread
smg6511 marked this conversation as resolved.
columns: [{
header: _('name'),
dataIndex: 'name',
groupable: false,
width: 200
}, {
header: `${_('region')} (${_('tab_id')})`,
Expand All @@ -302,13 +307,15 @@ MODx.grid.FCSetFields = function(config = {}) {
}, this.vcb, {
header: _('label'),
dataIndex: 'label',
groupable: false,
editor: { xtype: 'textfield' },
renderer: function(value, metaData) {
return Ext.util.Format.htmlEncode(value);
}
}, {
header: _('default_value'),
dataIndex: 'default_value',
groupable: false,
editor: { xtype: 'textfield' },
renderer: function(v, md) {
return Ext.util.Format.htmlEncode(v);
Expand All @@ -319,6 +326,7 @@ MODx.grid.FCSetFields = function(config = {}) {
MODx.grid.FCSetFields.superclass.constructor.call(this, config);
this.propRecord = Ext.data.Record.create(config.fields);
};

Ext.extend(MODx.grid.FCSetFields, MODx.grid.LocalGrid);
Ext.reg('modx-grid-fc-set-fields', MODx.grid.FCSetFields);

Expand Down Expand Up @@ -429,8 +437,12 @@ MODx.grid.FCSetTVs = function(config = {}) {
header: _('visible'),
dataIndex: 'visible',
width: 40,
sortable: false
sortable: false,
groupRenderer: function(v) {
return v ? _('yes') : _('no');
}
});

Ext.applyIf(config, {
id: 'modx-grid-fc-set-tvs',
showActionsColumn: false,
Expand All @@ -451,7 +463,8 @@ MODx.grid.FCSetTVs = function(config = {}) {
sortBy: 'rank',
sortDir: 'ASC',
stateful: false,
groupTextTpl: `{group} ({[values.rs.length]} {[values.rs.length > 1 ? "${_('tvs')}" : "${_('tv')}"]})`,
singleText: _('tv_long'),
pluralText: _('tvs_long'),
plugins: [this.vcb],
hideGroupedColumn: true,
columns: [{
Expand All @@ -461,6 +474,7 @@ MODx.grid.FCSetTVs = function(config = {}) {
header: _('tv_name'),
dataIndex: 'name',
width: 200,
groupable: false,
renderer: {
fn: function(value, metaData, record) {
const canEditTvs = MODx.perm.edit_tv && MODx.perm.save_tv;
Expand All @@ -477,15 +491,18 @@ MODx.grid.FCSetTVs = function(config = {}) {
}, this.vcb, {
header: _('label'),
dataIndex: 'label',
groupable: false,
editor: { xtype: 'textfield' }
}, {
header: _('default_value'),
dataIndex: 'default_value',
groupable: false,
editor: { xtype: 'textfield' },
renderer: function(v) { return Ext.util.Format.htmlEncode(v); }
}, {
header: _('original_value'),
dataIndex: 'default_text',
groupable: false,
editable: false
}, {
header: `${_('region')} (${_('tab_id')})`,
Expand Down
Loading