CMS MADE SIMPLE FORGE

CGContentUtils

 

[#12206] "sortable_list" block data is not saved

avatar
Created By: Deleted User (deleteduser_11200)
Date Submitted: Tue Dec 10 07:06:03 -0500 2019

Assigned To: Robert Campbell (calguy1000)
Version: 2.5.4
CMSMS Version: 2.2.13
Severity: Critical
Resolution: None
State: Open
Summary:
"sortable_list" block data is not saved
Detailed Description:
 How to reproduce:

1) Go to Extensions -> Calguys Content Utilities
2) Click + Add a New block
3) Select Type: Sortable List  
4) Add data
5) Hit Submit
6) Edit the Sortable List items just added and see that data is not saved
  
* Why does this functionality not work / how to fix:

- In ./templates/admin_edit_block.tpl the options field is called
'sortable_list' in the admin_edit script a field with the name 'multiselect' is
read out.
 
- The maxitems field is spelled 'stortable_maxitems' in the admin_edit script
must be 'sortable_maxitems'

* Snippets:
  
./action.admin_edit_block.php
112             case 'sortable_list':
113                 $block = $block->with_attrib('options',
html_entity_decode(cge_param::get_string($_POST,'multiselect')));
114                 $block = $block->with_attrib('sortable_maxitems',
cge_param::get_int($_POST,'stortable_maxitems'));
115                 break;

./templates/admin_edit_block.tpl

                180 <div class="blocktypes" id="sortable_list">
181   <div class="c_full cf">
182     <label class="grid_3">*{$mod->Lang('prompt_options')}:</label>
183     <div class="grid_8">
184       <textarea class="grid_12" name="sortable_list" cols="50"
rows="5">{$one->attribs.options}</textarea>
185       <br/>
186       {$mod->Lang('info_dropdown_options')}
187     </div>
188   </div>
189   <div class="c_full cf">
190     <label class="grid_3">*{$mod->Lang('prompt_sortable_maxitems')}:</label>
191     <div class="grid_8">
192       <input class="grid_12" type="text" name="sortable_maxitems" size="3"
value="{$one->attribs.sortable_maxitems|default:''}"/>
193       <br/>
194       {$mod->Lang('info_sortable_maxitems')}
195     </div>
196   </div>


History