From 7502dc0689ca5689b9dfdc6171b1f9044f938d3c Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Sat, 24 Jan 2015 18:33:00 -0500 Subject: [PATCH] Allowing user to delete attempted username input from bonfire challenges completion modal --- views/bonfire/show.jade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bonfire/show.jade b/views/bonfire/show.jade index 39bf14d496..9100cd6575 100644 --- a/views/bonfire/show.jade +++ b/views/bonfire/show.jade @@ -70,12 +70,12 @@ block content input.form-control(ng-show="false") span.input-group-addon @ input.form-control#completed-with(name="existingUser", placeholder='Otherwise just leave it blank', existing-username='', ng-model="existingUser", autofocus) - .col-xs-10.col-xs-offset-1.col-sm-8.col-sm-offset-2.col-md-8.col-md-offset-2(ng-show="completedWithForm.$error.exists && !completedWithForm.existingUser.$pristine") + .col-xs-10.col-xs-offset-1.col-sm-8.col-sm-offset-2.col-md-8.col-md-offset-2(ng-show="completedWithForm.$error.exists && !completedWithForm.existingUser.$pristine && existingUser.length > 0") alert(type='danger') span.ion-close-circled | Username not found - a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block.next-bonfire-button(name='_csrf', value=_csrf, aria-hidden='true', ng-disabled='completedWithForm.$invalid') Take me to my next challenge + a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block.next-bonfire-button(name='_csrf', value=_csrf, aria-hidden='true', ng-disabled='completedWithForm.$invalid && existingUser.length > 0') Take me to my next challenge - if (points && points > 2)