Fix visuals, output maxpoints
authorFelix Dörre <felix@dogcraft.de>
Sat, 28 Jun 2014 01:07:47 +0000 (03:07 +0200)
committerFelix Dörre <felix@dogcraft.de>
Sat, 28 Jun 2014 01:07:47 +0000 (03:07 +0200)
src/org/cacert/gigi/pages/wot/AssuranceForm.java
src/org/cacert/gigi/pages/wot/AssuranceForm.templ
src/org/cacert/gigi/pages/wot/AssurePage.java

index 498cd6ad7ed324844394c1963be85a44bed4b01b..b3546fb9a54f330dce38c771688e7db2388cf4d2 100644 (file)
@@ -36,6 +36,11 @@ public class AssuranceForm extends Form {
                HashMap<String, Object> res = new HashMap<String, Object>();
                res.putAll(vars);
                res.put("name", assuree.getName());
+               try {
+                       res.put("maxpoints", assuree.getMaxAssurePoints());
+               } catch (SQLException e) {
+                       e.printStackTrace();
+               }
                res.put("dob", sdf.format(assuree.getDob()));
                templ.output(out, l, res);
        }
index 61c09f54de8515f9cabc2a7dd0eb5666bc751df1..c3df60c6dfc62f9cece2349f191d680566941b2d 100644 (file)
@@ -46,7 +46,7 @@
        </tr>
        <tr>
                <td class="DataTD"><?=_Points?></td>
-               <td class="DataTD"><input type="text" name="points"><br/>(Max. 12394)</td>
+               <td class="DataTD"><input type="text" name="points"><br/>(Max. <?=$maxpoints?>)</td>
        </tr>
        <tr>
                <td class="DataTD" colspan="2">
index a59b0b14edc95483d36fa198afa21a09afabb47f..8862535c97aa6a6ffd404ae49e4c48c562bb8ee9 100644 (file)
@@ -1,6 +1,7 @@
 package org.cacert.gigi.pages.wot;
 
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.io.PrintWriter;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
@@ -27,6 +28,8 @@ public class AssurePage extends Page {
 
        public AssurePage() {
                super("Assure someone");
+               t = new Template(new InputStreamReader(
+                               AssuranceForm.class.getResourceAsStream("AssureeSearch.templ")));
 
        }