summaryrefslogtreecommitdiff
path: root/app/Template
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-07 22:56:03 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-07 22:56:03 -0400
commit06dd98afe870c650ce98358bba5214f1e8b5028a (patch)
tree20f739009dd57864b64ef37203042b55890cad75 /app/Template
parentf8a1e454b547d3157b3bc91987966d3a19b0dd14 (diff)
Improve avatar upload form
Diffstat (limited to 'app/Template')
-rw-r--r--app/Template/avatar_file/show.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/app/Template/avatar_file/show.php b/app/Template/avatar_file/show.php
index 266a2ccb..9f19a1ab 100644
--- a/app/Template/avatar_file/show.php
+++ b/app/Template/avatar_file/show.php
@@ -4,17 +4,20 @@
<?= $this->avatar->render($user['id'], $user['username'], $user['name'], $user['email'], $user['avatar_path'], '') ?>
+<div class="form-actions">
+<?php if (! empty($user['avatar_path'])): ?>
+ <?= $this->url->link(t('Remove my image'), 'AvatarFile', 'remove', array('user_id' => $user['id']), true, 'btn btn-red') ?>
+<?php endif ?>
+</div>
+
+<hr>
+
+<h3><?= t('Upload my avatar image') ?></h3>
<form method="post" enctype="multipart/form-data" action="<?= $this->url->href('AvatarFile', 'upload', array('user_id' => $user['id'])) ?>">
<?= $this->form->csrf() ?>
- <?= $this->form->label(t('Upload my avatar image'), 'avatar') ?>
<?= $this->form->file('avatar') ?>
<div class="form-actions">
- <?php if (! empty($user['avatar_path'])): ?>
- <?= $this->url->link(t('Remove my image'), 'AvatarFile', 'remove', array('user_id' => $user['id']), true, 'btn btn-red') ?>
- <?php endif ?>
- <button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
- <?= t('or') ?>
- <?= $this->url->link(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?>
+ <button type="submit" class="btn btn-blue"><?= t('Upload my avatar image') ?></button>
</div>
</form>