                     >
                         Add SSH Key
                     </Button>
-                    {<Button onClick={=>@setState(show_panel:false)}>
+                    {<Button onClick={@cancel_and_close}>
                         Cancel
                     </Button> if @props.toggleable }
                 </ButtonToolbar>

        key_value  : ""
        show_panel : false

    trigger_error: (err) ->
        @setState(error : err)


            fingerprint   : compute_fingerprint(validated_key.pubkey)
            creation_date : Date.now()
            creator_id    : @props.account_id

        @cancel_and_close() if @props.toggleable

    render_panel: ->
        <Panel header={<h2> <Icon name='plus-circle' /> Add an SSH Key</h2>} style={@props.style}>
