1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 09:44:38 +02:00

Add clarity to ProcessTemplate fields section to make it clear that you have to save newly added fields before they become editable in context. Also add note about how to drag to adjust column width of individual fields.

This commit is contained in:
Ryan Cramer
2021-07-08 11:29:36 -04:00
parent f851c63842
commit 64758ebdcc
6 changed files with 20 additions and 3 deletions

View File

@@ -132,7 +132,7 @@
* @property string $moduleServiceURL URL where the modules web service can be accessed #pw-group-modules
* @property string $moduleServiceKey API key for modules web service #pw-group-modules
* @property bool $moduleCompile Allow use of compiled modules? #pw-group-modules
* @property array $wireMail Default WireMail module settings. #pw-group-modules
* @property array $wireMail Default WireMail module settings. See /wire/config.php $config->wireMail for details. #pw-group-system
* @property array $moduleInstall Admin module install options you allow. #pw-group-modules
*
* @property array $substituteModules Associative array with names of substitute modules for when requested module doesn't exist #pw-group-modules
@@ -168,6 +168,7 @@
* @property array $statusFiles File inclusions for ProcessWires runtime statuses/states. #pw-group-system @since 3.0.142
* @property int $status Value of current system status/state corresponding to ProcessWire::status* constants. #pw-internal
* @property null|bool $disableUnknownMethodException Disable the “Method does not exist or is not callable in this context” exception. (default=null) #pw-internal
* @property string|null $phpMailAdditionalParams Additional params to pass to PHPs mail() function (when used), see $additional_params argument at https://www.php.net/manual/en/function.mail.php #pw-group-system
*
* @property int $rootPageID Page ID of homepage (usually 1) #pw-group-system-IDs
* @property int $adminRootPageID Page ID of admin root page #pw-group-system-IDs

View File

@@ -111,6 +111,7 @@ class FieldSelectorInfo extends Wire {
// skip over native properties that aren't used in selectors
if(in_array($name, array('pages_id', 'keys', 'xtra', 'sort'))) continue;
if(!is_string($schemaType)) continue;
if($name == 'data') {
// base property

View File

@@ -42,6 +42,14 @@ input[disabled=disabled] {
margin-right: 0.5em;
}
#wrap_fieldgroup_fields .notes {
display: none;
}
#wrap_fieldgroup_fields.field-added .notes {
display: block;
}
/**
* Import/export
*

View File

@@ -351,6 +351,7 @@ function ProcessTemplateAsmSelect() {
// eventData is provided by a change event triggered from asmSelect plugin after a sort or select event
if(typeof eventData == "undefined") return;
if(typeof eventData.type == "undefined") return;
if(eventData.type === 'add') $inputfield.addClass('field-added');
if(eventData.type != 'sort') return;
// update row identifications after any changes

File diff suppressed because one or more lines are too long

View File

@@ -1018,7 +1018,13 @@ class ProcessTemplate extends Process implements ConfigurableModule {
if($forField) {
$select->description = sprintf($this->_('Define the custom fields for “%s”. It is not necessary to configure anything else here.'), $forField->name);
} else {
$select->description = $this->_('Define the fields that are used by this template. You may also drag and drop fields to the desired order or [create a new field](../field/add).'); // Fields definition, description
$select->description =
$this->_('Select the fields that are used by this template and drag/drop to the desired order.') . ' ' .
sprintf(
$this->_('You may also click field name or label to edit in the context of this template, click/drag the percent indicator to adjust width, or [create a new field](%s).'),
'../field/add'
);
$select->notes = $this->_('Save this template to make newly added fields editable here.');
}
$select->icon = 'cube';
$select->attr('name', 'fieldgroup_fields');