chg: extract url to links.txt
authorINOPIAE <m.maengel@inopiae.de>
Thu, 1 Feb 2018 22:02:57 +0000 (23:02 +0100)
committerINOPIAE <m.maengel@inopiae.de>
Tue, 6 Feb 2018 11:36:07 +0000 (12:36 +0100)
fixes issue #26

Change-Id: I8c5521bf3daaf203b390f2059a0cafb56c79c028

links.txt
src/club/wpia/gigi/pages/orga/CreateOrgForm.templ
src/club/wpia/gigi/pages/orga/CreateOrgPage.java
src/club/wpia/gigi/pages/orga/ViewOrgPage.java

index e68f4e9..ec99a4d 100644 (file)
--- a/links.txt
+++ b/links.txt
@@ -15,3 +15,4 @@
 /ttp/country
 /blog
 /imprint
+/isocode http://www.iso.org/iso/home/standards/country_codes/iso-3166-1_decoding_table.htm
index 7fdd98d..865f8dd 100644 (file)
@@ -28,7 +28,7 @@
     <td><?=_Country?>:</td>
     <td>
       <?=$C?>
-      <?=_(2 letter !'<a href="http://www.iso.org/iso/home/standards/country_codes/iso-3166-1_decoding_table.htm">'ISO code!'</a>')?>
+      <?=_(2 letter !(/isocode)ISO code!'</a>')?>
     </td>
   </tr>
   <? if($edit) { ?>
index 4eab3d6..98076fe 100644 (file)
@@ -1,7 +1,6 @@
 package club.wpia.gigi.pages.orga;
 
 import java.io.IOException;
-import java.util.HashMap;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -27,6 +26,6 @@ public class CreateOrgPage extends ManagedFormPage {
 
     @Override
     public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
-        new CreateOrgForm(req).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
+        new CreateOrgForm(req).output(resp.getWriter(), getLanguage(req), getDefaultVars(req));
     }
 }
index d676c1d..909f9ef 100644 (file)
@@ -13,11 +13,12 @@ import club.wpia.gigi.dbObjects.Organisation;
 import club.wpia.gigi.dbObjects.User;
 import club.wpia.gigi.localisation.Language;
 import club.wpia.gigi.output.template.Form;
+import club.wpia.gigi.output.template.Form.CSRFException;
 import club.wpia.gigi.output.template.IterableDataset;
 import club.wpia.gigi.output.template.Template;
-import club.wpia.gigi.output.template.Form.CSRFException;
 import club.wpia.gigi.pages.LoginPage;
 import club.wpia.gigi.pages.ManagedMultiFormPage;
+import club.wpia.gigi.pages.Page;
 import club.wpia.gigi.pages.account.domain.DomainManagementForm;
 import club.wpia.gigi.util.AuthorizationContext;
 
@@ -91,7 +92,7 @@ public class ViewOrgPage extends ManagedMultiFormPage {
             resp.sendError(404);
             return;
         }
-        HashMap<String, Object> vars = new HashMap<>();
+        Map<String, Object> vars = Page.getDefaultVars(req);
         if (orgAss) {
             vars.put("editForm", new CreateOrgForm(req, o));
             vars.put("affForm", new AffiliationForm(req, o));