[Bps-public-commit] rt-authen-oauth2 branch, improve-button-layout, created. c1df061d086d057b662e889e65fb2c51957a0034

Maureen Mirville maureen at bestpractical.com
Thu Jun 28 13:08:20 EDT 2018


The branch, improve-button-layout has been created
        at  c1df061d086d057b662e889e65fb2c51957a0034 (commit)

- Log -----------------------------------------------------------------
commit c1df061d086d057b662e889e65fb2c51957a0034
Author: Maureen E. Mirville <maureen at bestpractical.com>
Date:   Thu Jun 28 13:04:46 2018 -0400

    Improve OAuth2 button alignment

diff --git a/html/Callbacks/OAuth/Elements/Login/Default b/html/Callbacks/OAuth/Elements/Login/Default
index 16edc4d..3a21ca1 100644
--- a/html/Callbacks/OAuth/Elements/Login/Default
+++ b/html/Callbacks/OAuth/Elements/Login/Default
@@ -1,8 +1,10 @@
 <%init>
 return unless RT->Config->Get('EnableOAuth2');
 </%init>
-<div class="button-row">
+<div id="oauth-section">
+  <div>
 % my $next_state = $session{NextPage}->{$ARGS{next} || ''};
 % $next_state = $next_state->{url} if ref $next_state;
-<span class="input"><a href="<%RT->Config->Get('WebPath')%>/NoAuth/OAuth<% $next_state ? "?next=$next_state" : "" %>"><img src="<% RT::Authen::OAuth2::IDPLoginButtonImage() %>" alt="<% loc('Log in using OAuth 2') %>" /></a></span>
+    <span class="input"><a href="<%RT->Config->Get('WebPath')%>/NoAuth/OAuth<% $next_state ? "?next=$next_state" : "" %>"><img class="oauth-login-button" src="<% RT::Authen::OAuth2::IDPLoginButtonImage() %>" alt="<% loc('Log in using OAuth 2') %>" /></a></span>
+  </div>
 </div>
diff --git a/lib/RT/Authen/OAuth2.pm b/lib/RT/Authen/OAuth2.pm
index 3fc322a..69ed43b 100644
--- a/lib/RT/Authen/OAuth2.pm
+++ b/lib/RT/Authen/OAuth2.pm
@@ -4,6 +4,9 @@ package RT::Authen::OAuth2;
 
 our $VERSION = '0.10';
 
+# Add css files to the @CSSFiles config
+RT->AddStyleSheets('authen-oauth2.css');
+
 use Net::OAuth2::Profile::WebServer;
 
 use RT::Authen::OAuth2::Unimplemented;
diff --git a/static/css/authen-oauth2.css b/static/css/authen-oauth2.css
new file mode 100644
index 0000000..8d3595f
--- /dev/null
+++ b/static/css/authen-oauth2.css
@@ -0,0 +1,13 @@
+#oauth-section div {
+  text-align: center;
+  margin-top: 0.25em;
+}
+
+#more-login-text div {
+  margin-bottom: 0.5em;
+}
+
+.oauth-login-button {
+  width: 40%;
+  height: 40%;
+}

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list