                         new_password : ''
                         strength     : 0
 
+    is_submittable: ->
+        return @state.new_password and @state.new_password != @state.old_password and (not @state.zxcvbn? or @state.zxcvbn?.score > 0)
+
     change_button : ->
-        if @state.new_password and @state.new_password != @state.old_password and (not @state.zxcvbn? or @state.zxcvbn?.score > 0)
+        if @is_submittable()
             <Button onClick={@save_new_password} bsStyle='success'>
                 Change password
             </Button>

                        placeholder = 'user@example.com'
                        onChange    = {=>@setState(email_address : @refs.email_address.getValue())}
                    />
                    <Input
                        type        = 'password'
                        ref         = 'password'
                        value       = {@state.password}
                        placeholder = 'Password'
                        onChange    = {=>@setState(password : @refs.password.getValue())}
                    />
                    <ButtonToolbar>
                        {@change_button()}
                        <Button bsStyle='default' onClick={@cancel_editing}>Cancel</Button>

        first_name    : rtypes.string
        last_name     : rtypes.string
        email_address : rtypes.string
        flux          : rtypes.object

    handle_change : (field) ->
        @props.flux.getActions('account').setTo("#{field}": @refs[field].getValue())
