Skip to content
This repository was archived by the owner on Jan 31, 2018. It is now read-only.

Commit c5909d1

Browse files
committed
[bug 925973] Disable next button if description empty
1 parent 99cc5ca commit c5909d1

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

fjord/base/static/css/mobile/base.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,8 @@ header {
108108
padding: 5px;
109109
width: 80%;
110110
}
111+
112+
.btn.submit:disabled {
113+
border-bottom: 2px solid #607755;
114+
.gradient(#a0aa88, #a0aa88, #708855);
115+
}

fjord/feedback/static/js/mobile/fxos_feedback.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ function init() {
8989
storageAddItem('device', $('#device select').val());
9090
});
9191

92+
$('#description').on('keyup', function() {
93+
if ($('#description').val() === '') {
94+
$('#description-next-btn').prop('disabled', true);
95+
} else {
96+
$('#description-next-btn').prop('disabled', false);
97+
}
98+
});
99+
92100
$('#email .email-ok input').on('change', function() {
93101
var on = $(this).is(':checked');
94102
$('#email .email').toggle(on);
@@ -197,6 +205,7 @@ function init() {
197205
xdeck.shuffleTo(numCards-1);
198206
});
199207
}
208+
$('#description-next-btn').prop('disabled', true);
200209
$('#email-ok').change();
201210
$('#email-error').hide();
202211
}

fjord/feedback/templates/feedback/mobile/fxos_feedback.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
sure not to include any personal information.
104104
{% endtrans %}
105105
</p>
106-
<button class="next btn submit">{{ _('Next') }}</button>
106+
<button id="description-next-btn" class="next btn submit">{{ _('Next') }}</button>
107107
</section>
108108
</x-card>
109109

0 commit comments

Comments
 (0)