Fixed line break error in JavaScript building area, also added little notice in field area to select field type.

This commit is contained in:
Llewellyn van der Merwe 2018-04-11 22:48:37 +02:00
parent e6b2b48ac7
commit 802554e7a9
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
16 changed files with 166 additions and 161 deletions

View File

@ -130,8 +130,8 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.7.2 + *Version*: 2.7.2
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **189475** + *Line count*: **189480**
+ *Field count*: **1011** + *Field count*: **1012**
+ *File count*: **1199** + *File count*: **1199**
+ *Folder count*: **193** + *Folder count*: **193**

View File

@ -130,8 +130,8 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.7.2 + *Version*: 2.7.2
+ *Copyright*: Copyright (C) 2015. All Rights Reserved + *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html + *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **189475** + *Line count*: **189480**
+ *Field count*: **1011** + *Field count*: **1012**
+ *File count*: **1199** + *File count*: **1199**
+ *Folder count*: **193** + *Folder count*: **193**

View File

@ -9556,7 +9556,7 @@ class Interpretation extends Fields
{ {
if (ComponentbuilderHelper::typeField($type, 'list') || ComponentbuilderHelper::typeField($type, 'dynamic') || !ComponentbuilderHelper::typeField($type)) if (ComponentbuilderHelper::typeField($type, 'list') || ComponentbuilderHelper::typeField($type, 'dynamic') || !ComponentbuilderHelper::typeField($type))
{ {
$optionsArray = explode(PHP_EOL, $options); $optionsArray = array_map('trim', (array) explode(PHP_EOL, $options));
if (!ComponentbuilderHelper::checkArray($optionsArray)) if (!ComponentbuilderHelper::checkArray($optionsArray))
{ {
$optionsArray[] = $optionsArray; $optionsArray[] = $optionsArray;
@ -9565,7 +9565,7 @@ class Interpretation extends Fields
{ {
if (strpos($option, '|') !== false) if (strpos($option, '|') !== false)
{ {
list($option) = explode('|', $option); list($option) = array_map('trim', (array) explode('|', $option));
} }
if ($option != 'dynamic_list') if ($option != 'dynamic_list')
{ {
@ -9582,7 +9582,7 @@ class Interpretation extends Fields
{ {
if (strpos($keywords, ',') !== false) if (strpos($keywords, ',') !== false)
{ {
$keywords = explode(',', $keywords); $keywords = array_map('trim', (array) explode(',', $keywords));
foreach ($keywords as $keyword) foreach ($keywords as $keyword)
{ {
$buket['keywords'][] = trim($keyword); $buket['keywords'][] = trim($keyword);

View File

@ -3915,6 +3915,8 @@ COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION="<div class='form
<div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div> <div id='display_linked_to'>Searching the database.<span class='loading-dots'></span></div>
</div> </div>
</div>" </div>"
COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_DESCRIPTION="Please select a field type that you would like to build."
COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_LABEL="Building a field"
COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION="<p>When using the WHMCS encryption you need to get a WHMCS key from:<br /><a href='https://www.vdm.io/support' target='_blank'>https://www.vdm.io</a>, or your own WHMCS install.</p><p>Please note that you will need to <b>enable the add-on</b> in the Joomla Component area (Add WHMCS)->Yes.</p><p>You can get more info about the WHMCS licensing add-on at the following links.</p><p><b>Helpful Links:</b><br /> COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION="<p>When using the WHMCS encryption you need to get a WHMCS key from:<br /><a href='https://www.vdm.io/support' target='_blank'>https://www.vdm.io</a>, or your own WHMCS install.</p><p>Please note that you will need to <b>enable the add-on</b> in the Joomla Component area (Add WHMCS)->Yes.</p><p>You can get more info about the WHMCS licensing add-on at the following links.</p><p><b>Helpful Links:</b><br />
<a href='https://www.whmcs.com/addons/licensing-addon/' target='_blank'>https://www.whmcs.com/addons/licensing-addon/</a><br /> <a href='https://www.whmcs.com/addons/licensing-addon/' target='_blank'>https://www.whmcs.com/addons/licensing-addon/</a><br />
<a href='http://docs.whmcs.com/Licensing_Addon/' target='_blank'>http://docs.whmcs.com/Licensing_Addon/</a></p>" <a href='http://docs.whmcs.com/Licensing_Addon/' target='_blank'>http://docs.whmcs.com/Licensing_Addon/</a></p>"

View File

@ -30,7 +30,7 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); $form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array( $fields = $displayData->get('fields') ?: array(
'xml', 'note_select_field_type',
'note_filter_information' 'note_filter_information'
); );

View File

@ -30,7 +30,8 @@ defined('_JEXEC') or die('Restricted access');
$form = $displayData->getForm(); $form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array( $fields = $displayData->get('fields') ?: array(
'helpnote' 'helpnote',
'xml'
); );
?> ?>

View File

@ -61,10 +61,10 @@ $can = ComponentbuilderHelper::getActions('field');
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL'); ?> <?php echo JText::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL'); ?>
</th> </th>
<th data-breakpoints="xs sm md" data-type="html" data-sort-use="text"> <th data-breakpoints="xs sm md" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'); ?> <?php echo JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'); ?>
</th> </th>
<th data-breakpoints="all" data-type="html" data-sort-use="text"> <th data-breakpoints="all" data-type="html" data-sort-use="text">
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'); ?> <?php echo JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'); ?>
</th> </th>
<th width="10" data-breakpoints="xs sm md"> <th width="10" data-breakpoints="xs sm md">
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_STATUS'); ?> <?php echo JText::_('COM_COMPONENTBUILDER_FIELD_STATUS'); ?>
@ -104,6 +104,9 @@ $can = ComponentbuilderHelper::getActions('field');
<td> <td>
<?php echo JText::_($item->null_switch); ?> <?php echo JText::_($item->null_switch); ?>
</td> </td>
<td>
<?php echo JText::_($item->store); ?>
</td>
<td class="nowrap"> <td class="nowrap">
<?php if ($user->authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?> <?php if ($user->authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fields"><?php echo $displayData->escape($item->category_title); ?></a> <a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fields"><?php echo $displayData->escape($item->category_title); ?></a>
@ -111,9 +114,6 @@ $can = ComponentbuilderHelper::getActions('field');
<?php echo $displayData->escape($item->category_title); ?> <?php echo $displayData->escape($item->category_title); ?>
<?php endif; ?> <?php endif; ?>
</td> </td>
<td>
<?php echo JText::_($item->store); ?>
</td>
<?php if ($item->published == 1):?> <?php if ($item->published == 1):?>
<td class="center" data-sort-value="1"> <td class="center" data-sort-value="1">
<span class="status-metro status-published" title="<?php echo JText::_('COM_COMPONENTBUILDER_PUBLISHED'); ?>"> <span class="status-metro status-published" title="<?php echo JText::_('COM_COMPONENTBUILDER_PUBLISHED'); ?>">

View File

@ -112,10 +112,10 @@ class ComponentbuilderModelField extends JModelAdmin
$item->css_views = base64_decode($item->css_views); $item->css_views = base64_decode($item->css_views);
} }
if (!empty($item->javascript_views_footer)) if (!empty($item->css_view))
{ {
// base64 Decode javascript_views_footer. // base64 Decode css_view.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer); $item->css_view = base64_decode($item->css_view);
} }
if (!empty($item->javascript_view_footer)) if (!empty($item->javascript_view_footer))
@ -124,10 +124,10 @@ class ComponentbuilderModelField extends JModelAdmin
$item->javascript_view_footer = base64_decode($item->javascript_view_footer); $item->javascript_view_footer = base64_decode($item->javascript_view_footer);
} }
if (!empty($item->css_view)) if (!empty($item->javascript_views_footer))
{ {
// base64 Decode css_view. // base64 Decode javascript_views_footer.
$item->css_view = base64_decode($item->css_view); $item->javascript_views_footer = base64_decode($item->javascript_views_footer);
} }
@ -937,10 +937,10 @@ class ComponentbuilderModelField extends JModelAdmin
$data['css_views'] = base64_encode($data['css_views']); $data['css_views'] = base64_encode($data['css_views']);
} }
// Set the javascript_views_footer string to base64 string. // Set the css_view string to base64 string.
if (isset($data['javascript_views_footer'])) if (isset($data['css_view']))
{ {
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']); $data['css_view'] = base64_encode($data['css_view']);
} }
// Set the javascript_view_footer string to base64 string. // Set the javascript_view_footer string to base64 string.
@ -949,10 +949,10 @@ class ComponentbuilderModelField extends JModelAdmin
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']); $data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
} }
// Set the css_view string to base64 string. // Set the javascript_views_footer string to base64 string.
if (isset($data['css_view'])) if (isset($data['javascript_views_footer']))
{ {
$data['css_view'] = base64_encode($data['css_view']); $data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
} }
// Set the Params Items to data // Set the Params Items to data

View File

@ -49,10 +49,10 @@ class ComponentbuilderModelFields extends JModelList
'a.datatype','datatype', 'a.datatype','datatype',
'a.indexes','indexes', 'a.indexes','indexes',
'a.null_switch','null_switch', 'a.null_switch','null_switch',
'a.store','store',
'c.title','category_title', 'c.title','category_title',
'c.id', 'category_id', 'c.id', 'category_id',
'a.catid', 'catid', 'a.catid', 'catid'
'a.store','store'
); );
} }
@ -88,6 +88,9 @@ class ComponentbuilderModelFields extends JModelList
$null_switch = $this->getUserStateFromRequest($this->context . '.filter.null_switch', 'filter_null_switch'); $null_switch = $this->getUserStateFromRequest($this->context . '.filter.null_switch', 'filter_null_switch');
$this->setState('filter.null_switch', $null_switch); $this->setState('filter.null_switch', $null_switch);
$store = $this->getUserStateFromRequest($this->context . '.filter.store', 'filter_store');
$this->setState('filter.store', $store);
$category = $app->getUserStateFromRequest($this->context . '.filter.category', 'filter_category'); $category = $app->getUserStateFromRequest($this->context . '.filter.category', 'filter_category');
$this->setState('filter.category', $category); $this->setState('filter.category', $category);
@ -97,9 +100,6 @@ class ComponentbuilderModelFields extends JModelList
$catid = $app->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid'); $catid = $app->getUserStateFromRequest($this->context . '.filter.catid', 'filter_catid');
$this->setState('filter.catid', $catid); $this->setState('filter.catid', $catid);
$store = $this->getUserStateFromRequest($this->context . '.filter.store', 'filter_store');
$this->setState('filter.store', $store);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int'); $sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting); $this->setState('filter.sorting', $sorting);
@ -313,7 +313,7 @@ class ComponentbuilderModelFields extends JModelList
else else
{ {
$search = $db->quote('%' . $db->escape($search) . '%'); $search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR g.name LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.store LIKE '.$search.' OR a.xml LIKE '.$search.')'); $query->where('(a.name LIKE '.$search.' OR a.fieldtype LIKE '.$search.' OR g.name LIKE '.$search.' OR a.datatype LIKE '.$search.' OR a.indexes LIKE '.$search.' OR a.null_switch LIKE '.$search.' OR a.store LIKE '.$search.' OR a.catid LIKE '.$search.' OR a.xml LIKE '.$search.')');
} }
} }
@ -433,12 +433,12 @@ class ComponentbuilderModelFields extends JModelList
// decode css_views // decode css_views
$item->css_views = base64_decode($item->css_views); $item->css_views = base64_decode($item->css_views);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode css_view // decode css_view
$item->css_view = base64_decode($item->css_view); $item->css_view = base64_decode($item->css_view);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// unset the values we don't want exported. // unset the values we don't want exported.
unset($item->asset_id); unset($item->asset_id);
unset($item->checked_out); unset($item->checked_out);
@ -504,10 +504,10 @@ class ComponentbuilderModelFields extends JModelList
$id .= ':' . $this->getState('filter.datatype'); $id .= ':' . $this->getState('filter.datatype');
$id .= ':' . $this->getState('filter.indexes'); $id .= ':' . $this->getState('filter.indexes');
$id .= ':' . $this->getState('filter.null_switch'); $id .= ':' . $this->getState('filter.null_switch');
$id .= ':' . $this->getState('filter.store');
$id .= ':' . $this->getState('filter.category'); $id .= ':' . $this->getState('filter.category');
$id .= ':' . $this->getState('filter.category_id'); $id .= ':' . $this->getState('filter.category_id');
$id .= ':' . $this->getState('filter.catid'); $id .= ':' . $this->getState('filter.catid');
$id .= ':' . $this->getState('filter.store');
return parent::getStoreId($id); return parent::getStoreId($id);
} }

