challenge: small tweaks on descriptions

This commit is contained in:
Tyler Renelle
2013-10-31 14:16:01 -07:00
parent d5e78266e5
commit 4a442d924e
2 changed files with 3 additions and 4 deletions

View File

@@ -109,6 +109,7 @@ api.get = function(req, res) {
api.create = function(req, res){
var user = res.locals.user;
var waterfall = [];
if (+req.body.prize < 0) return res.json(401, {err: 'Challenge prize must be >= 0'});
if (+req.body.prize > 0) {
var net = 0;
waterfall = [

View File

@@ -20,10 +20,9 @@ script(type='text/ng-template', id='partials/options.challenges.detail.html')
.-options
input.option-content(type='text', ng-model='challenge.name')
textarea.option-content(cols='3', placeholder='Description', ng-model='challenge.description')
// <input type=number class='option-content' placeholder='Gems Prize' value={@challenge.prize} />
hr
div(ng-if='challenge.description') {{challenge.description}}
.well(ng-if='challenge.description') {{challenge.description}}
habitrpg-tasks(obj='challenge', main=false)
h3 Statistics
div(ng-repeat='member in challenge.members', ng-init='member._locked = true; obj=member')
@@ -65,8 +64,7 @@ script(type='text/ng-template', id='partials/options.challenges.html')
.option-group.option-medium
input.option-content(type='number', min="0", max="{{maxPrize}}", ng-model='newChallenge.prize', placeholder='Prize')
span.input-suffix.Pet_Currency_Gem1x.inline-gems
i.icon-question-sign(popover="If someone can 'win' your challenge, you can optionally award that winner a Gem prize. Min = 0, Max = the number of gems you own. If you created the guild for this challenge, Max += Guild.balance", popover-trigger='mouseenter', popover-placement='right')
i.icon-question-sign(popover="If someone can 'win' your challenge, you can optionally award that winner a Gem prize. Max = #gems you own (+ guild.gems, if you created this challenge's guild). Note: This prize can't be changed later.", popover-trigger='mouseenter', popover-placement='right')
habitrpg-tasks(main=false, obj='newChallenge')