<?xml version="1.0" encoding="utf-8"?>
<form
	addrulepath="/administrator/components/com_componentbuilder/models/rules"
	addfieldpath="/administrator/components/com_componentbuilder/models/fields"
>
	<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_LIBRARY_CREATED_DATE_LABEL"
			description="COM_COMPONENTBUILDER_LIBRARY_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_LIBRARY_CREATED_BY_LABEL"
			description="COM_COMPONENTBUILDER_LIBRARY_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_LIBRARY_MODIFIED_DATE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_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_LIBRARY_MODIFIED_BY_LABEL"
			description="COM_COMPONENTBUILDER_LIBRARY_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_LIBRARY_ORDERING_LABEL"
			description=""
			default="0"
			size="6"
			required="false"
		/>
		<!-- Version Field. Type: Text (joomla) -->
		<field
			name="version"
			type="text"
			class="readonly"
			label="COM_COMPONENTBUILDER_LIBRARY_VERSION_LABEL"
			description="COM_COMPONENTBUILDER_LIBRARY_VERSION_DESC"
			size="6"
			readonly="true"
			filter="unset"
		/>
		<!-- Dynamic Fields. -->
		<!-- Name Field. Type: Text. (joomla) -->
		<field
			type="text"
			name="name"
			label="COM_COMPONENTBUILDER_LIBRARY_NAME_LABEL"
			size="40"
			maxlength="150"
			description="COM_COMPONENTBUILDER_LIBRARY_NAME_DESCRIPTION"
			class="text_area"
			readonly="false"
			disabled="false"
			required="true"
			filter="STRING"
			message="COM_COMPONENTBUILDER_LIBRARY_NAME_MESSAGE"
			hint="COM_COMPONENTBUILDER_LIBRARY_NAME_HINT"
		/>
		<!-- Target Field. Type: Radio. (joomla) -->
		<field
			type="radio"
			name="target"
			label="COM_COMPONENTBUILDER_LIBRARY_TARGET_LABEL"
			description="COM_COMPONENTBUILDER_LIBRARY_TARGET_DESCRIPTION"
			class="btn-group btn-group-yesno"
			default="1"
			required="true">
			<!-- Option Set. -->
			<option value="1">
				COM_COMPONENTBUILDER_LIBRARY_MEDIA</option>
			<option value="2">
				COM_COMPONENTBUILDER_LIBRARY_LIBRARIES</option>
		</field>
		<!-- How Field. Type: Filebehaviour. (custom) -->
		<field
			type="filebehaviour"
			name="how"
			label="COM_COMPONENTBUILDER_LIBRARY_HOW_LABEL"
			description="COM_COMPONENTBUILDER_LIBRARY_HOW_DESCRIPTION"
			class="list_class"
			multiple="false"
			default="1"
			required="true"
			button="false"
		/>
		<!-- Type Field. Type: Radio. (joomla) -->
		<field
			type="radio"
			name="type"
			label="COM_COMPONENTBUILDER_LIBRARY_TYPE_LABEL"
			description="COM_COMPONENTBUILDER_LIBRARY_TYPE_DESCRIPTION"
			class="btn-group btn-group-yesno"
			default="1"
			required="true">
			<!-- Option Set. -->
			<option value="1">
				COM_COMPONENTBUILDER_LIBRARY_MAIN</option>
			<option value="2">
				COM_COMPONENTBUILDER_LIBRARY_BUNDLE</option>
		</field>
		<!-- Description Field. Type: Text. (joomla) -->
		<field
			type="text"
			name="description"
			label="COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_LABEL"
			size="80"
			maxlength="150"
			description="COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_DESCRIPTION"
			class="text_area"
			readonly="false"
			disabled="false"
			required="false"
			filter="STRING"
			message="COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_MESSAGE"
			hint="COM_COMPONENTBUILDER_LIBRARY_DESCRIPTION_HINT"
		/>
		<!-- Note_yes_behaviour_two Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_yes_behaviour_two" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_TWO_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_TWO_DESCRIPTION" heading="h4" class="alert alert-success note_yes_behaviour_two" />
		<!-- Note_no_behaviour_two Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_no_behaviour_two" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_TWO_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_TWO_DESCRIPTION" heading="h4" class="alert alert-error note_no_behaviour_two" />
		<!-- Note_display_library_files_folders_urls Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_display_library_files_folders_urls" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_DISPLAY_LIBRARY_FILES_FOLDERS_URLS_DESCRIPTION" class="note_display_library_files_folders_urls" />
		<!-- Note_build_in_behaviour_three Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_build_in_behaviour_three" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_BUILD_IN_BEHAVIOUR_THREE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_BUILD_IN_BEHAVIOUR_THREE_DESCRIPTION" heading="h4" class="alert alert-success note_build_in_behaviour_three" />
		<!-- Note_no_behaviour_three Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_no_behaviour_three" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_THREE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_THREE_DESCRIPTION" heading="h4" class="alert alert-error note_no_behaviour_three" />
		<!-- Not_required Field. Type: Hidden. (joomla) -->
		<field
			type="hidden"
			name="not_required"
			default="一_一"
		/>
		<!-- Note_yes_behaviour_one Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_yes_behaviour_one" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_ONE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_ONE_DESCRIPTION" heading="h4" class="alert alert-success note_yes_behaviour_one" />
		<!-- Libraries Field. Type: Librariesx. (custom) -->
		<field
			type="librariesx"
			name="libraries"
			label="COM_COMPONENTBUILDER_LIBRARY_LIBRARIES_LABEL"
			description="COM_COMPONENTBUILDER_LIBRARY_LIBRARIES_DESCRIPTION"
			class="list_class"
			multiple="true"
			default="0"
			required="false"
			button="true"
		/>
		<!-- Note_linked_to_notice Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_linked_to_notice" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_LINKED_TO_NOTICE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_LINKED_TO_NOTICE_DESCRIPTION" heading="h4" class="note_linked_to_notice" />
		<!-- Php_setdocument Field. Type: Textarea. (joomla) -->
		<field
			type="textarea"
			name="php_setdocument"
			label="COM_COMPONENTBUILDER_LIBRARY_PHP_SETDOCUMENT_LABEL"
			rows="30"
			cols="15"
			description="COM_COMPONENTBUILDER_LIBRARY_PHP_SETDOCUMENT_DESCRIPTION"
			class="text_area span12"
			filter="raw"
			hint="COM_COMPONENTBUILDER_LIBRARY_PHP_SETDOCUMENT_HINT"
			required="true"
		/>
		<!-- Addconditions Field. Type: Subform. (joomla) -->
		<field
			type="subform"
			name="addconditions"
			label="COM_COMPONENTBUILDER_LIBRARY_ADDCONDITIONS_LABEL"
			layout="joomla.form.field.subform.repeatable"
			multiple="true"
			description="COM_COMPONENTBUILDER_LIBRARY_ADDCONDITIONS_DESCRIPTION"
			default=""
			icon="list">
			<form hidden="true" name="list_addconditions_modal" repeat="true">
				<!-- File Field. Type: Libraryfiles. (custom) -->
				<field
					type="libraryfiles"
					name="file"
					label="COM_COMPONENTBUILDER_LIBRARY_FILE_LABEL"
					description="COM_COMPONENTBUILDER_LIBRARY_FILE_DESCRIPTION"
					class="list_class fieldLarge"
					multiple="true"
					default="0"
					required="true"
					button="false"
				/>
				<!-- Target_behavior Field. Type: List. (joomla) -->
				<field
					type="list"
					name="target_behavior"
					label="COM_COMPONENTBUILDER_LIBRARY_TARGET_BEHAVIOR_LABEL"
					description="COM_COMPONENTBUILDER_LIBRARY_TARGET_BEHAVIOR_DESCRIPTION"
					class="list_class fieldLarge"
					multiple="false"
					filter="INT"
					required="true"
					default="1">
					<!-- Option Set. -->
					<option value="1">
						COM_COMPONENTBUILDER_LIBRARY_INCLUDE</option>
					<option value="2">
						COM_COMPONENTBUILDER_LIBRARY_EXCLUDE</option>
				</field>
				<!-- Target_relation Field. Type: List. (joomla) -->
				<field
					type="list"
					name="target_relation"
					label="COM_COMPONENTBUILDER_LIBRARY_TARGET_RELATION_LABEL"
					description="COM_COMPONENTBUILDER_LIBRARY_TARGET_RELATION_DESCRIPTION"
					class="list_class fieldLarge"
					multiple="false"
					filter="INT"
					required="true"
					default="0">
					<!-- Option Set. -->
					<option value="0">
						COM_COMPONENTBUILDER_LIBRARY_ISOLATE</option>
					<option value="1">
						COM_COMPONENTBUILDER_LIBRARY_CHAIN</option>
				</field>
				<!-- Option_field Field. Type: Libconfigfield. (custom) -->
				<field
					type="libconfigfield"
					name="option_field"
					label="COM_COMPONENTBUILDER_LIBRARY_OPTION_FIELD_LABEL"
					description="COM_COMPONENTBUILDER_LIBRARY_OPTION_FIELD_DESCRIPTION"
					class="list_class fieldLarge"
					multiple="false"
					required="true"
					button="false"
				/>
				<!-- Option_behaviour Field. Type: List. (joomla) -->
				<field
					type="list"
					name="option_behaviour"
					label="COM_COMPONENTBUILDER_LIBRARY_OPTION_BEHAVIOUR_LABEL"
					description="COM_COMPONENTBUILDER_LIBRARY_OPTION_BEHAVIOUR_DESCRIPTION"
					class="list_class fieldLarge"
					multiple="false"
					filter="INT"
					required="true"
					default="1">
					<!-- Option Set. -->
					<option value="1">
						COM_COMPONENTBUILDER_LIBRARY_IS_ONLY_FOUR_LISTRADIOCHECKBOXES</option>
					<option value="2">
						COM_COMPONENTBUILDER_LIBRARY_IS_NOT_ONLY_FOUR_LISTRADIOCHECKBOXES</option>
					<option value="3">
						COM_COMPONENTBUILDER_LIBRARY_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_LIST</option>
					<option value="4">
						COM_COMPONENTBUILDER_LIBRARY_ACTIVE_ONLY_FOUR_TEXT_FIELD</option>
					<option value="5">
						COM_COMPONENTBUILDER_LIBRARY_UNACTIVE_ONLY_FOUR_TEXT_FIELD</option>
					<option value="6">
						COM_COMPONENTBUILDER_LIBRARY_KEY_WORD_ALL_CASESENSITIVE_ONLY_FOUR_TEXT_FIELD</option>
					<option value="7">
						COM_COMPONENTBUILDER_LIBRARY_KEY_WORD_ANY_CASESENSITIVE_ONLY_FOUR_TEXT_FIELD</option>
					<option value="8">
						COM_COMPONENTBUILDER_LIBRARY_KEY_WORD_ALL_CASEINSENSITIVE_ONLY_FOUR_TEXT_FIELD</option>
					<option value="9">
						COM_COMPONENTBUILDER_LIBRARY_KEY_WORD_ANY_CASEINSENSITIVE_ONLY_FOUR_TEXT_FIELD</option>
					<option value="10">
						COM_COMPONENTBUILDER_LIBRARY_MIN_LENGTH_ONLY_FOUR_TEXT_FIELD</option>
					<option value="11">
						COM_COMPONENTBUILDER_LIBRARY_MAX_LENGTH_ONLY_FOUR_TEXT_FIELD</option>
					<option value="12">
						COM_COMPONENTBUILDER_LIBRARY_EXACT_LENGTH_ONLY_FOUR_TEXT_FIELD</option>
				</field>
				<!-- Field_options Field. Type: Textarea. (joomla) -->
				<field
					type="textarea"
					name="field_options"
					label="COM_COMPONENTBUILDER_LIBRARY_FIELD_OPTIONS_LABEL"
					rows="10"
					cols="5"
					class="text_area"
					filter="STRING"
					hint="COM_COMPONENTBUILDER_LIBRARY_FIELD_OPTIONS_HINT"
					required="true"
				/>
			</form>
		</field>
		<!-- Note_yes_behaviour_library Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_yes_behaviour_library" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_LIBRARY_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_YES_BEHAVIOUR_LIBRARY_DESCRIPTION" heading="h4" class="alert alert-success note_yes_behaviour_library" />
		<!-- Note_build_in_behaviour_one Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_build_in_behaviour_one" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_BUILD_IN_BEHAVIOUR_ONE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_BUILD_IN_BEHAVIOUR_ONE_DESCRIPTION" heading="h4" class="alert alert-success note_build_in_behaviour_one" />
		<!-- Note_build_in_behaviour_two Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_build_in_behaviour_two" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_BUILD_IN_BEHAVIOUR_TWO_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_BUILD_IN_BEHAVIOUR_TWO_DESCRIPTION" heading="h4" class="alert alert-success note_build_in_behaviour_two" />
		<!-- Note_display_library_config Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_display_library_config" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_DISPLAY_LIBRARY_CONFIG_DESCRIPTION" class="note_display_library_config" />
		<!-- Note_no_behaviour_one Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_no_behaviour_one" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_ONE_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_NO_BEHAVIOUR_ONE_DESCRIPTION" heading="h4" class="alert alert-error note_no_behaviour_one" />
		<!-- Guid Field. Type: Text. (joomla) -->
		<field
			type="text"
			name="guid"
			label="COM_COMPONENTBUILDER_LIBRARY_GUID_LABEL"
			size="40"
			maxlength="40"
			description="COM_COMPONENTBUILDER_LIBRARY_GUID_DESCRIPTION"
			class="text_area"
			readonly="true"
			filter="CMD"
			validate="guid"
			hint="COM_COMPONENTBUILDER_LIBRARY_GUID_HINT"
		/>
		<!-- Note_library_instruction Field. Type: Note. A None Database Field. (joomla) -->
		<field type="note" name="note_library_instruction" label="COM_COMPONENTBUILDER_LIBRARY_NOTE_LIBRARY_INSTRUCTION_LABEL" description="COM_COMPONENTBUILDER_LIBRARY_NOTE_LIBRARY_INSTRUCTION_DESCRIPTION" heading="h4" class="alert alert-info note_library_instruction" />
	</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 library"
			translate_label="false"
			filter="rules"
			validate="rules"
			class="inputbox"
			component="com_componentbuilder"
			section="library"
		/>
	</fieldset>
</form>