View File

@ -596,8 +596,8 @@ function getFieldOptions(fieldtype){
propertiesArray = result.nameListOptions; propertiesArray = result.nameListOptions;
// remove previous forms of exist // remove previous forms of exist
jQuery('.prop_removal').remove(); jQuery('.prop_removal').remove();
// remove the hidden jform_properties // hide notice
jQuery('#jform_xml').closest('.control-group').remove(); jQuery('.note_select_field_type').closest('.control-group').remove();
// append to the closed to xml (hidden field) // append to the closed to xml (hidden field)
jQuery('.note_filter_information').closest('.control-group').prepend(result.subform); jQuery('.note_filter_information').closest('.control-group').prepend(result.subform);
// add the watcher // add the watcher

View File

@ -214,34 +214,90 @@
/> />
<!-- Note_filter_information Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_filter_information Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_filter_information" description="COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION" class="note_filter_information" /> <field type="note" name="note_filter_information" description="COM_COMPONENTBUILDER_FIELD_NOTE_FILTER_INFORMATION_DESCRIPTION" class="note_filter_information" />
<!-- Javascript_views_footer Field. Type: Textarea. (joomla) --> <!-- Helpnote Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="helpnote" label="COM_COMPONENTBUILDER_FIELD_HELPNOTE_LABEL" class="helpNote helpnote" />
<!-- Add_javascript_views_footer Field. Type: Radio. (joomla) -->
<field <field
type="textarea" type="radio"
name="javascript_views_footer" name="add_javascript_views_footer"
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_LABEL" label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
rows="30" class="btn-group btn-group-yesno"
cols="15" default="0"
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_DESCRIPTION" required="true">
class="text_area span12" <!-- Option Set. -->
filter="raw" <option value="1">
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_HINT" COM_COMPONENTBUILDER_FIELD_YES</option>
required="true" <option value="0">
/> COM_COMPONENTBUILDER_FIELD_NO</option>
<!-- Javascript_view_footer Field. Type: Textarea. (joomla) --> </field>
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) -->
<field <field
type="textarea" type="radio"
name="javascript_view_footer" name="add_javascript_view_footer"
label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL" label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL"
rows="30" class="btn-group btn-group-yesno"
cols="15" default="0"
description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION" required="true">
class="text_area span12" <!-- Option Set. -->
filter="raw" <option value="1">
hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_HINT" COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Store Field. Type: List. (joomla) -->
<field
type="list"
name="store"
label="COM_COMPONENTBUILDER_FIELD_STORE_LABEL"
description="COM_COMPONENTBUILDER_FIELD_STORE_DESCRIPTION"
class="list_class"
multiple="false"
filter="INT"
required="true" required="true"
default="0">
<!-- Option Set. -->
<option value="0">
COM_COMPONENTBUILDER_FIELD_DEFAULT</option>
<option value="1">
COM_COMPONENTBUILDER_FIELD_JSON</option>
<option value="2">
COM_COMPONENTBUILDER_FIELD_BASESIXTY_FOUR</option>
<option value="3">
COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY</option>
<option value="5">
COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY</option>
<option value="4">
COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION</option>
</field>
<!-- Add_css_view Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css_view"
label="COM_COMPONENTBUILDER_FIELD_ADD_CSS_VIEW_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
<!-- Catid Field. Type: Category. (joomla) -->
<field
type="category"
name="catid"
label="COM_COMPONENTBUILDER_FIELD_CATID_LABEL"
extension="com_componentbuilder.fields"
description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION"
class="inputbox"
/> />
<!-- Note_whmcs_encryption Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_whmcs_encryption" label="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION" heading="h4" class="alert alert-success note_whmcs_encryption" />
<!-- Datalenght Field. Type: List. (joomla) --> <!-- Datalenght Field. Type: List. (joomla) -->
<field <field
type="list" type="list"
@ -276,35 +332,6 @@
<option value="Other"> <option value="Other">
COM_COMPONENTBUILDER_FIELD_OTHER</option> COM_COMPONENTBUILDER_FIELD_OTHER</option>
</field> </field>
<!-- Add_css_view Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_css_view"
label="COM_COMPONENTBUILDER_FIELD_ADD_CSS_VIEW_LABEL"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_FIELD_YES</option>
<option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option>
</field>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field
type="hidden"
name="not_required"
default="[]"
/>
<!-- Catid Field. Type: Category. (joomla) -->
<field
type="category"
name="catid"
label="COM_COMPONENTBUILDER_FIELD_CATID_LABEL"
extension="com_componentbuilder.fields"
description="COM_COMPONENTBUILDER_FIELD_CATID_DESCRIPTION"
class="inputbox"
/>
<!-- Css_view Field. Type: Textarea. (joomla) --> <!-- Css_view Field. Type: Textarea. (joomla) -->
<field <field
type="textarea" type="textarea"
@ -318,31 +345,8 @@
hint="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_HINT" hint="COM_COMPONENTBUILDER_FIELD_CSS_VIEW_HINT"
required="true" required="true"
/> />
<!-- Store Field. Type: List. (joomla) --> <!-- Note_whmcs_encryption Field. Type: Note. A None Database Field. (joomla) -->
<field <field type="note" name="note_whmcs_encryption" label="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_WHMCS_ENCRYPTION_DESCRIPTION" heading="h4" class="alert alert-success note_whmcs_encryption" />
type="list"
name="store"
label="COM_COMPONENTBUILDER_FIELD_STORE_LABEL"
description="COM_COMPONENTBUILDER_FIELD_STORE_DESCRIPTION"
class="list_class"
multiple="false"
filter="INT"
required="true"
default="0">
<!-- Option Set. -->
<option value="0">
COM_COMPONENTBUILDER_FIELD_DEFAULT</option>
<option value="1">
COM_COMPONENTBUILDER_FIELD_JSON</option>
<option value="2">
COM_COMPONENTBUILDER_FIELD_BASESIXTY_FOUR</option>
<option value="3">
COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY</option>
<option value="5">
COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY</option>
<option value="4">
COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION</option>
</field>
<!-- Datalenght_other Field. Type: Text. (joomla) --> <!-- Datalenght_other Field. Type: Text. (joomla) -->
<field <field
type="text" type="text"
@ -359,20 +363,19 @@
message="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_MESSAGE" message="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_MESSAGE"
hint="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_HINT" hint="COM_COMPONENTBUILDER_FIELD_DATALENGHT_OTHER_HINT"
/> />
<!-- Add_javascript_view_footer Field. Type: Radio. (joomla) --> <!-- Javascript_view_footer Field. Type: Textarea. (joomla) -->
<field <field
type="radio" type="textarea"
name="add_javascript_view_footer" name="javascript_view_footer"
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL" label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_LABEL"
class="btn-group btn-group-yesno" rows="30"
default="0" cols="15"
required="true"> description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_DESCRIPTION"
<!-- Option Set. --> class="text_area span12"
<option value="1"> filter="raw"
COM_COMPONENTBUILDER_FIELD_YES</option> hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEW_FOOTER_HINT"
<option value="0"> required="true"
COM_COMPONENTBUILDER_FIELD_NO</option> />
</field>
<!-- Add_css_views Field. Type: Radio. (joomla) --> <!-- Add_css_views Field. Type: Radio. (joomla) -->
<field <field
type="radio" type="radio"
@ -387,20 +390,19 @@
<option value="0"> <option value="0">
COM_COMPONENTBUILDER_FIELD_NO</option> COM_COMPONENTBUILDER_FIELD_NO</option>
</field> </field>
<!-- Add_javascript_views_footer Field. Type: Radio. (joomla) --> <!-- Javascript_views_footer Field. Type: Textarea. (joomla) -->
<field <field
type="radio" type="textarea"
name="add_javascript_views_footer" name="javascript_views_footer"
label="COM_COMPONENTBUILDER_FIELD_ADD_JAVASCRIPT_VIEWS_FOOTER_LABEL" label="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_LABEL"
class="btn-group btn-group-yesno" rows="30"
default="0" cols="15"
required="true"> description="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_DESCRIPTION"
<!-- Option Set. --> class="text_area span12"
<option value="1"> filter="raw"
COM_COMPONENTBUILDER_FIELD_YES</option> hint="COM_COMPONENTBUILDER_FIELD_JAVASCRIPT_VIEWS_FOOTER_HINT"
<option value="0"> required="true"
COM_COMPONENTBUILDER_FIELD_NO</option> />
</field>
<!-- Datadefault Field. Type: List. (joomla) --> <!-- Datadefault Field. Type: List. (joomla) -->
<field <field
type="list" type="list"
@ -423,8 +425,6 @@
<option value="Other"> <option value="Other">
COM_COMPONENTBUILDER_FIELD_OTHER</option> COM_COMPONENTBUILDER_FIELD_OTHER</option>
</field> </field>
<!-- Helpnote Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="helpnote" label="COM_COMPONENTBUILDER_FIELD_HELPNOTE_LABEL" class="helpNote helpnote" />
<!-- Xml Field. Type: Hidden. (joomla) --> <!-- Xml Field. Type: Hidden. (joomla) -->
<field <field
type="hidden" type="hidden"
@ -432,6 +432,8 @@
default="1" default="1"
filter="raw" filter="raw"
/> />
<!-- Note_select_field_type Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_select_field_type" label="COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_LABEL" description="COM_COMPONENTBUILDER_FIELD_NOTE_SELECT_FIELD_TYPE_DESCRIPTION" heading="h4" class="alert alert-info note_select_field_type" />
</fieldset> </fieldset>
<!-- Access Control Fields. --> <!-- Access Control Fields. -->

