Bug 20163: Position of NoLoginInstructions text is inconsistent
authorOwen Leonard <oleonard@myacpl.org>
Thu, 8 Feb 2018 18:27:42 +0000 (18:27 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 13 Feb 2018 15:49:36 +0000 (12:49 -0300)
This patch modifies the markup for two login forms, making the markup
more consistent between them. The order of NoLoginInstructions, "Forgot
your password?" and "Don't have an account?" should now be the same.

This patch also updates some classes in each login form to allow for
more consistent custom styling.  A couple of capitalization corrections
are included.

To test, enable the PatronSelfRegistration and OpacResetPassword
preferences. Put some text in the NoLoginInstructions preference.

View the login form as associated links on the OPAC main page. Compare
to the login form which appears in a modal window when you click the
login link at the top of the page. The two areas should look consistent.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt

index 121b8f9..184ea27 100644 (file)
         </div>
         <form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="modalAuth">
             <div class="modal-body">
-                    [% IF ( shibbolethAuthentication ) %]
+                [% IF ( shibbolethAuthentication ) %]
                     [% IF ( invalidShibLogin ) %]
-                    <!-- This is what is displayed if shibboleth login has failed to match a koha user -->
-                    <div class="alert alert-info">
-                        <p>Sorry, your Shibboleth identity does not match a valid library identity. If you have a local login, you may use that below.</p>
-                    </div>
+                        <!-- This is what is displayed if shibboleth login has failed to match a koha user -->
+                        <div class="alert alert-info">
+                            <p>Sorry, your Shibboleth identity does not match a valid library identity. If you have a local login, you may use that below.</p>
+                        </div>
                     [% ELSE %]
-                    <h4>Shibboleth Login</h4>
-                    <p>If you have a Shibboleth account, please <a href="[% shibbolethLoginUrl %]">click here to login</a>.</p>
-                    <h4>Local Login</h4>
+                        <h4>Shibboleth login</h4>
+                        <p>If you have a Shibboleth account, please <a href="[% shibbolethLoginUrl %]">click here to login</a>.</p>
+                        <h4>Local Login</h4>
+                    [% END %]
+                [% END %]
+                <input type="hidden" name="koha_login_context" value="opac" />
+                <fieldset class="brief">
+                    <label for="muserid">Login:</label><input type="text" id="muserid" name="userid" />
+                    <label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" />
+                    [% IF Koha.Preference( 'NoLoginInstructions' ) %]
+                        <div id="nologininstructions-modal" class="nologininstructions">
+                            [% Koha.Preference( 'NoLoginInstructions' ) %]
+                        </div>
                     [% END %]
-            [% END %]
-                    <input type="hidden" name="koha_login_context" value="opac" />
-                    <fieldset class="brief">
-                        <label for="muserid">Login:</label><input type="text" id="muserid" name="userid" />
-                        <label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" />
                     [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
-                        <div id="forgotpassword-modal">
-                            <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
+                        <div id="forgotpassword-modal" class="forgotpassword">
+                            <p><a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a></p>
                         </div>
                     [% END %]
-                    [% IF Koha.Preference( 'NoLoginInstructions' ) %]
-                        <div id="nologininstructions-modal">
-                            [% Koha.Preference( 'NoLoginInstructions' ) %]
+                    [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]
+                        <div id="patronregistration-modal" class="patronregistration">
+                            <p>Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></p>
                         </div>
                     [% END %]
-                        [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<div id="mpatronregistration"><p>Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></p></div>[% END %]
-                    </fieldset>
+                </fieldset>
             </div>
             <div class="modal-footer">
                 <input type="submit" class="btn btn-primary" value="Log in" />
index a560a4a..81a7580 100644 (file)
@@ -94,7 +94,7 @@
 
         [% IF ( display_daily_quote && daily_quote ) %]
             <div id="daily-quote">
-                <h3>Quote of the Day</h3>
+                <h3>Quote of the day</h3>
                 <div>
                     <span id="daily-quote-text">[% daily_quote.text %]</span><span id="daily-quote-sep"> ~ </span><span id="daily-quote-source">[% daily_quote.source %]</span>
                 </div>
                                         <legend>Log in to your account:</legend>
                                         <label for="userid">Login:</label><input type="text" id="userid" name="userid" />
                                         <label for="password">Password:</label><input type="password" id="password" name="password" />
-                                    <fieldset class="action">
-                                        <input type="submit" value="Log in" class="btn" />
+                                        <fieldset class="action">
+                                            <input type="submit" value="Log in" class="btn" />
+                                        </fieldset>
+                                        [% IF Koha.Preference( 'NoLoginInstructions' ) %]
+                                            <div id="nologininstructions-main" class="nologininstructions">
+                                                [% Koha.Preference( 'NoLoginInstructions' ) %]
+                                            </div>
+                                        [% END %]
+                                        [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
+                                            <div id="forgotpassword-main" class="forgotpassword">
+                                                <p><a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a></p>
+                                            </div>
+                                        [% END %]
+                                        [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]
+                                            <div id="patronregistration-main" class="patronregistration">
+                                                <p>Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></p>
+                                            </div>
+                                        [% END %]
                                     </fieldset>
-                                    [% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<div id="patronregistration"><p>Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></p></div>[% END %]
-                                    </fieldset>
-                                [% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
-                                    <div id="forgotpassword">
-                                        <a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
-                                    </div>
-                                [% END %]
-                                [% IF Koha.Preference( 'NoLoginInstructions' ) %]
-                                    <div id="nologininstructions-main">
-                                        [% Koha.Preference( 'NoLoginInstructions' ) %]
-                                    </div>
-                                [% END %]
                                 </form>
                             </div> <!-- /#login -->
                         [% END # /casAuthentication %]