diff options
author | canyonknight <canyonknight@gmail.com> | 2013-09-06 02:13:42 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2013-09-08 13:53:47 +0200 |
commit | dbf1d474f7eba3dd0911aa47626e58ccf8057a52 (patch) | |
tree | 4a9af5087e0c296fb6857bf9bab4589023d91cf2 /web/template/pkg_details.php | |
parent | 77f1b264ca0d2d4da8e4e2bb214c1c8f15fafcb4 (diff) | |
download | aur-dbf1d474f7eba3dd0911aa47626e58ccf8057a52.tar.gz aur-dbf1d474f7eba3dd0911aa47626e58ccf8057a52.tar.xz |
Convert adopt/disown package action link to form
* Changes adopting/disowning packages to use GET instead of POST
* Uses CSS to make form submit button look like a link
* Complements commit 3bc951e3d87eaf692a7e47cf16a28d838c7cb2bd
Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/template/pkg_details.php')
-rw-r--r-- | web/template/pkg_details.php | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 0484924f..bc20a220 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -89,24 +89,24 @@ $sources = package_sources($row["ID"]); <li><a href="<?= get_pkg_uri($row['Name']) . 'merge/'; ?>"><?= __('Merge Package'); ?></a></li> <?php endif; ?> <?php endif; ?> + + <?php if ($uid && $row["MaintainerUID"] === NULL): ?> + <li> + <form action="<?= get_pkg_uri($row['Name']) . 'adopt/'; ?>" method="post"> + <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" /> + <input type="submit" class="button text-button" name="do_Adopt" value="<?= __('Adopt Package') ?>" /> + </form> + </li> + <?php elseif ($uid && $uid == $row["MaintainerUID"] || + $atype == "Trusted User" || $atype == "Developer"): ?> + <li> + <form action="<?= get_pkg_uri($row['Name']) . 'disown/'; ?>" method="post"> + <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" /> + <input type="submit" class="button text-button" name="do_Disown" value="<?= __('Disown Package') ?>" /> + </form> + </li> + <?php endif; ?> </ul> - <?php if ($uid): ?> - <form action="<?= htmlspecialchars(get_pkg_uri($row['Name']), ENT_QUOTES); ?>" method="post"> - <div> - <input type="hidden" name="IDs[<?= $row['ID'] ?>]" value="1" /> - <input type="hidden" name="ID" value="<?= $row['ID'] ?>" /> - <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" /> - </div> - <p> - <?php if ($row["MaintainerUID"] === NULL): ?> - <input type="submit" class="button" name="do_Adopt" value="<?= __("Adopt Package") ?>" /> - <?php elseif ($uid == $row["MaintainerUID"] || - $atype == "Trusted User" || $atype == "Developer"): ?> - <input type="submit" class="button" name="do_Disown" value="<?= __("Disown Package") ?>" /> - <?php endif; ?> - </p> - </form> - <?php endif; ?> </div> </div> |