aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2020-01-29 18:45:23 +0000
committerDave Arter <davea@mysociety.org>2020-02-26 15:25:31 +0000
commit351fc540d8a2a43563cddbc1a82a3331c7f3879f (patch)
treec8bb93e9cb4347468ba684900669bebcfa87e777 /templates
parent1c58ffa769b8f381bbddda062491bddb2fdd6608 (diff)
Add manifest icon management to admin forms
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/admin/manifesttheme/form.html29
1 files changed, 28 insertions, 1 deletions
diff --git a/templates/web/base/admin/manifesttheme/form.html b/templates/web/base/admin/manifesttheme/form.html
index 72a703ab2..13ed60e04 100644
--- a/templates/web/base/admin/manifesttheme/form.html
+++ b/templates/web/base/admin/manifesttheme/form.html
@@ -1,6 +1,6 @@
[% INCLUDE 'admin/header.html' title=loc('Theme') -%]
-<form method="post">
+<form method="post" enctype="multipart/form-data">
<div class="admin-hint">
<p>[% loc("The <strong>name</strong> is a string that represents the name of the web application as it is usually displayed to the user (e.g., amongst a list of other applications, or as a label for an icon).") %]</p>
</div>
@@ -25,6 +25,33 @@
[% form.field('cobrand').render | safe %]
[% END %]
+ <table>
+ <thead>
+ <tr>
+ <th>Icon</th>
+ <th>Size</th>
+ <th>Delete?</th>
+ </tr>
+ </thead>
+ <tbody>
+ [% FOREACH icon IN manifest_icons %]
+ <tr>
+ <td><img src="[% icon.src %]" /></td>
+ <td class="icon-size">[% icon.sizes %]</td>
+ <td><input type=checkbox name=delete_icon value='[% icon.src %]' /></td>
+ </tr>
+ [% END %]
+ <tr>
+ <td colspan=3>
+ <div class="admin-hint">
+ <p>[% loc("The <strong>icons</strong> are used when the application is installed to the user's home screen. Icons must be <strong>square</strong>, with <strong>512x512</strong>px and <strong>192x192</strong>px being the most common sizes.") %]</p>
+ </div>
+ [% form.field('icon').render | safe %]
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
<p>
<input class="btn" type="submit" name="submit" value="[% loc('Save changes') %]">
</p>