From e202fb650c8ceef264bb22cbd14c807437d34158 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Mon, 10 Feb 2020 08:35:31 +0000 Subject: [PATCH] Disable the new fields if editing JO form. #324 --- templates/job-order/form.html.twig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/job-order/form.html.twig b/templates/job-order/form.html.twig index f2f57dbb..a0e5985c 100644 --- a/templates/job-order/form.html.twig +++ b/templates/job-order/form.html.twig @@ -1066,6 +1066,14 @@ $(function() { {% endfor %} {% endif %} + // disable the enabled customer fields + {% if mode != 'create' %} + $("#customer-email").prop("disabled", true); + $("#flag-dpa-consent").prop("disabled", true); + $("#flag-promo-sms").prop("disabled", true); + $("#flag-promo-email").prop("disabled", true); + {% endif %} + $("#row-form").submit(function(e) { if (form_in_process) { alert("Cannot submit form twice. First submission still in progress.");