Sha256: 0d322fb2e9769c286cc8d8ef22a6d14741e63c3069df046f3144f622bf51c638
Contents?: true
Size: 715 Bytes
Versions: 2
Compression:
Stored size: 715 Bytes
Contents
module Locomotive class APIKeyInput < ::SimpleForm::Inputs::Base include Locomotive::SimpleForm::Inputs::FasterTranslate def input(wrapper_options) api_key_html + regenerate_button end def api_key_html api_key = object.api_key || I18n.t('simple_form.labels.locomotive.account.no_api_key') template.content_tag :code, api_key end def regenerate_button url = options[:url] template.content_tag :button, I18n.t('simple_form.buttons.locomotive.account.new_api_key'), class: 'btn btn-default btn-sm form-control-button', data: { url: url, confirm: I18n.t('locomotive.messages.confirm') } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
locomotivecms-4.2.0.alpha2 | app/inputs/locomotive/api_key_input.rb |
locomotivecms-4.2.0.alpha1 | app/inputs/locomotive/api_key_input.rb |