summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/model/common.mod.php10
-rw-r--r--app/view/common/setting.modal.view.php2
2 files changed, 11 insertions, 1 deletions
diff --git a/app/model/common.mod.php b/app/model/common.mod.php
index 080c78e..32bdb44 100644
--- a/app/model/common.mod.php
+++ b/app/model/common.mod.php
@@ -79,6 +79,16 @@ class CommonModel extends MasterModel
return;
}
+ if (isset($input['rmImage']))
+ {
+ if ($user->rmHeadImage())
+ $this->logNotice("Image removed");
+ else
+ $this->logError("Error removing user image");
+
+ return;
+ }
+
if ($form->setPasswd)
{
if ($user->validatePassword($form->curPasswd))
diff --git a/app/view/common/setting.modal.view.php b/app/view/common/setting.modal.view.php
index 369a789..60063cf 100644
--- a/app/view/common/setting.modal.view.php
+++ b/app/view/common/setting.modal.view.php
@@ -56,7 +56,7 @@
<span class="glyphicon glyphicon-camera"></span> Upload new image
</button>
<br />
- <button type="button" class="btn btn-danger btn-xs">
+ <button type="submit" name="input[rmImage]" class="btn btn-danger btn-xs" onclick="return assertConfirm()">
<span class="glyphicon glyphicon-remove"></span> Remove image
</button>
</div>