Moved FTP signature to its own table, so we can use it more securely around JCB (even in the global settings). Improved the Linked view option in admin-views.

This commit is contained in:
2017-08-25 02:46:12 +01:00
parent 8501e37b3e
commit 4b3bc9bd03
261 changed files with 5281 additions and 638 deletions

View File

@ -618,19 +618,21 @@
last="100"
step="1"
/>
<!-- Permission Field. Type: Radio. (joomla) -->
<!-- Permission Field. Type: List. (joomla) -->
<field
type="radio"
type="list"
name="permission"
label="COM_COMPONENTBUILDER_ADMIN_VIEW_PERMISSION_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_PERMISSION_DESCRIPTION"
default="0"
required="false">
class="list_class"
multiple="false"
required="false"
default="0">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_ADMIN_VIEW_YES</option>
<option value="0">
COM_COMPONENTBUILDER_ADMIN_VIEW_NO</option>
COM_COMPONENTBUILDER_ADMIN_VIEW_NONE</option>
<option value=" 1">
COM_COMPONENTBUILDER_ADMIN_VIEW_EDITING</option>
</field>
</fieldset>
</fields>

25
admin/models/forms/ftp.js Normal file
View File

@ -0,0 +1,25 @@
/*--------------------------------------------------------------------------------------------------------| www.vdm.io |------/
__ __ _ _____ _ _ __ __ _ _ _
\ \ / / | | | __ \ | | | | | \/ | | | | | | |
\ \ / /_ _ ___| |_ | | | | _____ _____| | ___ _ __ _ __ ___ ___ _ __ | |_ | \ / | ___| |_| |__ ___ __| |
\ \/ / _` / __| __| | | | |/ _ \ \ / / _ \ |/ _ \| '_ \| '_ ` _ \ / _ \ '_ \| __| | |\/| |/ _ \ __| '_ \ / _ \ / _` |
\ / (_| \__ \ |_ | |__| | __/\ V / __/ | (_) | |_) | | | | | | __/ | | | |_ | | | | __/ |_| | | | (_) | (_| |
\/ \__,_|___/\__| |_____/ \___| \_/ \___|_|\___/| .__/|_| |_| |_|\___|_| |_|\__| |_| |_|\___|\__|_| |_|\___/ \__,_|
| |
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 10 of this MVC
@build 24th August, 2017
@created 23rd August, 2017
@package Component Builder
@subpackage ftp.js
@author Llewellyn van der Merwe <http://vdm.bz/component-builder>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
Builds Complex Joomla Components
/-----------------------------------------------------------------------------------------------------------------------------*/

149
admin/models/forms/ftp.xml Normal file
View File

@ -0,0 +1,149 @@
<?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_FTP_CREATED_DATE_LABEL"
description="COM_COMPONENTBUILDER_FTP_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_FTP_CREATED_BY_LABEL"
description="COM_COMPONENTBUILDER_FTP_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_FTP_MODIFIED_DATE_LABEL" description="COM_COMPONENTBUILDER_FTP_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_FTP_MODIFIED_BY_LABEL"
description="COM_COMPONENTBUILDER_FTP_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_FTP_ORDERING_LABEL"
description=""
default="0"
size="6"
required="false"
/>
<!-- Version Field. Type: Text (joomla) -->
<field
name="version"
type="text"
class="readonly"
label="COM_COMPONENTBUILDER_FTP_VERSION_LABEL"
description="COM_COMPONENTBUILDER_FTP_VERSION_DESC"
size="6"
readonly="true"
filter="unset"
/>
<!-- Dynamic Fields. -->
<!-- Name Field. Type: Text. (joomla) -->
<field
type="text"
name="name"
label="COM_COMPONENTBUILDER_FTP_NAME_LABEL"
size="40"
maxlength="150"
description="COM_COMPONENTBUILDER_FTP_NAME_DESCRIPTION"
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="Error! Please add name here."
hint="COM_COMPONENTBUILDER_FTP_NAME_HINT"
/>
<!-- Note_ftp_signature Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_ftp_signature" label="COM_COMPONENTBUILDER_FTP_NOTE_FTP_SIGNATURE_LABEL" description="COM_COMPONENTBUILDER_FTP_NOTE_FTP_SIGNATURE_DESCRIPTION" heading="h4" class="alert alert-success note_ftp_signature" />
<!-- Signature Field. Type: Text. (joomla) -->
<field
type="text"
name="signature"
label="COM_COMPONENTBUILDER_FTP_SIGNATURE_LABEL"
size="250"
maxlength="250"
description="COM_COMPONENTBUILDER_FTP_SIGNATURE_DESCRIPTION"
class="text_area span12"
required="true"
filter="STRING"
message="Error! Please add some text here."
hint="COM_COMPONENTBUILDER_FTP_SIGNATURE_HINT"
autocomplete="off"
/>
</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 ftp"
translate_label="false"
filter="rules"
validate="rules"
class="inputbox"
component="com_componentbuilder"
section="ftp"
/>
</fieldset>
</form>

