check if there is custom button added before inserting the default
'connect' button in the footer.
This commit is contained in:
parent
7d8aa725a1
commit
d33d72d27f
|
@ -94,6 +94,7 @@ module OmniAuth
|
||||||
self.options = options
|
self.options = options
|
||||||
|
|
||||||
@html = ""
|
@html = ""
|
||||||
|
@with_custom_button = false
|
||||||
header(options[:title],options[:header_info])
|
header(options[:title],options[:header_info])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -130,6 +131,7 @@ module OmniAuth
|
||||||
end
|
end
|
||||||
|
|
||||||
def button(text)
|
def button(text)
|
||||||
|
@with_custom_button = true
|
||||||
@html << "\n<button type='submit'>#{text}</button>"
|
@html << "\n<button type='submit'>#{text}</button>"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -162,8 +164,8 @@ module OmniAuth
|
||||||
|
|
||||||
def footer
|
def footer
|
||||||
return self if @footer
|
return self if @footer
|
||||||
|
@html << "\n<button type='submit'>Connect</button>" unless @with_custom_button
|
||||||
@html << <<-HTML
|
@html << <<-HTML
|
||||||
<button type='submit'>Connect</button>
|
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue