CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#12048] The simple dropdown version of parent selector in the "Navigation" tab of "Edit Content Page" does not update the field

avatar
Created By: Sašo Živanović (avani)
Date Submitted: Sat Jun 01 17:08:39 -0400 2019

Assigned To:
Version: 2.2.10
CMSMS Version: 2.2.10
Severity: Minor
Resolution: None
State: Open
Summary:
The simple dropdown version of parent selector in the "Navigation" tab of "Edit Content Page" does not update the field
Detailed Description:
The problem:
If the current user does not have "Manage All Content" or "Modify Any Page"
permissions, the parent selector in the "Navigation" tab of "Edit Content Page"
displays a simple dropdown version of permissible parents. The dropdown
correctly displays only the pages that the user owns or is an additional editor
of. Selecting another page (and applying the changes) has no effect, though.

The analysis and solution:
Function "_build_simple_select" of "jquery.cmsms_hierselector.js" defines the
"change" event handler, which should update the "parent_id" hidden field (as its
"build_smart_select" cousin does), but it does not do that. The fix is simple:

sel.on('change',function(){
	var v = $(this).val();
self.data.hidden_e.val(v).change();            /* ADD THIS LINE -- copied from
"_build_smart_select" */
	$(this).trigger('cmsms_formchange',{
		'elem': $(this),
		'value': v
	});
});


History

Comments
avatar
Date: 2019-06-01 17:24
Posted By: Sašo Živanović (avani)

Added version.
      
Updates

Updated: 2019-06-01 17:24
version_id: -1 => 31482
resolution_id: => 5