Edit Toglleing issue in page

Hi Team,

We have a page where we have rendering the Edit button once the case status is claimed, This Edit button is using toggle Save cancel script. once status is in pending status we have two section displayed and once status is set to claimed, we are displaying 2 more sections. 

now our requirement is we want to display this edit button before the claimed Status so user who had created the request would be able to edit the original request. But since in exisitng code we are passing 4 section ID in the code, we are unable to use the edit feature.

below is the code : - 

// Set the selector for which components to toggle. For example, to toggle// specific named components, set the selector to://   #ComponentUniqueID1, #AnotherComponent, #AThirdComponent
// Or, to toggle all field editors and tables, use this selector:
//   .nx-basicfieldeditor:visible, .nx-skootable
var ComponentSelector   = ‘#Test1, #AnotherComponent, #AThirdComponent,#test1,#tabID’;
var $ = skuid.$;
var myModel = arguments[0].model;

// determine what mode was are moving into
var button = arguments[0].button;
var startEdit = false;
var isEditButton = false;
if (button.hasClass(‘btnEdit’)) {
    startEdit = !button.hasClass(‘btnEditActive’);
    isEditButton = true;
} else if (button.hasClass(‘btnEditCancel’)) {
    startEdit = false;
} else {
    console.log(‘Unknown button in editModeController; missing class btnEdit or btnEditCancel’);
// Iterate over the selected components and switch them to the new mode, then
// force a re-render.
var componentElems = $( ComponentSelector );
$.each( componentElems, function( index, componentElem ){
    //console.log(‘Processing component’);
    var component = $( componentElem ).data( ‘component’ );
    // Currently, this snippet only supports toggling tables and field editors
    // However, it would be relatively easy to add other types of components
    // as appropriate by adding a “case” statement below:
    switch ( component.getType() ){
        case ‘skootable’:
        case ‘basicfieldeditor’:
            var componentObject = $( componentElem ).data( ‘object’ );
            componentObject.mode = componentObject.list.mode = (startEdit ? ‘edit’ : ‘readonly’);
// update buttons and model based on what happened
if (startEdit) {
    // track that we have entered edit mode
    // unhide cancel
  // adjust edit to correct text and icon
else {
    // track that we have left edit mode
    // hide cancel button
    // adjust edit to correct text and icon
    // note that normally you would update the model that is associated with this button, with this line:
     //var myModel = arguments[0].model;
    // however, in this case, our model is coming from a page include, so we need more
    // direct reference to the model
    if (isEditButton) {
        myModel.save({callback: function(result){
            if (result.totalsuccess) {
            var $ = skuid.$;
// To start showing the message
            message: ‘Please Wait… Your Record is Getting Saved’
    // Turn off the block UI


Please suggest…