View File

@ -732,13 +732,13 @@ CREATE TABLE IF NOT EXISTS `#__componentbuilder_field` (
KEY `idx_indexes` (`indexes`), KEY `idx_indexes` (`indexes`),
KEY `idx_null_switch` (`null_switch`), KEY `idx_null_switch` (`null_switch`),
KEY `idx_datadefault_other` (`datadefault_other`), KEY `idx_datadefault_other` (`datadefault_other`),
KEY `idx_datalenght` (`datalenght`), KEY `idx_add_javascript_views_footer` (`add_javascript_views_footer`),
KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`),
KEY `idx_add_css_view` (`add_css_view`), KEY `idx_add_css_view` (`add_css_view`),
KEY `idx_catid` (`catid`), KEY `idx_catid` (`catid`),
KEY `idx_datalenght` (`datalenght`),
KEY `idx_datalenght_other` (`datalenght_other`), KEY `idx_datalenght_other` (`datalenght_other`),
KEY `idx_add_javascript_view_footer` (`add_javascript_view_footer`),
KEY `idx_add_css_views` (`add_css_views`), KEY `idx_add_css_views` (`add_css_views`),
KEY `idx_add_javascript_views_footer` (`add_javascript_views_footer`),
KEY `idx_datadefault` (`datadefault`) KEY `idx_datadefault` (`datadefault`)
) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8;

View File

@ -104,6 +104,9 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";
<td class="hidden-phone"> <td class="hidden-phone">
<?php echo JText::_($item->null_switch); ?> <?php echo JText::_($item->null_switch); ?>
</td> </td>
<td class="hidden-phone">
<?php echo JText::_($item->store); ?>
</td>
<td class="nowrap"> <td class="nowrap">
<?php if ($this->user->authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?> <?php if ($this->user->authorise('core.edit', 'com_componentbuilder.fields.category.' . (int)$item->catid)): ?>
<a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fields"><?php echo $this->escape($item->category_title); ?></a> <a href="index.php?option=com_categories&task=category.edit&id=<?php echo (int)$item->catid; ?>&extension=com_componentbuilder.fields"><?php echo $this->escape($item->category_title); ?></a>
@ -111,9 +114,6 @@ $edit = "index.php?option=com_componentbuilder&view=fields&task=field.edit";
<?php echo $this->escape($item->category_title); ?> <?php echo $this->escape($item->category_title); ?>
<?php endif; ?> <?php endif; ?>
</td> </td>
<td class="hidden-phone">
<?php echo JText::_($item->store); ?>
</td>
<td class="center"> <td class="center">
<?php if ($canDo->get('field.edit.state')) : ?> <?php if ($canDo->get('field.edit.state')) : ?>
<?php if ($item->checked_out) : ?> <?php if ($item->checked_out) : ?>

View File

@ -58,12 +58,12 @@ defined('_JEXEC') or die('Restricted access');
<th class="nowrap hidden-phone" > <th class="nowrap hidden-phone" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL', 'null_switch', $this->listDirn, $this->listOrder); ?> <?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL', 'null_switch', $this->listDirn, $this->listOrder); ?>
</th> </th>
<th class="nowrap" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY', 'catid', $this->listDirn, $this->listOrder); ?>
</th>
<th class="nowrap hidden-phone" > <th class="nowrap hidden-phone" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_STORE_LABEL', 'store', $this->listDirn, $this->listOrder); ?> <?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_STORE_LABEL', 'store', $this->listDirn, $this->listOrder); ?>
</th> </th>
<th class="nowrap" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY', 'catid', $this->listDirn, $this->listOrder); ?>
</th>
<?php if ($this->canState): ?> <?php if ($this->canState): ?>
<th width="10" class="nowrap center" > <th width="10" class="nowrap center" >
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_STATUS', 'published', $this->listDirn, $this->listOrder); ?> <?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_STATUS', 'published', $this->listDirn, $this->listOrder); ?>

View File

@ -377,8 +377,8 @@ class ComponentbuilderViewFields extends JViewLegacy
'a.datatype' => JText::_('COM_COMPONENTBUILDER_FIELD_DATATYPE_LABEL'), 'a.datatype' => JText::_('COM_COMPONENTBUILDER_FIELD_DATATYPE_LABEL'),
'a.indexes' => JText::_('COM_COMPONENTBUILDER_FIELD_INDEXES_LABEL'), 'a.indexes' => JText::_('COM_COMPONENTBUILDER_FIELD_INDEXES_LABEL'),
'a.null_switch' => JText::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL'), 'a.null_switch' => JText::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL'),
'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'),
'a.store' => JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'), 'a.store' => JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'),
'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'),
'a.id' => JText::_('JGRID_HEADING_ID') 'a.id' => JText::_('JGRID_HEADING_ID')
); );
} }

View File

@ -3428,9 +3428,9 @@ class com_componentbuilderInstallerScript
$field->type_title = 'Componentbuilder Field'; $field->type_title = 'Componentbuilder Field';
$field->type_alias = 'com_componentbuilder.field'; $field->type_alias = 'com_componentbuilder.field';
$field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","datadefault_other":"datadefault_other","css_views":"css_views","javascript_views_footer":"javascript_views_footer","javascript_view_footer":"javascript_view_footer","datalenght":"datalenght","add_css_view":"add_css_view","not_required":"not_required","css_view":"css_view","store":"store","datalenght_other":"datalenght_other","add_javascript_view_footer":"add_javascript_view_footer","add_css_views":"add_css_views","add_javascript_views_footer":"add_javascript_views_footer","datadefault":"datadefault","xml":"xml"}}'; $field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","datadefault_other":"datadefault_other","css_views":"css_views","add_javascript_views_footer":"add_javascript_views_footer","add_javascript_view_footer":"add_javascript_view_footer","store":"store","add_css_view":"add_css_view","not_required":"not_required","datalenght":"datalenght","css_view":"css_view","datalenght_other":"datalenght_other","javascript_view_footer":"javascript_view_footer","add_css_views":"add_css_views","javascript_views_footer":"javascript_views_footer","datadefault":"datadefault","xml":"xml"}}';
$field->router = 'ComponentbuilderHelperRoute::getFieldRoute'; $field->router = 'ComponentbuilderHelperRoute::getFieldRoute';
$field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_css_view","not_required","catid","store","add_javascript_view_footer","add_css_views","add_javascript_views_footer"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}'; $field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_javascript_views_footer","add_javascript_view_footer","store","add_css_view","not_required","catid","add_css_views"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}';
// Set the object into the content types table. // Set the object into the content types table.
$field_Inserted = $db->insertObject('#__content_types', $field); $field_Inserted = $db->insertObject('#__content_types', $field);
@ -4037,9 +4037,9 @@ class com_componentbuilderInstallerScript
$field->type_title = 'Componentbuilder Field'; $field->type_title = 'Componentbuilder Field';
$field->type_alias = 'com_componentbuilder.field'; $field->type_alias = 'com_componentbuilder.field';
$field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}'; $field->table = '{"special": {"dbtable": "#__componentbuilder_field","key": "id","type": "Field","prefix": "componentbuilderTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","datadefault_other":"datadefault_other","css_views":"css_views","javascript_views_footer":"javascript_views_footer","javascript_view_footer":"javascript_view_footer","datalenght":"datalenght","add_css_view":"add_css_view","not_required":"not_required","css_view":"css_view","store":"store","datalenght_other":"datalenght_other","add_javascript_view_footer":"add_javascript_view_footer","add_css_views":"add_css_views","add_javascript_views_footer":"add_javascript_views_footer","datadefault":"datadefault","xml":"xml"}}'; $field->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "catid","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","fieldtype":"fieldtype","datatype":"datatype","indexes":"indexes","null_switch":"null_switch","datadefault_other":"datadefault_other","css_views":"css_views","add_javascript_views_footer":"add_javascript_views_footer","add_javascript_view_footer":"add_javascript_view_footer","store":"store","add_css_view":"add_css_view","not_required":"not_required","datalenght":"datalenght","css_view":"css_view","datalenght_other":"datalenght_other","javascript_view_footer":"javascript_view_footer","add_css_views":"add_css_views","javascript_views_footer":"javascript_views_footer","datadefault":"datadefault","xml":"xml"}}';
$field->router = 'ComponentbuilderHelperRoute::getFieldRoute'; $field->router = 'ComponentbuilderHelperRoute::getFieldRoute';
$field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_css_view","not_required","catid","store","add_javascript_view_footer","add_css_views","add_javascript_views_footer"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}'; $field->content_history_options = '{"formFile": "administrator/components/com_componentbuilder/models/forms/field.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","not_required","xml"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","fieldtype","add_javascript_views_footer","add_javascript_view_footer","store","add_css_view","not_required","catid","add_css_views"],"displayLookup": [{"sourceColumn": "catid","targetTable": "#__categories","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "fieldtype","targetTable": "#__componentbuilder_fieldtype","targetColumn": "id","displayColumn": "name"}]}';
// Check if field type is already in content_type DB. // Check if field type is already in content_type DB.
$field_id = null; $field_id = null;