Explorar o código

Added Think 21 or Think 25 field.

Alan Lam %!s(int64=8) %!d(string=hai) anos
pai
achega
2eba8dc37b
Modificáronse 2 ficheiros con 15 adicións e 3 borrados
  1. 8 3
      controllers/test_pdf.php
  2. 7 0
      json/bacta.json

+ 8 - 3
controllers/test_pdf.php

@@ -330,7 +330,12 @@ $pdf->SetX($pdf->GetX() + 5);
 $pdf->Cell($value_width, $cell_height, $values["play_spent"] ?? "N/A", 0, 1);
 $pdf->Cell($value_width, $cell_height, $values["play_spent"] ?? "N/A", 0, 1);
 $pdf->Line($pdf->GetX(), $pdf->GetY(), $pdf->GetX() + 92.5, $pdf->GetY());
 $pdf->Line($pdf->GetX(), $pdf->GetY(), $pdf->GetX() + 92.5, $pdf->GetY());
 
 
-$value = $values["citizen_card_brochure_displayed"];
+$pdf->Cell($field_width, $cell_height, "Think 21/25:", 0, 0);
+$pdf->SetX($pdf->GetX() + 5);
+$pdf->Cell($value_width, $cell_height, $values["think_21_25"] ?? "N/A", 0, 1);
+$pdf->Line($pdf->GetX(), $pdf->GetY(), $pdf->GetX() + 92.5, $pdf->GetY());
+
+$value = $values["citizen_card_brochure_displayed"] ?? "";
 if(strlen($value) > 0) $value = $value ? "Yes" : "No";
 if(strlen($value) > 0) $value = $value ? "Yes" : "No";
 
 
 $pdf->Cell($field_width, $cell_height, "Citizen Card Brochure Displayed:", 0, 0);
 $pdf->Cell($field_width, $cell_height, "Citizen Card Brochure Displayed:", 0, 0);
@@ -338,7 +343,7 @@ $pdf->SetX($pdf->GetX() + 5);
 $pdf->Cell($value_width, $cell_height, $value ?? "N/A", 0, 1);
 $pdf->Cell($value_width, $cell_height, $value ?? "N/A", 0, 1);
 $pdf->Line($pdf->GetX(), $pdf->GetY(), $pdf->GetX() + 92.5, $pdf->GetY());
 $pdf->Line($pdf->GetX(), $pdf->GetY(), $pdf->GetX() + 92.5, $pdf->GetY());
 
 
-$value = $values["think_21_badge"];
+$value = $values["think_21_badge"] ?? "";
 if(strlen($value) > 0) $value = $value ? "Yes" : "No";
 if(strlen($value) > 0) $value = $value ? "Yes" : "No";
 
 
 $pdf->Cell($field_width, $cell_height, "Think 21 Badge Worn by Staff:", 0, 0);
 $pdf->Cell($field_width, $cell_height, "Think 21 Badge Worn by Staff:", 0, 0);
@@ -346,7 +351,7 @@ $pdf->SetX($pdf->GetX() + 5);
 $pdf->Cell($value_width, $cell_height, $value ?? "N/A", 0, 1);
 $pdf->Cell($value_width, $cell_height, $value ?? "N/A", 0, 1);
 $pdf->Line($pdf->GetX(), $pdf->GetY(), $pdf->GetX() + 92.5, $pdf->GetY());
 $pdf->Line($pdf->GetX(), $pdf->GetY(), $pdf->GetX() + 92.5, $pdf->GetY());
 
 
-$value = $values["think_21_poster"];
+$value = $values["think_21_poster"] ?? "";
 if(strlen($value) > 0) $value = $value ? "Yes" : "No";
 if(strlen($value) > 0) $value = $value ? "Yes" : "No";
 
 
 $pdf->Cell($field_width, $cell_height, "Think 21 Posters Displayed:", 0, 0);
 $pdf->Cell($field_width, $cell_height, "Think 21 Posters Displayed:", 0, 0);

+ 7 - 0
json/bacta.json

@@ -141,6 +141,13 @@
 			"values": ["", "0", "1"],
 			"values": ["", "0", "1"],
 			"displayStrings": ["Don't know", "No", "Yes"]
 			"displayStrings": ["Don't know", "No", "Yes"]
 		},
 		},
+		{
+			"type": "dropdown",
+			"name": "think_21_25",
+			"label": "Think 21 or Think 25",
+			"values": ["", "Think 21", "Think 25"],
+			"displayStrings": ["Don't know", "Think 21", "Think 25"]
+		},
 		{
 		{
 			"type": "dropdown",
 			"type": "dropdown",
 			"name": "think_21_badge",
 			"name": "think_21_badge",