]> WPIA git - gigi.git/commitdiff
fix: adjust output to show delete button correct
authorINOPIAE <m.maengel@inopiae.de>
Mon, 23 Sep 2019 04:21:17 +0000 (06:21 +0200)
committerINOPIAE <m.maengel@inopiae.de>
Mon, 23 Sep 2019 15:06:03 +0000 (17:06 +0200)
Change-Id: I708e9cda67d33a7a35b414b8d74a3d7ab204608d

src/club/wpia/gigi/pages/orga/AffiliationForm.java
src/club/wpia/gigi/pages/orga/AffiliationForm.templ

index 1fd1c010ff09eb102f23263aba1a610500e06638..c99486277eaf6609d8abfc4969fddf21f19d7df2 100644 (file)
@@ -8,6 +8,7 @@ import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 
 import club.wpia.gigi.GigiApiException;
+import club.wpia.gigi.dbObjects.Name;
 import club.wpia.gigi.dbObjects.Organisation;
 import club.wpia.gigi.dbObjects.Organisation.Affiliation;
 import club.wpia.gigi.dbObjects.User;
@@ -64,7 +65,9 @@ public class AffiliationForm extends Form {
                     return false;
                 }
                 Affiliation aff = iter.next();
-                vars.put("name", aff.getTarget().getPreferredName());
+                Name n = aff.getTarget().getPreferredName();
+                vars.put("name", n);
+                vars.put("nameString", n.toString());
                 vars.put("master", aff.isMaster() ? l.getTranslation("Master") : "");
                 vars.put("e-mail", aff.getTarget().getEmail());
                 return true;
index de3969b05c160b93f2616c2b560e5b47162e5b11..5d204b47b95dc2641e474267fac348bb47d98aa4 100644 (file)
@@ -10,7 +10,8 @@
     <td><?=$name?></td>
     <td><?=$e-mail?></td>
     <td><?=$master?></td>
-    <td><button class="btn btn-warning btn-confirm" data-confirm="<?=_Do you really want to delete the affiliation of ${name} (${e-mail}) to this organisation??>" data-reply="<?=_Cancel?>,<?=_Delete?>" type="submit" name="del" value="<?=$e-mail?>">X</button> </td>
+    <td><button class="btn btn-warning btn-confirm" data-confirm="<?=_Do you really want to delete the affiliation of ${nameString} (${e-mail}) to this organisation??>" data-reply="<?=_Cancel?>,<?=_Delete?>" type="submit" name="del" value="<?=$e-mail?>">X</button>
+    </td>
   </tr>
 <? } ?>
   <tr>