From 4f62a7c9e13ce24ddafab81c11aa7e033c5e2347 Mon Sep 17 00:00:00 2001 From: Evan Morikawa Date: Thu, 11 Jun 2015 11:54:23 -0700 Subject: [PATCH] feat(salesforce): can convert a Lead to a Contact Summary: In order to create a Contact from a Lead you need to: 1. Create an Account 2. Create an Opportunity and link it to the newly created Account 3. Create a Contact and link it to the Account 4. Create an OpportunityContactRole and link it to both a Contact and an Opportunity Working on passing pending object ids around add in window openers create lead and check if lead got deleted Saving form conversion workflow syncs with opportunities now Test Plan: manual Reviewers: bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D1599 --- src/browser/window-manager.coffee | 20 ++++++++++++++++++++ src/components/generated-form.cjsx | 23 ++++++++++++++--------- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/browser/window-manager.coffee b/src/browser/window-manager.coffee index 1e910f94a..5a857e226 100644 --- a/src/browser/window-manager.coffee +++ b/src/browser/window-manager.coffee @@ -268,9 +268,12 @@ class WindowManager return @newColdWindow(options) supportedHotWindowKeys = [ + "x" + "y" "title" "width" "height" + "bounds" "windowType" "windowProps" ] @@ -293,6 +296,23 @@ class WindowManager win.setLoadSettings(newLoadSettings) win.showWhenLoaded() + win.browserWindow.setTitle options.title ? "" + + if options.x and options.y + win.browserWindow.setPosition options.x, options.w + + if options.width or options.height + [w,h] = win.browserWindow.getSize() + w = options.width ? w + h = options.height ? h + win.browserWindow.setSize(w,h) + + console.log JSON.stringify(options) + if options.bounds + console.log "------------- SETTING BOUNDS" + console.log JSON.stringify(options.bounds) + win.browserWindow.setBounds options.bounds + @_replenishHotWindows() return win diff --git a/src/components/generated-form.cjsx b/src/components/generated-form.cjsx index f34494fbb..ca251571c 100644 --- a/src/components/generated-form.cjsx +++ b/src/components/generated-form.cjsx @@ -105,15 +105,18 @@ class FormItem extends React.Component if _.last(label) isnt ":" label = "#{label}:" -
-
- + if @props.type is "hidden" + @_renderInput() + else +
+
+ +
+
+ {@_renderInput()} + {@_renderError()} +
-
- {@_renderInput()} - {@_renderError()} -
-
# Since the validity state is something we need to pull off of rendered # DOM nodes we need to bend the React rules a bit and do a @@ -300,7 +303,9 @@ class GeneratedForm extends React.Component render: =>
{@_renderHeaderFormError()} - {@_renderFieldsets()} +
+ {@_renderFieldsets()} +
{@_renderHeaderFormError()}