Skip to content

Commit 690cf18

Browse files
AndySDHHLeithner
authored andcommitted
Fixing a mistake made with PR #24397 + fixing setting description for clarity (#25062)
* Undoing PR #24397 which was a mistake The PR was adding a check to display the custom field on the frontend based on a parameter that was meant to be a check for the edit form
1 parent ee6911d commit 690cf18

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed

administrator/components/com_fields/libraries/fieldsplugin.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,6 @@ public function onCustomFieldsPrepareField($context, $item, $field)
117117
return;
118118
}
119119

120-
// Check if the field should be displayed on the form
121-
if (!FieldsHelper::displayFieldOnForm($field))
122-
{
123-
return;
124-
}
125-
126120
// Merge the params from the plugin and field which has precedence
127121
$fieldParams = clone $this->params;
128122
$fieldParams->merge($field->fieldparams);

administrator/components/com_fields/models/forms/field.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,14 +264,14 @@
264264
<field
265265
name="show_on"
266266
type="radio"
267-
label="COM_FIELDS_FIELD_SHOW_ON_LABEL"
268-
description="COM_FIELDS_FIELD_SHOW_ON_DESC"
267+
label="COM_FIELDS_FIELD_EDITABLE_IN_LABEL"
268+
description="COM_FIELDS_FIELD_EDITABLE_IN_DESC"
269269
class="btn-group btn-group-yesno"
270270
default=""
271271
>
272-
<option value="1">COM_FIELDS_FIELD_SHOW_ON_SITE</option>
273-
<option value="2">COM_FIELDS_FIELD_SHOW_ON_ADMIN</option>
274-
<option value="">COM_FIELDS_FIELD_SHOW_ON_BOTH</option>
272+
<option value="1">COM_FIELDS_FIELD_EDITABLE_IN_SITE</option>
273+
<option value="2">COM_FIELDS_FIELD_EDITABLE_IN_ADMIN</option>
274+
<option value="">COM_FIELDS_FIELD_EDITABLE_IN_BOTH</option>
275275
</field>
276276

277277
<field

administrator/language/en-GB/en-GB.com_fields.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ COM_FIELDS_FIELD_DISPLAY_BEFORE_DISPLAY="Before Display"
2222
COM_FIELDS_FIELD_DISPLAY_DESC="Joomla offers some content events which are triggered during the content creation process. This is the place to define how the custom fields should be integrated into content."
2323
COM_FIELDS_FIELD_DISPLAY_LABEL="Automatic Display"
2424
COM_FIELDS_FIELD_DISPLAY_NO_DISPLAY="Do not automatically display"
25+
COM_FIELDS_FIELD_EDITABLE_IN_ADMIN="Administrator"
26+
COM_FIELDS_FIELD_EDITABLE_IN_BOTH="Both"
27+
COM_FIELDS_FIELD_EDITABLE_IN_DESC="On which part of the site should the field be editable?"
28+
COM_FIELDS_FIELD_EDITABLE_IN_LABEL="Editable In"
29+
COM_FIELDS_FIELD_EDITABLE_IN_SITE="Site"
2530
COM_FIELDS_FIELD_GROUP_DESC="The group this field belongs to."
2631
COM_FIELDS_FIELD_GROUP_LABEL="Field Group"
2732
COM_FIELDS_FIELD_LAYOUT_DESC="Choose an alternate layout."
@@ -50,11 +55,6 @@ COM_FIELDS_FIELD_RENDER_CLASS_DESC="The class attributes of the field when the f
5055
COM_FIELDS_FIELD_RENDER_CLASS_LABEL="Render Class"
5156
COM_FIELDS_FIELD_REQUIRED_DESC="Is this a mandatory field?"
5257
COM_FIELDS_FIELD_REQUIRED_LABEL="Required"
53-
COM_FIELDS_FIELD_SHOW_ON_ADMIN="Administrator"
54-
COM_FIELDS_FIELD_SHOW_ON_BOTH="Both"
55-
COM_FIELDS_FIELD_SHOW_ON_DESC="On which part of the site should the field be shown?"
56-
COM_FIELDS_FIELD_SHOW_ON_LABEL="Show On"
57-
COM_FIELDS_FIELD_SHOW_ON_SITE="Site"
5858
COM_FIELDS_FIELD_TYPE_DESC="The type of the field."
5959
COM_FIELDS_FIELD_TYPE_LABEL="Type"
6060
COM_FIELDS_FIELD_USE_GLOBAL="Use settings from Plugin"

0 commit comments

Comments
 (0)