Skip to content

Node.js based forum software built for the modern web

rewards acp - ability to set amount of times a user can claim reward

psychobunnybb35950a5a65
diff --git a/public/less/admin/extend/rewards.less b/public/less/admin/extend/rewards.less
index cf62159695..2dc84b5bc3 100644
--- a/public/less/admin/extend/rewards.less
+++ b/public/less/admin/extend/rewards.less
@@ -1,5 +1,5 @@
#rewards {
- .well {
+ .well, .panel-body {
vertical-align: top;
min-height: 100px;
diff --git a/public/src/admin/extend/rewards.js b/public/src/admin/extend/rewards.js
index cff8f7f74e..9a5f6327b8 100644
--- a/public/src/admin/extend/rewards.js
+++ b/public/src/admin/extend/rewards.js
@@ -135,11 +135,12 @@ define('admin/extend/rewards', function() {
active: [{
id: id ? parseInt(id, 10) + 1 : 0,
disabled: true,
- value: ''
+ value: '',
+ claimable: 1
}],
conditions: conditions,
conditionals: conditionals,
- rewards: available
+ rewards: available,
};
templates.parse('admin/extend/rewards', 'active', data, function(li) {
diff --git a/src/views/admin/extend/rewards.tpl b/src/views/admin/extend/rewards.tpl
index 87129fe3c7..29bf0b8288 100644
--- a/src/views/admin/extend/rewards.tpl
+++ b/src/views/admin/extend/rewards.tpl
@@ -37,14 +37,24 @@
<form class="rewards inline-block">
<div class="inputs well inline-block"></div>
</form>
+ <div class="clearfix"></div>
- <div class="well inline-block pull-right">
- <button class="btn btn-danger delete">Delete</button>
- <!-- IF active.disabled -->
- <button class="btn btn-success toggle">Enable</button>
- <!-- ELSE -->
- <button class="btn btn-warning toggle">Disable</button>
- <!-- ENDIF active.disabled -->
+ <div class="pull-right">
+ <div class="panel-body inline-block">
+ <form class="main">
+ <label for="claimable">Amount of times reward is claimable</label><br />
+ <input type="text" name="claimable" value="{active.claimable}" placeholder="1" />
+ <small>Enter 0 for infinite</small>
+ </form>
+ </div>
+ <div class="panel-body inline-block">
+ <button class="btn btn-danger delete">Delete</button>
+ <!-- IF active.disabled -->
+ <button class="btn btn-success toggle">Enable</button>
+ <!-- ELSE -->
+ <button class="btn btn-warning toggle">Disable</button>
+ <!-- ENDIF active.disabled -->
+ </div>
</div>
<div class="clearfix"></div>
</li>