Bug 11038

Summary: Enable use of IntranetUserCSS and intranetcolorstylesheet on staff client login page
Product: Koha Reporter: Shane Sammons <ssammons>
Component: TemplatesAssignee: Bernardo Gonzalez Kriegel <bgkriegel>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: bgkriegel, f.demians, julian.maurice, kyle, mtj, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 16709    
Attachments: Bug 11038: Enable use of IntranetUserCSS on staff client login page
Bug 11038: Enable use of IntranetUserCSS on staff client login page
Bug 11038: Enable use of IntranetUserCSS on staff client login page
Bug 11038: Enable use of IntranetUserCSS on staff client login page

Description Shane Sammons 2013-10-11 13:16:00 UTC
Performing a simple color change to staff login screen, required file system access to create a new CSS file. As documented @ http://www.myacpl.org/koha/?p=612 , you must do that OR use the javascript hack.

I am suggesting there be a simple way to add custom CSS without the need for file system access. You can use a text box with OPACUserCSS, can a that just be duplicated?

As stated in bug http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7424 a custom store for custom-css is great, perhaps we could look at having an "upload file" buttom, or a simple file editor like WordPress uses for its theme editor, so you have file write access without being in the file system for said custom-css files?
Comment 1 Owen Leonard 2013-10-11 15:17:45 UTC
The staff client login page does not load CSS stored in the IntranetUserCSS system preference. While it does load intranetcolorstylesheet, it loads the file before it loads login.css, so any styles you add specific to the login page will be overridden by login.css.
Comment 2 Bernardo Gonzalez Kriegel 2015-11-28 14:33:15 UTC
*** Bug 14475 has been marked as a duplicate of this bug. ***
Comment 3 Bernardo Gonzalez Kriegel 2015-11-28 14:43:05 UTC Comment hidden (obsolete)
Comment 4 Bernardo Gonzalez Kriegel 2015-11-28 14:45:50 UTC
(In reply to Owen Leonard from comment #1)
> The staff client login page does not load CSS stored in the IntranetUserCSS
> system preference.

Is this by design? This patch fixes this in a simple way 
Could this affect other pages?
Comment 5 Bernardo Gonzalez Kriegel 2015-11-28 14:48:38 UTC Comment hidden (obsolete)
Comment 6 Marc Véron 2015-11-30 20:07:01 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2015-12-01 15:28:05 UTC
Created attachment 45273 [details] [review]
Bug 11038: Enable use of IntranetUserCSS on staff client login page

This patch enable use of IntranetUserCss on staff client
login page.

To test:
1) Add something to IntranetUserCSS to modify login page,
for example

 #login h1 a {
   height:30px;
 }

2) Logout from staff client, no changes on login page.
3) Apply the patch
4) Reload, now logo is cut in half :)
Bonus) Login again an try changing image, add

 #login h1 {
  background: url(http://example.com/img/other-logo.png) no-repeat top center;
 }

and fix height. Logout and check

This also affects 3.20 and perhaps earlier versions.
Re-upload to fix examples

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Kyle M Hall 2015-12-11 15:53:10 UTC
Pushed to master! Thanks Bernardo!

Note: I would have preferred to see a switch to using Koha.Preference, but this works well enough. At some point we will have to require the use of Koha.Preference and start a cleanup project for prefs passed via pl scripts.
Comment 9 Julian Maurice 2015-12-11 16:36:27 UTC
Patch pushed to 3.22.x, will be in 3.22.1
Comment 10 Frédéric Demians 2015-12-11 17:11:50 UTC
This patch has been pushed to 3.20.x, will be in 3.20.7.