Sha256: 329b8bd4697500cc857c3f58f7af56ba2984308a8c97e34134fd2026c11a6be1

Contents?: true

Size: 925 Bytes

Versions: 15

Compression:

Stored size: 925 Bytes

Contents

basket[:warnings] << :recaptcha_config_issues

def recaptcha_config_issues?
  RecaptchaCard.using_defaults?
end

format :html do
  def recaptcha_config_issues_message
    wrap_with :p do
      if Card::Env.localhost?
        # %(Your captcha is currently working with temporary settings.
        #   This is fine for a local installation, but you will need new
        #   recaptcha keys if you want to make this site public.)
        t :recaptcha_captcha_temp, recaptcha_link: add_recaptcha_keys_link
      else
        # %(You are configured to use [[*captcha]], but for that to work
        #   you need new recaptcha keys.)
        t :recaptcha_captcha_keys, recaptcha_link: add_recaptcha_keys_link,
                                   captcha_link: link_to_card(:captcha)
      end
    end
  end

  def add_recaptcha_keys_link
    Card[:recaptcha_settings]&.format&.edit_link link_text: t(:recaptcha_link_text)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
card-mod-recaptcha-0.18.1 set/self/admin.rb
card-mod-recaptcha-0.18.0 set/self/admin.rb
card-mod-recaptcha-0.17.0 set/self/admin.rb
card-mod-recaptcha-0.16.0 set/self/admin.rb
card-mod-recaptcha-0.15.6 set/self/admin.rb
card-mod-recaptcha-0.15.5 set/self/admin.rb
card-mod-recaptcha-0.15.4 set/self/admin.rb
card-mod-recaptcha-0.15.3 set/self/admin.rb
card-mod-recaptcha-0.15.2.pre1 set/self/admin.rb
card-mod-recaptcha-0.15.1.1 set/self/admin.rb
card-mod-recaptcha-0.15.1 set/self/admin.rb
card-mod-recaptcha-0.15.0 set/self/admin.rb
card-mod-recaptcha-0.14.2 set/self/admin_info.rb
card-mod-recaptcha-0.14.1 set/self/admin_info.rb
card-mod-recaptcha-0.14.0 set/self/admin_info.rb