array( 'show' => true, 'input' => 'text', ), 'docserver_type_id' => array( 'show' => true, 'input' => 'text', ), 'device_label' => array( 'show' => true, 'input' => 'text', ), 'is_readonly' => array( 'show' => true, 'input' => 'radio', 'radioValues' => array( 'Oui' => 'Y', 'Non' => 'N', ), ), 'size_format' => array( 'show' => true, 'jsEvent' => 'onChange="convertSizeMoGoTo($(this).value);" ', 'input' => 'select', 'selectValues' => array( 'Megaoctets' => 'Mo', 'Gigaoctets' => 'Go', 'Teraoctets' => 'To', ), ), 'enabled' => array( 'show' => false, ), 'size_limit_number' => array( 'show' => true, 'input' => 'hidden', ), 'size_limit_number_inForm' => array( 'show' => true, 'input' => 'text', 'jsEvent' => 'onKeyUp="update_conversion();" ', ), 'actual_size_number' => array( 'show' => true, 'input' => 'hidden', ), 'actual_size_number_inForm' => array( 'show' => true, 'input' => 'text', 'readonly' => true, ), 'pourcentage_size' => array( 'show' => true, 'input' => 'text', ), 'path_template' => array( 'show' => true, 'input' => 'text', ), 'ext_docservers_info' => array( 'show' => false, ), 'chain_before' => array( 'show' => false, ), 'chain_after' => array( 'show' => false, ), 'creation_date' => array( 'show' => false, ), 'closing_date' => array( 'show' => false, ), 'coll_id' => array( 'show' => true, 'input' => 'text', ), 'priority_number' => array( 'show' => true, 'input' => 'text', ), 'docserver_location_id' => array( 'show' => true, 'input' => 'text', ), 'adr_priority_number' => array( 'show' => true, 'input' => 'text', ), ); $formButtons = array( 'save' => array( 'show' => false, 'jsEvent' => 'saveWithXSD', ),'add' => array( 'show' => false, 'jsEvent' => 'saveWithXSD', ), 'cancel' => array( 'show' => false, 'jsEvent' => 'onClick="window.location.href=\''.$noModeUri.'\'"; ', ), 'back' => array( 'show' => false, 'jsEvent' => 'onClick="window.location.href=\''.$noModeUri.'\'"; ', ), ); //Titre de la page $messageController = new MessageController(); $messageController->loadMessageFile($params['viewLocation'] . '/xml/' . $params['objectName'] . '_Messages.xml'); if ($params['mode'] == 'list') { $modeList = true; $titleText = $messageController->getMessageText('docservers_list', false, array(count($dataObjectList->{$params['objectName']}))); } elseif ($params['mode'] == 'create') { $modeCreate = true; $titleText = $messageController->getMessageText('docservers_create'); } elseif ($params['mode'] == 'read') { $modeRead = true; //$titleText = getLabel(_READ).' '.getLabel($objectLabel); $titleText = $messageController->getMessageText('docservers_read'); } elseif ($params['mode'] == 'update') { $modeUpdate = true; $titleText = $messageController->getMessageText('docservers_update'); } //make list or form $columnsLabels = $messageController->getTexts( $params['objectName'] . '.' ); if ($modeList) { /* just show the list */ $str_returnShow = $listContent; } elseif ($modeCreate) { $formButtons['add']['show'] = true; $formButtons['cancel']['show'] = true; $str_returnShow = makeForm($formFields, $formButtons, $dataObject, $schemaPath, $params, $noModeUri, $columnsLabels); } elseif ($modeRead) { foreach($formFields as $key => $value) { $formFields[$key]['readonly'] = true; } $formButtons['back']['show'] = true; $str_returnShow = makeForm($formFields, $formButtons, $dataObject, $schemaPath, $params, $noModeUri, $columnsLabels); } elseif ($modeUpdate) { $formFields['docserver_id']['readonly'] = true; $formButtons['save']['show'] = true; $formButtons['cancel']['show'] = true; $str_returnShow = makeForm($formFields, $formButtons, $dataObject, $schemaPath, $params, $noModeUri, $columnsLabels); } //default JS $str_defaultJs .= ''; ?>