Skip to content

Commit

Permalink
1.4.0: Introduce :browserid_button_text setting
Browse files Browse the repository at this point in the history
  • Loading branch information
onli committed Sep 5, 2017
1 parent 830909e commit da26a0f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ Available sinatra settings:
other than https://broker.portier.io
* <tt>:browserid_login_url</tt>: URL users get redirected to when the
<tt>authorize!(redirect: nil)</tt> helper is called and a user is not logged in. `redirect` is an optional parameter to set the redirect target on the function call instead.
* <tt>:browserid_button_class</tt> css class of the login button
* <tt>:browserid_button_class</tt>: Css class of the login button
* <tt>:browserid_button_text</tt>: Text of the login button
1 change: 1 addition & 0 deletions lib/sinatra/browserid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def self.registered(app)
app.set :browserid_login_button, :red
app.set :browserid_login_url, "/_browserid_login"
app.set :browserid_button_class, ""
app.set :browserid_button_text, "Log in"

app.get '/_browserid_login' do
# TODO(petef): render a page that initiates login without
Expand Down
2 changes: 1 addition & 1 deletion lib/sinatra/browserid/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Templates
<input type=hidden name=client_id value="<%= request.base_url.chomp('/') %>" />
<input type=hidden name=redirect_uri value="<%= url '/_browserid_assert' %>" />
<input type=hidden name=nonce value="<%= nonce %>" />
<input type=submit value="Log In" class="<%= settings.browserid_button_class %>" />
<input type=submit value="<%= settings.browserid_button_text %>" class="<%= settings.browserid_button_class %>" />
</form>
EOF
end
Expand Down
2 changes: 1 addition & 1 deletion sinatra-portier.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "sinatra-portier"
s.version = "1.3.0"
s.version = "1.4.0"

s.authors = ["Pete Fritchman", "Malte Paskuda"]
s.email = ["malte@paskuda.biz"]
Expand Down

0 comments on commit da26a0f

Please sign in to comment.