View File

@ -23,12 +23,12 @@
/-----------------------------------------------------------------------------------------------------------------------------*/
// Some Global Values
jform_vvvvwacwac_required = false;
jform_vvvvwadwad_required = false;
jform_vvvvwaewae_required = false;
jform_vvvvwafwaf_required = false;
jform_vvvvwagwag_required = false;
jform_vvvvwahwah_required = false;
jform_vvvvwacwad_required = false;
jform_vvvvwadwae_required = false;
jform_vvvvwaewaf_required = false;
jform_vvvvwafwag_required = false;
jform_vvvvwagwah_required = false;
jform_vvvvwahwai_required = false;
// Initial Script
jQuery(document).ready(function()
@ -59,26 +59,26 @@ function vvvvwac(location_vvvvwac)
if (location_vvvvwac == 1)
{
jQuery('#jform_admin_view').closest('.control-group').show();
if (jform_vvvvwacwac_required)
if (jform_vvvvwacwad_required)
{
updateFieldRequired('admin_view',0);
jQuery('#jform_admin_view').prop('required','required');
jQuery('#jform_admin_view').attr('aria-required',true);
jQuery('#jform_admin_view').addClass('required');
jform_vvvvwacwac_required = false;
jform_vvvvwacwad_required = false;
}
}
else
{
jQuery('#jform_admin_view').closest('.control-group').hide();
if (!jform_vvvvwacwac_required)
if (!jform_vvvvwacwad_required)
{
updateFieldRequired('admin_view',1);
jQuery('#jform_admin_view').removeAttr('required');
jQuery('#jform_admin_view').removeAttr('aria-required');
jQuery('#jform_admin_view').removeClass('required');
jform_vvvvwacwac_required = true;
jform_vvvvwacwad_required = true;
}
}
}
@ -90,26 +90,26 @@ function vvvvwad(location_vvvvwad)
if (location_vvvvwad == 2)
{
jQuery('#jform_site_view').closest('.control-group').show();
if (jform_vvvvwadwad_required)
if (jform_vvvvwadwae_required)
{
updateFieldRequired('site_view',0);
jQuery('#jform_site_view').prop('required','required');
jQuery('#jform_site_view').attr('aria-required',true);
jQuery('#jform_site_view').addClass('required');
jform_vvvvwadwad_required = false;
jform_vvvvwadwae_required = false;
}
}
else
{
jQuery('#jform_site_view').closest('.control-group').hide();
if (!jform_vvvvwadwad_required)
if (!jform_vvvvwadwae_required)
{
updateFieldRequired('site_view',1);
jQuery('#jform_site_view').removeAttr('required');
jQuery('#jform_site_view').removeAttr('aria-required');
jQuery('#jform_site_view').removeClass('required');
jform_vvvvwadwad_required = true;
jform_vvvvwadwae_required = true;
}
}
}
@ -134,26 +134,26 @@ function vvvvwae(type_vvvvwae)
if (type)
{
jQuery('#jform_url').closest('.control-group').show();
if (jform_vvvvwaewae_required)
if (jform_vvvvwaewaf_required)
{
updateFieldRequired('url',0);
jQuery('#jform_url').prop('required','required');
jQuery('#jform_url').attr('aria-required',true);
jQuery('#jform_url').addClass('required');
jform_vvvvwaewae_required = false;
jform_vvvvwaewaf_required = false;
}
}
else
{
jQuery('#jform_url').closest('.control-group').hide();
if (!jform_vvvvwaewae_required)
if (!jform_vvvvwaewaf_required)
{
updateFieldRequired('url',1);
jQuery('#jform_url').removeAttr('required');
jQuery('#jform_url').removeAttr('aria-required');
jQuery('#jform_url').removeClass('required');
jform_vvvvwaewae_required = true;
jform_vvvvwaewaf_required = true;
}
}
}
@ -189,26 +189,26 @@ function vvvvwaf(type_vvvvwaf)
if (type)
{
jQuery('#jform_article').closest('.control-group').show();
if (jform_vvvvwafwaf_required)
if (jform_vvvvwafwag_required)
{
updateFieldRequired('article',0);
jQuery('#jform_article').prop('required','required');
jQuery('#jform_article').attr('aria-required',true);
jQuery('#jform_article').addClass('required');
jform_vvvvwafwaf_required = false;
jform_vvvvwafwag_required = false;
}
}
else
{
jQuery('#jform_article').closest('.control-group').hide();
if (!jform_vvvvwafwaf_required)
if (!jform_vvvvwafwag_required)
{
updateFieldRequired('article',1);
jQuery('#jform_article').removeAttr('required');
jQuery('#jform_article').removeAttr('aria-required');
jQuery('#jform_article').removeClass('required');
jform_vvvvwafwaf_required = true;
jform_vvvvwafwag_required = true;
}
}
}
@ -244,26 +244,26 @@ function vvvvwag(type_vvvvwag)
if (type)
{
jQuery('#jform_content-lbl').closest('.control-group').show();
if (jform_vvvvwagwag_required)
if (jform_vvvvwagwah_required)
{
updateFieldRequired('content',0);
jQuery('#jform_content').prop('required','required');
jQuery('#jform_content').attr('aria-required',true);
jQuery('#jform_content').addClass('required');
jform_vvvvwagwag_required = false;
jform_vvvvwagwah_required = false;
}
}
else
{
jQuery('#jform_content-lbl').closest('.control-group').hide();
if (!jform_vvvvwagwag_required)
if (!jform_vvvvwagwah_required)
{
updateFieldRequired('content',1);
jQuery('#jform_content').removeAttr('required');
jQuery('#jform_content').removeAttr('aria-required');
jQuery('#jform_content').removeClass('required');
jform_vvvvwagwag_required = true;
jform_vvvvwagwah_required = true;
}
}
}
@ -286,26 +286,26 @@ function vvvvwah(target_vvvvwah)
if (target_vvvvwah == 1)
{
jQuery('#jform_groups').closest('.control-group').show();
if (jform_vvvvwahwah_required)
if (jform_vvvvwahwai_required)
{
updateFieldRequired('groups',0);
jQuery('#jform_groups').prop('required','required');
jQuery('#jform_groups').attr('aria-required',true);
jQuery('#jform_groups').addClass('required');
jform_vvvvwahwah_required = false;
jform_vvvvwahwai_required = false;
}
}
else
{
jQuery('#jform_groups').closest('.control-group').hide();
if (!jform_vvvvwahwah_required)
if (!jform_vvvvwahwai_required)
{
updateFieldRequired('groups',1);
jQuery('#jform_groups').removeAttr('required');
jQuery('#jform_groups').removeAttr('aria-required');
jQuery('#jform_groups').removeClass('required');
jform_vvvvwahwah_required = true;
jform_vvvvwahwai_required = true;
}
}
}

