Component-Builder/admin/forms/power.xml
Robot 0603c39cc1
Release of v5.0.3-alpha4
Fix database default fields to allow NULL. #1169. Fix the power list field to allow search. #1167. Expanded the Demo component in JCB v4 to include more advance features.
2024-09-18 04:40:33 +02:00

603 lines
19 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<form
addruleprefix="VDM\Component\Componentbuilder\Administrator\Rule"
addfieldprefix="VDM\Component\Componentbuilder\Administrator\Field"
>
<config>
<inlinehelp button="show"/>
</config>
<fieldset name="details">
<!-- Default Fields. -->
<!-- Id Field. Type: Text (joomla) -->
<field
name="id"
type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"
description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"
readonly="true"
/>
<!-- Date Created Field. Type: Calendar (joomla) -->
<field
name="created"
type="calendar"
label="COM_COMPONENTBUILDER_POWER_CREATED_DATE_LABEL"
description="COM_COMPONENTBUILDER_POWER_CREATED_DATE_DESC"
size="22"
format="%Y-%m-%d %H:%M:%S"
filter="user_utc"
/>
<!-- User Created Field. Type: User (joomla) -->
<field
name="created_by"
type="user"
label="COM_COMPONENTBUILDER_POWER_CREATED_BY_LABEL"
description="COM_COMPONENTBUILDER_POWER_CREATED_BY_DESC"
/>
<!-- Published Field. Type: List (joomla) -->
<field name="published" type="list" label="JSTATUS"
description="JFIELD_PUBLISHED_DESC" class="chzn-color-state"
filter="intval" size="1" default="1" >
<option value="1">
JPUBLISHED</option>
<option value="0">
JUNPUBLISHED</option>
<option value="2">
JARCHIVED</option>
<option value="-2">
JTRASHED</option>
</field>
<!-- Date Modified Field. Type: Calendar (joomla) -->
<field name="modified" type="calendar" class="readonly"
label="COM_COMPONENTBUILDER_POWER_MODIFIED_DATE_LABEL" description="COM_COMPONENTBUILDER_POWER_MODIFIED_DATE_DESC"
size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
<!-- User Modified Field. Type: User (joomla) -->
<field name="modified_by" type="user"
label="COM_COMPONENTBUILDER_POWER_MODIFIED_BY_LABEL"
description="COM_COMPONENTBUILDER_POWER_MODIFIED_BY_DESC"
class="readonly"
readonly="true"
filter="unset"
/>
<!-- Access Field. Type: Accesslevel (joomla) -->
<field name="access"
type="accesslevel"
label="JFIELD_ACCESS_LABEL"
description="JFIELD_ACCESS_DESC"
default="1"
required="false"
/>
<!-- Ordering Field. Type: Numbers (joomla) -->
<field
name="ordering"
type="number"
class="inputbox validate-ordering"
label="COM_COMPONENTBUILDER_POWER_ORDERING_LABEL"
description=""
default="0"
size="6"
required="false"
/>
<!-- Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
class="readonly"
label="COM_COMPONENTBUILDER_POWER_VERSION_LABEL"
description="COM_COMPONENTBUILDER_POWER_VERSION_DESC"
size="6"
default="1"
readonly="true"
filter="unset"
/>
<!-- Was added due to Permissions JS needing a Title field -->
<!-- Let us know at gh-629 should this change -->
<!-- https://github.com/vdm-io/Joomla-Component-Builder/issues/629#issuecomment-750117235 -->
<field
name="title"
type="hidden"
default="componentbuilder power"
/>
<!-- Dynamic Fields. -->
<!-- System_name Field. Type: Text. (joomla) -->
<field
type="text"
name="system_name"
label="COM_COMPONENTBUILDER_POWER_SYSTEM_NAME_LABEL"
size="10"
maxlength="50"
default=""
description="COM_COMPONENTBUILDER_POWER_SYSTEM_NAME_DESCRIPTION"
class="text_area"
filter="STRING"
message="COM_COMPONENTBUILDER_POWER_SYSTEM_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_POWER_SYSTEM_NAME_HINT"
/>
<!-- Namespace Field. Type: Text. (joomla) -->
<field
type="text"
name="namespace"
label="COM_COMPONENTBUILDER_POWER_NAMESPACE_LABEL"
size="250"
maxlength="250"
description="COM_COMPONENTBUILDER_POWER_NAMESPACE_DESCRIPTION"
class="text_area span12"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_POWER_NAMESPACE_MESSAGE"
hint="COM_COMPONENTBUILDER_POWER_NAMESPACE_HINT"
autocomplete="on"
/>
<!-- Type Field. Type: List. (joomla) -->
<field
type="list"
name="type"
label="COM_COMPONENTBUILDER_POWER_TYPE_LABEL"
description="COM_COMPONENTBUILDER_POWER_TYPE_DESCRIPTION"
class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false"
required="true"
default="class">
<!-- Option Set. -->
<option value="class">
COM_COMPONENTBUILDER_POWER_CLASS</option>
<option value="abstract class">
COM_COMPONENTBUILDER_POWER_ABSTRACT_CLASS</option>
<option value="final class">
COM_COMPONENTBUILDER_POWER_FINAL_CLASS</option>
<option value="interface">
COM_COMPONENTBUILDER_POWER_INTERFACE</option>
<option value="trait">
COM_COMPONENTBUILDER_POWER_TRAIT</option>
</field>
<!-- Power_version Field. Type: Text. (joomla) -->
<field
type="text"
name="power_version"
label="COM_COMPONENTBUILDER_POWER_POWER_VERSION_LABEL"
size="40"
maxlength="50"
default="1.0.0"
description="COM_COMPONENTBUILDER_POWER_POWER_VERSION_DESCRIPTION"
class="text_area"
required="true"
filter="CMD"
message="COM_COMPONENTBUILDER_POWER_POWER_VERSION_MESSAGE"
hint="COM_COMPONENTBUILDER_POWER_POWER_VERSION_HINT"
/>
<!-- Load_selection Field. Type: Subform. (joomla) -->
<field
type="subform"
name="load_selection"
label="COM_COMPONENTBUILDER_POWER_LOAD_SELECTION_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_POWER_LOAD_SELECTION_DESCRIPTION"
icon="list"
max="30"
min="0">
<form hidden="true" name="list_load_selection_modal" repeat="true">
<!-- Load Field. Type: Namespaces. (custom) -->
<field
type="namespaces"
name="load"
label="COM_COMPONENTBUILDER_POWER_LOAD_LABEL"
class="list_class span12"
multiple="false"
default="0"
button="false"
/>
</form>
</field>
<!-- Note_linked_to_notice Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_linked_to_notice" label="COM_COMPONENTBUILDER_POWER_NOTE_LINKED_TO_NOTICE_LABEL" description="COM_COMPONENTBUILDER_POWER_NOTE_LINKED_TO_NOTICE_DESCRIPTION" heading="h4" class="note_linked_to_notice" />
<!-- Description Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="description"
label="COM_COMPONENTBUILDER_POWER_DESCRIPTION_LABEL"
rows="11"
cols="10"
description="COM_COMPONENTBUILDER_POWER_DESCRIPTION_DESCRIPTION"
class="text_area span12"
filter="HTML"
hint="COM_COMPONENTBUILDER_POWER_DESCRIPTION_HINT"
/>
<!-- Load_powers_note Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="load_powers_note" label="COM_COMPONENTBUILDER_POWER_LOAD_POWERS_NOTE_LABEL" description="COM_COMPONENTBUILDER_POWER_LOAD_POWERS_NOTE_DESCRIPTION" heading="h4" class="alert alert-info load_powers_note" />
<!-- Composer Field. Type: Subform. (joomla) -->
<field
type="subform"
name="composer"
label="COM_COMPONENTBUILDER_POWER_COMPOSER_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
icon="list"
max="1"
min="0">
<form hidden="true" name="list_composer_modal" repeat="true">
<!-- Access_point Field. Type: Text. (joomla) -->
<field
type="text"
name="access_point"
label="COM_COMPONENTBUILDER_POWER_ACCESS_POINT_LABEL"
size="70"
maxlength="300"
description="COM_COMPONENTBUILDER_POWER_ACCESS_POINT_DESCRIPTION"
class="text_area"
required="true"
filter="PATH"
message="COM_COMPONENTBUILDER_POWER_ACCESS_POINT_MESSAGE"
hint="COM_COMPONENTBUILDER_POWER_ACCESS_POINT_HINT"
/>
<!-- Namespace Field. Type: Subform. (joomla) -->
<field
type="subform"
name="namespace"
label="COM_COMPONENTBUILDER_POWER_NAMESPACE_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove"
icon="list"
max="30"
min="0"
nested_depth="1">
<form hidden="true" name="list_namespace_modal" repeat="true">
<!-- Use Field. Type: Text. (joomla) -->
<field
type="text"
name="use"
label="COM_COMPONENTBUILDER_POWER_USE_LABEL"
size="70"
maxlength="300"
class="text_area"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_POWER_USE_MESSAGE"
hint="COM_COMPONENTBUILDER_POWER_USE_HINT"
autocomplete="on"
/>
</form>
</field>
</form>
</field>
<!-- Licensing_template Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="licensing_template"
label="COM_COMPONENTBUILDER_POWER_LICENSING_TEMPLATE_LABEL"
rows="10"
cols="10"
class="text_area span12"
filter="RAW"
hint="COM_COMPONENTBUILDER_POWER_LICENSING_TEMPLATE_HINT"
validate="code"
showon="add_licensing_template:2"
/>
<!-- Approved Field. Type: Radio. (joomla) -->
<field
type="radio"
name="approved"
label="COM_COMPONENTBUILDER_POWER_APPROVED_LABEL"
description="COM_COMPONENTBUILDER_POWER_APPROVED_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="0">
COM_COMPONENTBUILDER_POWER_NOT_APPROVED</option>
<option value="1">
COM_COMPONENTBUILDER_POWER_APPROVED</option>
</field>
<!-- Extendsinterfaces_custom Field. Type: Text. (joomla) -->
<field
type="text"
name="extendsinterfaces_custom"
label="COM_COMPONENTBUILDER_POWER_EXTENDSINTERFACES_CUSTOM_LABEL"
size="50"
maxlength="150"
description="COM_COMPONENTBUILDER_POWER_EXTENDSINTERFACES_CUSTOM_DESCRIPTION"
class="text_area span12"
filter="STRING"
message="COM_COMPONENTBUILDER_POWER_EXTENDSINTERFACES_CUSTOM_MESSAGE"
autocomplete="on"
showon="extendsinterfaces:-1[AND]type:interface"
/>
<!-- Add_head Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_head"
label="COM_COMPONENTBUILDER_POWER_ADD_HEAD_LABEL"
description="COM_COMPONENTBUILDER_POWER_ADD_HEAD_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_POWER_YES</option>
<option value="0">
COM_COMPONENTBUILDER_POWER_NO</option>
</field>
<!-- Extends Field. Type: Classpowers. (custom) -->
<field
type="classpowers"
name="extends"
label="COM_COMPONENTBUILDER_POWER_EXTENDS_LABEL"
description="COM_COMPONENTBUILDER_POWER_EXTENDS_DESCRIPTION"
class="list_class span12"
layout="joomla.form.field.list-fancy-select"
multiple="false"
default="0"
showon="type:class[OR]type:abstract class[OR]type:final class"
button="true"
/>
<!-- Extends_custom Field. Type: Text. (joomla) -->
<field
type="text"
name="extends_custom"
label="COM_COMPONENTBUILDER_POWER_EXTENDS_CUSTOM_LABEL"
size="10"
maxlength="50"
description="COM_COMPONENTBUILDER_POWER_EXTENDS_CUSTOM_DESCRIPTION"
class="text_area span12"
filter="STRING"
message="COM_COMPONENTBUILDER_POWER_EXTENDS_CUSTOM_MESSAGE"
autocomplete="on"
showon="extends:-1[AND]type!:trait[AND]type!:interface"
/>
<!-- Implements_custom Field. Type: Text. (joomla) -->
<field
type="text"
name="implements_custom"
label="COM_COMPONENTBUILDER_POWER_IMPLEMENTS_CUSTOM_LABEL"
size="50"
maxlength="150"
description="COM_COMPONENTBUILDER_POWER_IMPLEMENTS_CUSTOM_DESCRIPTION"
class="text_area span12"
filter="STRING"
message="COM_COMPONENTBUILDER_POWER_IMPLEMENTS_CUSTOM_MESSAGE"
autocomplete="on"
showon="implements:-1"
/>
<!-- Implements Field. Type: Interfacepowers. (custom) -->
<field
type="interfacepowers"
name="implements"
label="COM_COMPONENTBUILDER_POWER_IMPLEMENTS_LABEL"
description="COM_COMPONENTBUILDER_POWER_IMPLEMENTS_DESCRIPTION"
class="list_class span12"
layout="joomla.form.field.list-fancy-select"
multiple="true"
default="0"
showon="type!:interface[AND]type!:trait"
button="true"
/>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="一_一"
/>
<!-- Note_approved_paths Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_approved_paths" label="COM_COMPONENTBUILDER_POWER_NOTE_APPROVED_PATHS_LABEL" description="COM_COMPONENTBUILDER_POWER_NOTE_APPROVED_PATHS_DESCRIPTION" heading="h4" class="alert alert-info note_approved_paths" showon="approved:1" />
<!-- Property_selection Field. Type: Subform. (joomla) -->
<field
type="subform"
name="property_selection"
label="COM_COMPONENTBUILDER_POWER_PROPERTY_SELECTION_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_POWER_PROPERTY_SELECTION_DESCRIPTION"
icon="list"
max="150"
min="0">
<form hidden="true" name="list_property_selection_modal" repeat="true">
<!-- Property Field. Type: Powersclassproperties. (custom) -->
<field
type="powersclassproperties"
name="property"
label="COM_COMPONENTBUILDER_POWER_PROPERTY_LABEL"
class="list_class span12 property_selection_list"
multiple="false"
default="0"
onchange="getClassCode(this, 'property');"
button="false"
/>
</form>
</field>
<!-- Extendsinterfaces Field. Type: Interfacepowers. (custom) -->
<field
type="interfacepowers"
name="extendsinterfaces"
label="COM_COMPONENTBUILDER_POWER_EXTENDSINTERFACES_LABEL"
description="COM_COMPONENTBUILDER_POWER_EXTENDSINTERFACES_DESCRIPTION"
class="list_class span12"
layout="joomla.form.field.list-fancy-select"
multiple="true"
default="0"
showon="type:interface"
button="true"
/>
<!-- Method_selection Field. Type: Subform. (joomla) -->
<field
type="subform"
name="method_selection"
label="COM_COMPONENTBUILDER_POWER_METHOD_SELECTION_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_POWER_METHOD_SELECTION_DESCRIPTION"
icon="list"
max="150"
min="0">
<form hidden="true" name="list_method_selection_modal" repeat="true">
<!-- Method Field. Type: Powersclassmethods. (custom) -->
<field
type="powersclassmethods"
name="method"
label="COM_COMPONENTBUILDER_POWER_METHOD_LABEL"
class="list_class span12 method_selection_list"
multiple="false"
default="0"
onchange="getClassCode(this, 'method');"
button="false"
/>
</form>
</field>
<!-- Namespace_details Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="namespace_details" label="COM_COMPONENTBUILDER_POWER_NAMESPACE_DETAILS_LABEL" description="COM_COMPONENTBUILDER_POWER_NAMESPACE_DETAILS_DESCRIPTION" heading="h4" class="alert alert-success namespace_details" />
<!-- Approved_paths Field. Type: Superpowerpaths. (custom) -->
<field
type="superpowerpaths"
name="approved_paths"
label="COM_COMPONENTBUILDER_POWER_APPROVED_PATHS_LABEL"
description="COM_COMPONENTBUILDER_POWER_APPROVED_PATHS_DESCRIPTION"
required="false"
showon="approved:1">
<!-- Option Set. -->
<option value="joomla/super-powers">
COM_COMPONENTBUILDER_POWER_JOOMLASUPERPOWERS</option>
</field>
<!-- Head Field. Type: Editor. (joomla) -->
<field
type="editor"
name="head"
label="COM_COMPONENTBUILDER_POWER_HEAD_LABEL"
description="COM_COMPONENTBUILDER_POWER_HEAD_DESCRIPTION"
width="100%"
height="100px"
cols="15"
rows="10"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
required="false"
validate="code"
/>
<!-- Autoload_composer_note Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="autoload_composer_note" label="COM_COMPONENTBUILDER_POWER_AUTOLOAD_COMPOSER_NOTE_LABEL" description="COM_COMPONENTBUILDER_POWER_AUTOLOAD_COMPOSER_NOTE_DESCRIPTION" heading="h4" class="alert alert-info autoload_composer_note" />
<!-- Use_selection Field. Type: Subform. (joomla) -->
<field
type="subform"
name="use_selection"
label="COM_COMPONENTBUILDER_POWER_USE_SELECTION_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
description="COM_COMPONENTBUILDER_POWER_USE_SELECTION_DESCRIPTION"
icon="list"
max="100"
min="0">
<form hidden="true" name="list_use_selection_modal" repeat="true">
<!-- Use Field. Type: Namespaces. (custom) -->
<field
type="namespaces"
name="use"
label="COM_COMPONENTBUILDER_POWER_USE_LABEL"
class="span12"
layout="joomla.form.field.list-fancy-select"
multiple="false"
default="0"
button="false"
/>
<!-- As Field. Type: Text. (joomla) -->
<field
type="text"
name="as"
label="COM_COMPONENTBUILDER_POWER_AS_LABEL"
size="10"
maxlength="50"
default="default"
class="text_area"
filter="STRING"
autocomplete="on"
/>
</form>
</field>
<!-- Add_licensing_template Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_licensing_template"
label="COM_COMPONENTBUILDER_POWER_ADD_LICENSING_TEMPLATE_LABEL"
description="COM_COMPONENTBUILDER_POWER_ADD_LICENSING_TEMPLATE_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_POWER_USE_GLOBAL</option>
<option value="2">
COM_COMPONENTBUILDER_POWER_OVERRIDE</option>
</field>
<!-- Main_class_code Field. Type: Editor. (joomla) -->
<field
type="editor"
name="main_class_code"
label="COM_COMPONENTBUILDER_POWER_MAIN_CLASS_CODE_LABEL"
description="COM_COMPONENTBUILDER_POWER_MAIN_CLASS_CODE_DESCRIPTION"
width="100%"
height="800px"
cols="40"
rows="300"
buttons="no"
syntax="php"
editor="codemirror|none"
filter="raw"
validate="code"
/>
<!-- Guid Field. Type: Text. (joomla) -->
<field
type="text"
name="guid"
label="COM_COMPONENTBUILDER_POWER_GUID_LABEL"
size="40"
maxlength="40"
description="COM_COMPONENTBUILDER_POWER_GUID_DESCRIPTION"
class="text_area"
readonly="true"
filter="CMD"
validate="guid"
hint="COM_COMPONENTBUILDER_POWER_GUID_HINT"
/>
<!-- Name Field. Type: Text. (joomla) -->
<field
type="text"
name="name"
label="COM_COMPONENTBUILDER_POWER_NAME_LABEL"
size="40"
maxlength="150"
description="COM_COMPONENTBUILDER_POWER_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_POWER_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_POWER_NAME_HINT"
/>
</fieldset>
<!-- Access Control Fields. -->
<fieldset name="accesscontrol">
<!-- Asset Id Field. Type: Hidden (joomla) -->
<field
name="asset_id"
type="hidden"
filter="unset"
/>
<!-- Rules Field. Type: Rules (joomla) -->
<field
name="rules"
type="rules"
label="Permissions in relation to this power"
translate_label="false"
filter="rules"
validate="rules"
class="inputbox"
component="com_componentbuilder"
section="power"
/>
</fieldset>
</form>