Module: Card::Set::Right::ApiKey::HtmlFormat

Extended by:
AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod021-api_key/right/api_key.rb

Instance Method Summary collapse

Instance Method Details

#input_typeObject



98
99
100
# File 'platypus/tmp/set/gem-defaults/mod021-api_key/right/api_key.rb', line 98

def input_type
  :text_field
end

#view: contentObject



78
# File 'platypus/tmp/set/gem-defaults/mod021-api_key/right/api_key.rb', line 78

view(:content, unknown: true) { super() }

#view: coreObject



77
# File 'platypus/tmp/set/gem-defaults/mod021-api_key/right/api_key.rb', line 77

view :core, unknown: true, template: :haml

#view: generate_buttonObject



88
89
90
91
92
93
94
95
96
# File 'platypus/tmp/set/gem-defaults/mod021-api_key/right/api_key.rb', line 88

view :generate_button, perms: :update, unknown: true do
  text = card.content.present? ? t(:api_key_regenerate) : t(:api_key_generate)
  card_form :update do
    [
      hidden_tags(card: { trigger: :generate_api_key }),
      submit_button(text: text, disable_with: t(:api_key_generating))
    ]
  end
end


84
85
86
# File 'platypus/tmp/set/gem-defaults/mod021-api_key/right/api_key.rb', line 84

view :token_link do
  link_to t(:api_key_get_jwt_token), path: { format: :json, view: :token }
end