Skip to content

Commit

Permalink
Bug #11 fix: hide Select User Groups field and is_blacklist field whe…
Browse files Browse the repository at this point in the history
…n global is set to yes (#12)

* Bug #157602 fix: hide Select User Groups field and is_blacklist field when global is set to yes

* Bug #157602 fix: hide Select User Groups field and is_blacklist field when global is set to yes

* Bug #157602 fix: hide Select User Groups field and is_blacklist field when global is set to yes

* Bug #157602 fix: hide Select User Groups field and is_blacklist field when global is set to yes
  • Loading branch information
paritshivani authored Feb 17, 2020
1 parent 8f3f286 commit 63a889c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/components/com_tc/administrator/models/forms/content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field name="groups" type="usergrouplist" multiple="true" default="0" label="COM_TC_FORM_LBL_CONTENT_SELECT_USER_GROUP" description="COM_TC_FORM_LBL_CONTENT_SELECT_USER_GROUP_DESC" />
<field name="is_blacklist" type="radio" class="btn-group" label="COM_TC_FORM_LBL_CONTENT_USER_GROUP_BEHAVIOUR" description="COM_TC_FORM_LBL_CONTENT_USER_GROUP_BEHAVIOUR_DESC" default="1">
<field name="groups" type="usergrouplist" multiple="true" default="0" label="COM_TC_FORM_LBL_CONTENT_SELECT_USER_GROUP" description="COM_TC_FORM_LBL_CONTENT_SELECT_USER_GROUP_DESC" showon="global:0"/>
<field name="is_blacklist" type="radio" class="btn-group" label="COM_TC_FORM_LBL_CONTENT_USER_GROUP_BEHAVIOUR" description="COM_TC_FORM_LBL_CONTENT_USER_GROUP_BEHAVIOUR_DESC" default="1" showon="global:0">
<option value="1">COM_TC_FORM_LBL_CONTENT_USER_GROUP_BEHAVIOUR_YES</option>
<option value="0">COM_TC_FORM_LBL_CONTENT_USER_GROUP_BEHAVIOUR_NO</option>
</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
</field>
<field name="limit" type="limitbox" class="input-mini" default="25" onchange="this.form.submit();" />
</fields>
</form>
</form>
13 changes: 7 additions & 6 deletions src/components/com_tc/administrator/views/content/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

if (tc_id)
{
jQuery('#jform_version_id').attr('readonly', true);
jQuery('#jform_version').attr('readonly', true);
jQuery('#jform_client_id').attr('readonly', true);

return true;
Expand All @@ -61,8 +61,8 @@

if (value <= 0)
{
alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_ZERO_VERSION_TC')); ?>');
jQuery('#jform_version_id').val('');
alert('<?php echo $this->escape(JText::_('COM_TC_VALIDATION_FORM_ZERO_VERSION_TC')); ?>');
jQuery('#jform_version').val('');

return false;
}
Expand Down Expand Up @@ -90,7 +90,7 @@ function checkVersionClient()
return true;
}

var tcVersion = jQuery("#jform_version_id").val();
var tcVersion = jQuery("#jform_version").val();
var tcClient = jQuery("#jform_client_id").val();
var valid = false;

Expand All @@ -112,8 +112,9 @@ function(data) {
valid = true;
}
else if (tcVersion <= data) {
alert('<?php echo JText::_('JGLOBAL_VALIDATION_FORM_LATEST_VERSION_TC'); ?>' + data + '<?php echo JText::_('JGLOBAL_VALIDATION_FORM_GREATER_VERSION_TC'); ?>');
jQuery('#jform_version_id').val('');
alert('<?php echo JText::_('COM_TC_VALIDATION_FORM_LATEST_VERSION_TC', ); ?>'+ tcClient +' - '+ data +
'<?php echo JText::_('COM_TC_VALIDATION_FORM_GREATER_VERSION_TC'); ?>');
jQuery('#jform_version').val('');

valid = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ COM_TC_FORM_LBL_CONTENT_SELECT_USER_GROUP="Select User Groups"
COM_TC_FORM_LBL_CONTENT_SELECT_USER_GROUP_DESC="Select user groups for T&C"
COM_TC_FORM_LBL_CONTENT_URL_PATTERN="URL Pattern"
COM_TC_FORM_LBL_CONTENT_URL_PATTERN_DESC="URL Pattern is used to store option & view of your URL Ex. Option = 'com_ekcontent' & view = 'content'"
JGLOBAL_VALIDATION_FORM_INVALID_TC="This Version & Client are already stored, please enter another Version & Client"
COM_TC_VALIDATION_FORM_INVALID_TC="This Version & Client are already stored, please enter another Version & Client"
COM_TC_TITLE_PERMISSIONS="Access Control"
JGLOBAL_VALIDATION_FORM_LATEST_VERSION_TC ="Latest version of this T&C Client is "
JGLOBAL_VALIDATION_FORM_GREATER_VERSION_TC =" please enter greater version"
JGLOBAL_VALIDATION_FORM_ZERO_VERSION_TC ="Plesase enter version is greater than zero or previous version"
JGLOBAL_VALIDATION_FORM_INVALID_VERSION ="Please enter version as integer or float value"
COM_TC_VALIDATION_FORM_LATEST_VERSION_TC ="Latest version of this T&C "
COM_TC_VALIDATION_FORM_GREATER_VERSION_TC =" please enter greater version"
COM_TC_VALIDATION_FORM_ZERO_VERSION_TC ="Plesase enter version is greater than zero or previous version"
COM_TC_VALIDATION_FORM_INVALID_VERSION ="Please enter version as integer or float value"
COM_TC_CONTENTS_LATEST="Latest"
COM_TC_CONTENTS_ALL="All"
COM_TC_CONTENTS_FILTER_PUBLISHED="Status"
Expand Down

0 comments on commit 63a889c

Please sign in to comment.