//  Check if these code needs to be removed since the interface ar now moving to ExtJS
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
if (!isset($_GET['position'])) {
    $_GET['position'] = 1;
}
$_SESSION['STEP_POSITION'] = (int) $_GET['position'];
$oCase = new Cases();
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
$G_PUBLISH = new Publisher();
if (!isset($_GET['ex'])) {
    $_GET['ex'] = 0;
}
if (!isset($_GET['INP_DOC_UID'])) {
    G::LoadClass('case');
    $oCase = new Cases();
    $G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_InputdocsListToRevise', $oCase->getInputDocumentsCriteriaToRevise($_SESSION['APPLICATION']), '');
} else {
    $oInputDocument = new InputDocument();
    $Fields = $oInputDocument->load($_GET['INP_DOC_UID']);
    //Obtain previous and next step - Start
    try {
        $aNextStep = $oCase->getNextSupervisorStep($_SESSION['PROCESS'], $_SESSION['STEP_POSITION'], $_GET['type']);
        $aPreviousStep = $oCase->getPreviousSupervisorStep($_SESSION['PROCESS'], $_SESSION['STEP_POSITION'], $_GET['type']);
        if (!$aPreviousStep) {
            $Fields['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
        } else {
            $Fields['__DYNAFORM_OPTIONS']['PREVIOUS_STEP'] = 'cases_StepToReviseInputs?type=INPUT_DOCUMENT&INP_DOC_UID=' . $aNextStep['UID'] . '&position=' . $aNextStep['POSITION'] . '&APP_UID=' . $_GET['APP_UID'] . '&DEL_INDEX=' . $_GET['DEL_INDEX'];
            $Fields['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = G::loadTranslation("ID_PREVIOUS_STEP");
        }
        $Fields['__DYNAFORM_OPTIONS']['NEXT_STEP'] = 'cases_StepToReviseInputs?type=INPUT_DOCUMENT&INP_DOC_UID=' . $aNextStep['UID'] . '&position=' . $aNextStep['POSITION'] . '&APP_UID=' . $_GET['APP_UID'] . '&DEL_INDEX=' . $_GET['DEL_INDEX'];
    } catch (exception $e) {