| '.$indicators.' |
'.$response->serialnumber.' |
'.$$status_text.' |
- '.$response->productcode.'-'.$response->productname.' | ';
+ '.$response->productcode.'-'.(${$response->productname} ?? $response->productname).' | ';
$view .= ' ';
if (!empty($picture)){
$view .='
diff --git a/rma.php b/rma.php
index 361d6ec..51faed7 100644
--- a/rma.php
+++ b/rma.php
@@ -107,7 +107,7 @@ $view .= '
'.$equipment_label10.'
diff --git a/rma_manage.php b/rma_manage.php
index c6fbbd1..d642eb2 100644
--- a/rma_manage.php
+++ b/rma_manage.php
@@ -264,7 +264,7 @@ $view .= '
'.$equipment_label10.'
@@ -289,7 +289,7 @@ $view .= '
-
+
';
diff --git a/settings/settingsmenu.php b/settings/settingsmenu.php
index ff4aaa1..a296a84 100644
--- a/settings/settingsmenu.php
+++ b/settings/settingsmenu.php
@@ -13,7 +13,7 @@ $main_menu = array ('dashboard','sales','buildtool','cartests','marketing','equi
//Sub menus
$equipments_sub = array('equipments','servicereports','rmas','histories','firmwaretool','equipments_mass_update');
$sales_sub = array('accounts','contracts');
-$products_sub = array('products','attributes');
+$products_sub = array('products','products_attributes');
$admin_sub = array('users','communications','partners');
$reporting_sub = array('report_build','report_contracts_billing','report_healthindex','report_usage');
$settings_sub = array('config','translations','logfile','maintenance','profiles');
@@ -68,7 +68,7 @@ $urls = array(
"icon" => "fas fa-box-open",
"name" => "menu_products"
),
- "attributes" => array(
+ "products_attributes" => array(
"url" => "products_attributes",
"selected" => "products_attributes",
"icon" => "fas fa-box-open",
diff --git a/settings/settingsprofiles.php b/settings/settingsprofiles.php
index ec2c942..c98b44b 100644
--- a/settings/settingsprofiles.php
+++ b/settings/settingsprofiles.php
@@ -4,9 +4,9 @@ define('standard_profile','dashboard,profile,equipments,equipment,histories,hist
/*Superuser*/
define('superuser_profile','dashboard,profile,assets,equipments,equipment,equipment_manage,equipment_manage_edit,equipments_mass_update,histories,history,history_manage,firmwaretool,products,products_versions,products_software,product,product_manage,servicereports,servicereport,admin,partners,partner,users,user,user_manage,marketing,application');
/*Admin*/
-define('admin_profile','dashboard,profile,buildtool,sales,accounts,account,contracts,contract,contract_manage,cartests,cartest,cartest_manage,assets,equipments,equipment,equipment_healthindex,equipment_data,equipment_manage,equipment_manage_edit,equipments_mass_update,histories,history,history_manage,firmwaretool,buildtool,products,products_versions,products_software,product,product_manage,servicereports,servicereport,admin,partners,partner,users,user,user_manage,communications,communication,communication_send,marketing,reporting,report_build,report_contracts_billing,report_healthindex,changelog,application');
+define('admin_profile','dashboard,profile,buildtool,sales,accounts,account,contracts,contract,contract_manage,cartests,cartest,cartest_manage,assets,equipments,equipment,equipment_healthindex,equipment_data,equipment_manage,equipment_manage_edit,equipments_mass_update,histories,history,history_manage,firmwaretool,rmas,rma,rma_manage,rma_history,rma_history_manage,buildtool,products,products_versions,products_software,product,product_manage,servicereports,servicereport,admin,partners,partner,users,user,user_manage,communications,communication,communication_send,marketing,reporting,report_build,report_contracts_billing,report_healthindex,changelog,application');
/*AdminPlus*/
-define('adminplus_profile','dashboard,profile,buildtool,sales,accounts,account,contracts,contract,contract_manage,billing,cartests,cartest,cartest_manage,assets,equipments,equipment,equipment_healthindex,equipment_data,equipment_manage,equipment_manage_edit,equipments_mass_update,histories,history,history_manage,firmwaretool,rmas,rma,rma_manage,rma_history,rma_history_manage,buildtool,products,products_versions,products_software,product,product_manage,servicereports,servicereport,admin,partners,partner,users,user,user_manage,communications,communication,communication_send,marketing,reporting,report_build,report_contracts_billing,report_healthindex,report_usage,config,settings,logfile,changelog,language,translations,translations_details,translation_manage,application,maintenance,profiles,vin');
+define('adminplus_profile','dashboard,profile,buildtool,sales,accounts,account,contracts,contract,contract_manage,billing,cartests,cartest,cartest_manage,assets,equipments,equipment,equipment_healthindex,equipment_data,equipment_manage,equipment_manage_edit,equipments_mass_update,histories,history,history_manage,firmwaretool,rmas,rma,rma_manage,rma_history,rma_history_manage,buildtool,products,products_versions,products_software,products_attributes,products_attributes_items,products_attributes_manage,product,product_manage,servicereports,servicereport,admin,partners,partner,users,user,user_manage,communications,communication,communication_send,marketing,reporting,report_build,report_contracts_billing,report_healthindex,report_usage,config,settings,logfile,changelog,language,translations,translations_details,translation_manage,application,maintenance,profiles,vin');
/*Build*/
define('build','dashboard,profile,buildtool,firmwaretool,buildtool,products_software,application');
/*Distribution*/
diff --git a/settings/settingsviews.php b/settings/settingsviews.php
index b569625..f23c708 100644
--- a/settings/settingsviews.php
+++ b/settings/settingsviews.php
@@ -39,6 +39,7 @@ $all_views = [
"products_versions",
"products_software",
"products_attributes",
+ "products_attributes_items",
"products_attributes_manage",
"product",
"product_manage",
diff --git a/translation_manage.php b/translation_manage.php
index 07ac8b0..e7d46c6 100644
--- a/translation_manage.php
+++ b/translation_manage.php
@@ -2,12 +2,12 @@
defined(page_security_key) or exit;
$page = 'translation_manage';
-/*Check if allowed
+//Check if allowed
if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
header('location: index.php');
exit;
}
-*/
+
//PAGE Security
$update_allowed = isAllowed($page ,$_SESSION['profile'],$_SESSION['permission'],'U');
@@ -56,7 +56,7 @@ if (isset($_GET['rowID'])) {
}
}
- if (isset($_POST['update']) || isset($_POST['add'])) {
+ if (isset($_POST['add'])) {
//GET ALL POST DATA
$payload = json_encode($_POST, JSON_UNESCAPED_UNICODE);
@@ -66,11 +66,42 @@ if (isset($_GET['rowID'])) {
if ($responses === 'NOK'){
} else {
- header('Location: index.php?page=translation_manage&rowID='.$_GET['rowID'].'');
+ generateLanguageFile($_POST['language_key'],$_SESSION['userkey']);
+ header('Location: index.php?page=translation_manage&rowID='.$_GET['rowID'].'');
exit;
}
}
+ if (isset($_POST['update']) && isset($_POST['item'])) {
+ //Indicator if update has errors
+ $NOK_error = 0;
+
+ //RUN through all POST items
+ foreach ($_POST['item'] as $attr){
+
+ //GET ALL POST DATA
+ $payload = json_encode($attr, JSON_UNESCAPED_UNICODE);
+
+ //API call
+ $responses = ioServer('/v2/translations_details', $payload);
+
+ if ($responses === 'NOK'){
+ //NOT correct exit procedure
+ $NOK_error++;
+ exit;
+ } else {
+ $attr_language = $attr['language_key'];
+ }
+ }
+
+ if ($NOK_error == 0){
+ //NO errors generatelanguagefile
+ generateLanguageFile($attr_language,$_SESSION['userkey']);
+ }
+
+ header('Location: index.php?page=translation_manage&rowID='.$_GET['rowID'].'');
+ exit;
+ }
}
if ($delete_allowed === 1){
@@ -207,16 +238,16 @@ $view .= '
|
- |
- |
+ |
'.getRelativeTime($translation['created']).' |
|
-
-
+
+
';
}
@@ -248,42 +279,6 @@ $view .= '
tbody.appendChild(newRow);
}
-
- function addRow() {
- // Get reference to the table body
- const tbody = document.querySelector(\'#textTable tbody\');
- console.log("test");
-
- // Create new row
- const newRow = document.createElement(\'tr\');
-
- // Create three cells for the row
- const oneCell = document.createElement(\'td\');
- const twoCell = document.createElement(\'td\');
- const threeCell = document.createElement(\'td\');
- const fourCell = document.createElement(\'td\');
-
- // Add content to cells
- oneCell.innerHTML = \'\'
- // Append cells to the row
- newRow.appendChild(oneCell);
- newRow.appendChild(twoCell);
- newRow.appendChild(threeCell);
- newRow.appendChild(fourCell);
-
-
- // Append row to table body
- tbody.appendChild(newRow);
-
- // Increment counter for next row
- rowCounter++;
- }
diff --git a/translations.php b/translations.php
index d885978..bc7977f 100644
--- a/translations.php
+++ b/translations.php
@@ -14,12 +14,11 @@ include_once './settings/settings.php';
$prev_page = $_SESSION['prev_origin'] ?? '';
$page = $_SESSION['origin'] = 'translations';
-/*Check if allowed
+//Check if allowed
if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
header('location: index.php');
exit;
}
-*/
//GET PARAMETERS
$pagination_page = isset($_GET['p']) ? $_GET['p'] : 1;
|