fix: error in domain Pingconfig + default first column size
authorFelix Dörre <felix@dogcraft.de>
Tue, 24 Nov 2015 21:21:33 +0000 (22:21 +0100)
committerFelix Dörre <felix@dogcraft.de>
Tue, 24 Nov 2015 21:21:33 +0000 (22:21 +0100)
src/org/cacert/gigi/pages/account/domain/PingConfigForm.java
src/org/cacert/gigi/pages/account/domain/PingConfigForm.templ
static/static/default.css

index e18b7fb97c929cce0155f387bd27b4d5c415301b..9e8c0b027957bf8269c8c321295f5ddcff5cc2fe 100644 (file)
@@ -106,9 +106,13 @@ public class PingConfigForm extends Form {
 
     @Override
     public boolean submit(PrintWriter out, HttpServletRequest req) throws GigiApiException {
-        if (req.getParameter("emailType") != null) {
-            String mail = AUTHORATIVE_EMAILS[Integer.parseInt(req.getParameter("email"))];
-            target.addPing(DomainPingType.EMAIL, mail);
+        if (req.getParameter("emailType") != null && req.getParameter("email") != null) {
+            try {
+                String mail = AUTHORATIVE_EMAILS[Integer.parseInt(req.getParameter("email"))];
+                target.addPing(DomainPingType.EMAIL, mail);
+            } catch (NumberFormatException e) {
+                throw new GigiApiException("A email address is required");
+            }
         }
         if (req.getParameter("DNSType") != null) {
             target.addPing(DomainPingType.DNS, tokenName + ":" + tokenValue);
index 7a3c050c37b73a029118fe6d02a2c3e68bb46fce..7ad40a7d0edc4dc4ca84d8c376caa314e573ab92 100644 (file)
@@ -1,7 +1,7 @@
   <tr><th></th><th><?=_Verification mechanisms?></th></tr>
 
   <tr>
-    <td><input type="checkbox" name="emailType" value="y"<?=$!mail?>></td>
+    <td class='domainPinglogFirstCell'><input type="checkbox" name="emailType" value="y"<?=$!mail?>></td>
     <td><?=_Verify by sending an email to authoritative email addresses?> </td>
   </tr>
   <tr>
index 86c271b30ddfd56cf6ecd24690b9279fbda64eff..0e6b050643ddec2fbc266fb122a68549055dc07f 100644 (file)
@@ -818,4 +818,9 @@ pre.string{
 .loginbox label {width:100px;display:block;float:left;}
 .loginbox text {width:166px;display:block;float:left;}
 .loginbox br {clear:left;}
-.loginbox h1 {font-size:1.9em;text-align:center;}
\ No newline at end of file
+.loginbox h1 {font-size:1.9em;text-align:center;}
+
+
+.domainPinglogFirstCell{
+       width: 15px;
+}
\ No newline at end of file