             ref         = 'commit_message'
             type        = 'text'
             placeholder = 'Commit message'
-            onChange    = {=>@setState(commit_message:@refs.commit_message.getValue())}
-            onKeyDown   = {@props.actions.commit} />
+            onChange    = {=>@props.actions.setState(commit_message:@refs.commit_message.getValue())}
+        />
+
+    render_user_name_input : ->
+        <Input
+            ref         = 'git_user_name'
+            type        = 'text'
+            placeholder = {@props.git_user_name ? ''}
+            onChange    = {=>@props.actions.setState(git_user_name:@refs.git_user_name.getValue())}
+        />
+
+    render_user_name_panel : ->
+        head =
+            <span>
+                git config --global user.name "{@render_user_name_input()}"
+                <Button
+                    onClick  = {=>@props.actions.set_git_user_name()} >
+                    Run
+                </Button>
+
+            </span>
+        <Panel header={head}>
+            {<pre>{@props.git_user_name_return}</pre> if @props.git_user_name_return}
+        </Panel>
+
+    render_user_email_input : ->
+        <Input
+            ref         = 'git_user_email'
+            type        = 'text'
+            placeholder = {@props.git_user_email ? ''}
+            onChange    = {=>@props.actions.setState(git_user_email:@refs.git_user_email.getValue())}
+        />
+
+    render_user_email_panel : ->
+        head =
+            <span>
+                git config --global user.email "{@render_user_email_input()}"
+                <Button
+                    onClick  = {=>@props.actions.set_git_user_email()} >
+                    Run
+                </Button>
+
+            </span>
+        <Panel header={head}>
+            {<pre>{@props.git_user_email_return}</pre> if @props.git_user_email_return}
+        </Panel>
+
 
     render_commit_panel : ->
         head =
             <span>
-                git commit -a -m "{@render_commit_message_input()}" 
+                git commit -a -m "{@render_commit_message_input()}"
                 <Button
-                    onClick  = {@props.actions.commit} >
+                    onClick  = {=>@props.actions.run_git_commit()} >
                     Run
                 </Button>
+
             </span>
         <Panel header={head}>
             {<pre>{@props.git_commit_return}</pre> if @props.git_commit_return}

    render_configuration : ->
        <Row>
            <Col sm=6>

            </Col>
        </Row>


            err_on_exit : true
            cb          : (err, output) =>
                if err
                    console.log(JSON.stringify(err), JSON.stringify(output))
                    console.warn("git editor ERROR exec'ing #{opts.cmd} #{opts.args.join(' ')}")
                    opts.cb(err, output)
                opts.cb(err, output)

    set_git_user_name : =>
        store = @redux.getStore(@name)
        @exec
            cmd  : "git"
            args : ['config', '--global', 'user.name', store.get('git_user_name')]
            cb   : (err, output) =>
                @setState(git_user_name : store.get('git_user_name'))

    get_git_user_name : =>
        store = @redux.getStore(@name)
        console.log('FULL NAME '+@redux.getStore('account').get_fullname())
        @exec
            cmd  : "git"
            args : ['config', '--global', 'user.name']
            cb   : (err, output) =>
                if err
                    if @redux.getStore('account').get_fullname() != ''
                        name = @redux.getStore('account').get_fullname()
                    else
                        name = 'Unknown name'
                    @setState(git_user_name : name)
                    @set_git_user_name()
                else
                    @setState(git_user_name : output.stdout)

    set_git_user_email : =>
        store = @redux.getStore(@name)
        @exec
            cmd  : "git"
            args : ['config', '--global', 'user.email', store.get('git_user_email')]
            cb   : (err, output) =>
                @setState(git_user_email : store.get('git_user_email'))

    get_git_user_email : =>
        store = @redux.getStore(@name)
        console.log('FULL email '+@redux.getStore('account').get_email_address())
        @exec
            cmd  : "git"
            args : ['config', '--global', 'user.email']
            cb   : (err, output) =>
                if err
                    if @redux.getStore('account').get_email_address() != ''
                        email = @redux.getStore('account').get_fullname()
                    else
                        email = 'unknown@unknown.com'
                    @setState(git_user_email : email)
                    @set_git_user_email()
                else
                    @setState(git_user_email : output.stdout)


    run_git_commit : =>
        store = @redux.getStore(@name)
        commit_message = store.get('commit_message')
        console.log('CM: '+commit_message)
        @setState(git_commit_return : 'commiting...')
        @exec
            cmd  : "git"
            args : ['commit', '-a', '-m', commit_message]
            cb   : (err, output) =>
                if err
                    @setState(git_commit_return : JSON.stringify(err) + ' ' + JSON.stringify(output))
                else
                    @setState(git_commit_return : output.stdout)