View File

@ -9,8 +9,8 @@
|_|
/-------------------------------------------------------------------------------------------------------------------------------/
@version @update number 359 of this MVC
@build 23rd August, 2017
@version @update number 361 of this MVC
@build 24th August, 2017
@created 6th May, 2015
@package Component Builder
@subpackage joomla_component.js

View File

@ -216,7 +216,7 @@
class="dashboard_tabs"
select="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DASHBOARD_TAB_SELECT"
icon="list"
maximum="5"
maximum="10"
filter="raw">
<fields name="dashboard_tab_fields" label="">
<fieldset hidden="true" name="dashboard_tab_modal" repeat="true">
@ -744,19 +744,16 @@
filter="raw"
required="true"
/>
<!-- Sales_server_ftp Field. Type: Text. (joomla) -->
<!-- Sales_server_ftp Field. Type: Ftps. (custom) -->
<field
type="text"
type="ftps"
name="sales_server_ftp"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_FTP_LABEL"
size="250"
maxlength="250"
default="host=HOSTNAME&amp;port=PORT_INT&amp;options[type]=FTP_BINARY&amp;options[timeout]=15&amp;username=user@name.com&amp;password=password"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_FTP_DESCRIPTION"
class="text_area span12"
filter="STRING"
message="Error! Please add some text here."
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_SALES_SERVER_FTP_HINT"
class="list_class"
multiple="false"
default="0"
button="true"
/>
<!-- Update_server_target Field. Type: Radio. (joomla) -->
<field
@ -791,18 +788,16 @@
message="Error! Please add component name here."
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_HINT"
/>
<!-- Update_server_ftp Field. Type: Text. (joomla) -->
<!-- Update_server_ftp Field. Type: Ftps. (custom) -->
<field
type="text"
type="ftps"
name="update_server_ftp"
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_FTP_LABEL"
size="250"
maxlength="250"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_FTP_DESCRIPTION"
class="text_area span12"
filter="STRING"
message="Error! Please add some text here."
hint="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_UPDATE_SERVER_FTP_HINT"
class="list_class"
multiple="false"
default="0"
button="true"
/>
<!-- Not_required Field. Type: Hidden. (joomla) -->
<field