diff --git a/assets/admin.js b/assets/admin.js index b3869a2..27f2927 100644 --- a/assets/admin.js +++ b/assets/admin.js @@ -1158,14 +1158,22 @@ function sortTextVal(a, b) { // Print DIV //------------------------------------------ function printDiv(div) { -var divContents = document.getElementById(div).innerHTML; -var a = window.open('', '', ''); -a.document.write(''); -a.document.write(' '); -a.document.write(divContents); -a.document.write(''); -a.document.close(); -a.print(); + var divContents = document.getElementById(div).innerHTML; + var printWindow = window.open('', '', 'height=600,width=800'); + printWindow.document.write('Print'); + printWindow.document.write(''); + printWindow.document.write(''); + printWindow.document.write(divContents); + printWindow.document.write(''); + printWindow.document.close(); + printWindow.focus(); + printWindow.print(); + printWindow.close(); } //------------------------------------------ diff --git a/cartest.php b/cartest.php index 2c768c1..b1de7b5 100644 --- a/cartest.php +++ b/cartest.php @@ -129,41 +129,42 @@ $view .='
'; $view .= ''; -$view .= '
+ +//Retrieve questions and awnsers +if ($version == 0){ + $view .= '
'.$cartest_questions_text.'
'; - - //Retrieve questions and awnsers - - if ($version == 0){ - foreach ($cartest_questions as $key => $value){ - $view .= ' - - - '; - } - } else { - //CREATE OUTPUT BASED ON ARRAY - $view .= '
'; - foreach($arrayQuestions_cartest as $group){ - if ($group['Group_sequence'] == 1){ - $view .= ''.$group['Group'].''; - } else { - $view .= ''.$group['Group'].''; - } - } - $view .= '
'; + foreach ($cartest_questions as $key => $value){ + $view .= ' + + + '; + } + $view .= ' +
'.$key.''.((!empty($value)|| $value !='')?$value:$not_specified).'
'.$key.''.((!empty($value)|| $value !='')?$value:$not_specified).'
+
+
+ '; +} else { + //CREATE OUTPUT BASED ON ARRAY foreach($arrayQuestions_cartest as $group){ if ($group['Group_sequence'] == 1){ + $view .= '
+ '.$group['Group'].' +
'; $view .= '
'; } else { + $view .= ''; $view .= '
'; } @@ -197,14 +198,8 @@ $view .= '
} $view .= '
'; - } - - } - $view .= ' - -
-
- '; + } +} if (isset($cartest_datapoints) && $cartest_datapoints !=''){ $view .= '
diff --git a/cartest_manage.php b/cartest_manage.php index 6a7c375..ed7a1e7 100644 --- a/cartest_manage.php +++ b/cartest_manage.php @@ -242,17 +242,6 @@ $view .= '
'; //BUILD TO INPUT FORM BASED ON ARRAY // ------------------------------ -$view .= '
'; -foreach($arrayQuestions_cartest as $group){ - - if ($group['Group_sequence'] == 1){ - $view .= ''.$group['Group'].''; - } else { - $view .= ''.$group['Group'].''; - } -} -$view .= '
'; - foreach($arrayQuestions_cartest as $group){ if ($group['Group_sequence'] == 1){ diff --git a/equipments_mass_update.php b/equipments_mass_update.php index 500cf4f..13ff1f8 100644 --- a/equipments_mass_update.php +++ b/equipments_mass_update.php @@ -127,6 +127,27 @@ if ($update_allowed === 1){ } } +// Create success modal if update was completed +$success_modal = ''; +if ($update_allowed === 1 && isset($_POST['excel_data']) && $output_excel_display != ''){ + $success_modal = ' + '; +} + // Handle success messages if (isset($_GET['success_msg'])) { if ($_GET['success_msg'] == 1) { @@ -147,6 +168,12 @@ $view = ' '; +if ($update_allowed === 1){ + $print_btn_class = ($output_excel_display != '') ? 'btn' : 'btn alt'; + $view .= ''; + $view .= ''; +} + $view .= '
'; if (isset($success_msg)){ @@ -157,7 +184,7 @@ if (isset($success_msg)){
'; } -$view .= '
+$view .= '
'; @@ -170,80 +197,72 @@ $soldto_dropdown = listPartner('soldto',$_SESSION['permission'],'','yes'); $shipto_dropdown = listPartner('shipto',$_SESSION['permission'],'',''); $location_dropdown = listPartner('location',$_SESSION['permission'],'',''); -$view .='
+$view .='
- '.$mass_update_partners.' -
'; + +
+
'; // SHOW SALESID and SOLDTO ONLY TO ADMIN if ($_SESSION['permission'] == 3 || $_SESSION['permission'] == 4){ - $view .='
-

'.$general_salesid.'

-

'.$salesid_dropdown.'

+ $view .='
+ + '.$salesid_dropdown.'
-
-

'.$general_soldto.'

-

'.$soldto_dropdown.'

+
+ + '.$soldto_dropdown.'
'; } -$view .='
-

'.$general_shipto.'

-

'.$shipto_dropdown.'

+$view .='
+ + '.$shipto_dropdown.'
-
-

'.$general_location.'

-

'.$location_dropdown.'

+
+ + '.$location_dropdown.'
- -
'; +
+ + +
+
+ + +
+
+
+ +
+
+ +
+
+ + -$view .= '
-
- '.$mass_update_input.' -
-
-

-
-
- -
-
-

-
-
- -
-
-

'.$paste_excel_h3.'

-

-
- -
- " onclick="return confirm(\''.$mass_update_confirm_message.'\')" class="btn"> - '; -$view .=' +
-'; +
'; $view .= ''; $view .= '
'; if ($update_allowed === 1){ - $view .= '
-
- '.$tab3.' '.$total_summary.' - -
+ $view .= ' +