From b429c30d3b74d54393207b038802166bed79766e Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 16 Apr 2014 11:02:44 -0500 Subject: [PATCH] if user submits outfits#new name form with no name, use the fallback job --- app/assets/javascripts/outfits/new.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/assets/javascripts/outfits/new.js b/app/assets/javascripts/outfits/new.js index 46bd7b33..90fe4498 100644 --- a/app/assets/javascripts/outfits/new.js +++ b/app/assets/javascripts/outfits/new.js @@ -236,6 +236,13 @@ $(function () { el.text(text).show(); } } + + $('#load-pet-to-wardrobe').submit(function(e) { + if (name_el.val() === "" && Preview.Job.current) { + e.preventDefault(); + Preview.Job.current.visit(); + } + }); }); function addDisqusCount() {