Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

check if there is custom button added before inserting the default

'connect' button in the footer.
  • Loading branch information...
commit d33d72d27faea13901b873cf450927fc887cf092 1 parent 7d8aa72
Ping Yu pyu10055 authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/omniauth/form.rb
4 lib/omniauth/form.rb
View
@@ -94,6 +94,7 @@ def initialize(options = {})
self.options = options
@html = ""
+ @with_custom_button = false
header(options[:title],options[:header_info])
end
@@ -130,6 +131,7 @@ def password_field(label, name)
end
def button(text)
+ @with_custom_button = true
@html << "\n<button type='submit'>#{text}</button>"
end
@@ -162,8 +164,8 @@ def header(title,header_info)
def footer
return self if @footer
+ @html << "\n<button type='submit'>Connect</button>" unless @with_custom_button
@html << <<-HTML
- <button type='submit'>Connect</button>
</form>
</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.