2016-06-06 18:40:38 +03:00
< ? php
2016-07-21 17:49:16 +03:00
/**
*
* @ author Bjoern Schiessle < bjoern @ schiessle . org >
* @ author Jan - Christoph Borchardt < hey @ jancborchardt . net >
* @ author Lukas Reschke < lukas @ statuscode . ch >
*
* @ license GNU AGPL version 3 or any later version
*
* This program is free software : you can redistribute it and / or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 of the
* License , or ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU Affero General Public License for more details .
*
* You should have received a copy of the GNU Affero General Public License
* along with this program . If not , see < http :// www . gnu . org / licenses />.
*
*/
2016-06-06 18:40:38 +03:00
script ( 'theming' , 'settings-admin' );
2016-06-09 22:46:30 +03:00
script ( 'theming' , '3rdparty/jscolor/jscolor' );
style ( 'theming' , 'settings-admin' );
2016-06-06 18:40:38 +03:00
?>
2016-06-07 20:09:49 +03:00
< div id = " theming " class = " section " >
2016-06-16 18:30:18 +03:00
< h2 class = " inlineblock " >< ? php p ( $l -> t ( 'Theming' )); ?> </h2>
2019-10-17 16:09:49 +03:00
< a target = " _blank " rel = " noreferrer " class = " icon-info " title = " <?php p( $l->t ('Open documentation'));?> " href = " <?php p(link_to_docs('admin-theming')); ?> " ></ a >
2017-04-28 21:34:58 +03:00
< p class = " settings-hint " >< ? php p ( $l -> t ( 'Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users.' )); ?> </p>
2017-04-28 18:55:59 +03:00
< div id = " theming_settings_status " >
< div id = " theming_settings_loading " class = " icon-loading-small " style = " display: none; " ></ div >
< span id = " theming_settings_msg " class = " msg success " style = " display: none; " > Saved </ span >
</ div >
2016-06-09 22:46:30 +03:00
< ? php if ( $_ [ 'themable' ] === false ) { ?>
2016-06-07 20:09:49 +03:00
< p >
2016-06-09 22:46:30 +03:00
< ? php p ( $_ [ 'errorMessage' ]) ?>
2016-06-07 20:09:49 +03:00
</ p >
2018-03-26 19:20:18 +03:00
< ? php } ?>
2016-11-16 13:38:01 +03:00
< div >
< label >
< span >< ? php p ( $l -> t ( 'Name' )) ?> </span>
2016-08-01 10:37:12 +03:00
< input id = " theming-name " type = " text " placeholder = " <?php p( $l->t ('Name')); ?> " value = " <?php p( $_['name'] ) ?> " maxlength = " 250 " />
2017-05-20 18:10:26 +03:00
< div data - setting = " name " data - toggle = " tooltip " data - original - title = " <?php p( $l->t ('Reset to default')); ?> " class = " theme-undo icon icon-history " ></ div >
2016-06-23 13:05:42 +03:00
</ label >
2016-11-16 13:38:01 +03:00
</ div >
< div >
< label >
2018-05-16 01:56:08 +03:00
< span >< ? php p ( $l -> t ( 'Web link' )) ?> </span>
2018-05-11 16:57:32 +03:00
< input id = " theming-url " type = " url " placeholder = " <?php p( $l->t ('https://…')); ?> " value = " <?php p( $_['url'] ) ?> " maxlength = " 500 " />
2017-05-20 18:10:26 +03:00
< div data - setting = " url " data - toggle = " tooltip " data - original - title = " <?php p( $l->t ('Reset to default')); ?> " class = " theme-undo icon icon-history " ></ div >
2016-06-23 13:05:42 +03:00
</ label >
2016-11-16 13:38:01 +03:00
</ div >
< div >
< label >
< span >< ? php p ( $l -> t ( 'Slogan' )) ?> </span>
2016-08-01 10:37:12 +03:00
< input id = " theming-slogan " type = " text " placeholder = " <?php p( $l->t ('Slogan')); ?> " value = " <?php p( $_['slogan'] ) ?> " maxlength = " 500 " />
2017-05-20 18:10:26 +03:00
< div data - setting = " slogan " data - toggle = " tooltip " data - original - title = " <?php p( $l->t ('Reset to default')); ?> " class = " theme-undo icon icon-history " ></ div >
2016-06-23 13:05:42 +03:00
</ label >
2016-11-16 13:38:01 +03:00
</ div >
< div >
< label >
< span >< ? php p ( $l -> t ( 'Color' )) ?> </span>
2018-10-02 11:16:45 +03:00
< input id = " theming-color " type = " text " maxlength = " 7 " value = " <?php p( $_['color'] ) ?> " />
2017-05-20 18:10:26 +03:00
< div data - setting = " color " data - toggle = " tooltip " data - original - title = " <?php p( $l->t ('Reset to default')); ?> " class = " theme-undo icon icon-history " ></ div >
2016-06-23 13:05:42 +03:00
</ label >
2016-11-16 13:38:01 +03:00
</ div >
< div >
2018-02-26 16:07:07 +03:00
< form class = " uploadButton " method = " post " action = " <?php p( $_['uploadLogoRoute'] ) ?> " data - image - key = " logo " >
< input type = " hidden " id = " theming-logoMime " value = " <?php p( $_['images'] ['logo']['mime']); ?> " />
< input type = " hidden " name = " key " value = " logo " />
2016-06-23 13:05:42 +03:00
< label for = " uploadlogo " >< span >< ? php p ( $l -> t ( 'Logo' )) ?> </span></label>
2018-02-26 16:07:07 +03:00
< input id = " uploadlogo " class = " fileupload " name = " image " type = " file " />
2016-06-21 22:21:46 +03:00
< label for = " uploadlogo " class = " button icon-upload svg " id = " uploadlogo " title = " <?php p( $l->t ('Upload new logo')) ?> " ></ label >
2017-05-20 18:10:26 +03:00
< div data - setting = " logoMime " data - toggle = " tooltip " data - original - title = " <?php p( $l->t ('Reset to default')); ?> " class = " theme-undo icon icon-history " ></ div >
2016-06-21 22:21:46 +03:00
</ form >
2016-11-16 13:38:01 +03:00
</ div >
< div >
2018-02-26 16:07:07 +03:00
< form class = " uploadButton " method = " post " action = " <?php p( $_['uploadLogoRoute'] ) ?> " data - image - key = " background " >
< input type = " hidden " id = " theming-backgroundMime " value = " <?php p( $_['images'] ['background']['mime']); ?> " />
< input type = " hidden " name = " key " value = " background " />
2017-01-23 14:35:58 +03:00
< label for = " upload-login-background " >< span >< ? php p ( $l -> t ( 'Login image' )) ?> </span></label>
2018-02-26 16:07:07 +03:00
< input id = " upload-login-background " class = " fileupload " name = " image " type = " file " >
2016-06-21 22:21:46 +03:00
< label for = " upload-login-background " class = " button icon-upload svg " id = " upload-login-background " title = " <?php p( $l->t ( " Upload new login background " )) ?> " ></ label >
2017-05-20 18:10:26 +03:00
< div data - setting = " backgroundMime " data - toggle = " tooltip " data - original - title = " <?php p( $l->t ('Reset to default')); ?> " class = " theme-undo icon icon-history " ></ div >
2016-10-12 17:45:07 +03:00
< div class = " theme-remove-bg icon icon-delete " data - toggle = " tooltip " data - original - title = " <?php p( $l->t ('Remove background image')); ?> " ></ div >
2016-06-09 22:46:30 +03:00
</ form >
2016-11-16 13:38:01 +03:00
</ div >
2016-10-12 17:45:07 +03:00
< div id = " theming-preview " >
2018-02-26 16:07:07 +03:00
< div id = " theming-preview-logo " ></ div >
2016-11-16 13:38:01 +03:00
</ div >
2018-02-26 16:07:07 +03:00
2018-11-05 01:52:22 +03:00
< h3 class = " inlineblock " >< ? php p ( $l -> t ( 'Advanced options' )); ?> </h3>
2018-02-26 16:07:07 +03:00
< div class = " advanced-options " >
2018-05-09 16:52:41 +03:00
< div >
< label >
2018-05-24 15:45:49 +03:00
< span >< ? php p ( $l -> t ( 'Legal notice link' )) ?> </span>
2018-05-11 16:57:32 +03:00
< input id = " theming-imprintUrl " type = " url " placeholder = " <?php p( $l->t ('https://…')); ?> " value = " <?php p( $_['imprintUrl'] ) ?> " maxlength = " 500 " />
2018-05-09 16:52:41 +03:00
< div data - setting = " imprintUrl " data - toggle = " tooltip " data - original - title = " <?php p( $l->t ('Reset to default')); ?> " class = " theme-undo icon icon-history " ></ div >
2018-05-24 15:45:49 +03:00
</ label >
</ div >
< div >
< label >
< span >< ? php p ( $l -> t ( 'Privacy policy link' )) ?> </span>
< input id = " theming-privacyUrl " type = " url " placeholder = " <?php p( $l->t ('https://…')); ?> " value = " <?php p( $_['privacyUrl'] ) ?> " maxlength = " 500 " />
< div data - setting = " privacyUrl " data - toggle = " tooltip " data - original - title = " <?php p( $l->t ('Reset to default')); ?> " class = " theme-undo icon icon-history " ></ div >
2018-05-09 16:52:41 +03:00
</ label >
</ div >
2018-02-26 16:07:07 +03:00
< div class = " advanced-option-logoheader " >
< form class = " uploadButton " method = " post " action = " <?php p( $_['uploadLogoRoute'] ) ?> " data - image - key = " logoheader " >
< input type = " hidden " id = " theming-logoheaderMime " value = " <?php p( $_['images'] ['logoheader']['mime']); ?> " />
< input type = " hidden " name = " key " value = " logoheader " />
< label for = " upload-login-logoheader " >< span >< ? php p ( $l -> t ( 'Header logo' )) ?> </span></label>
< input id = " upload-login-logoheader " class = " fileupload " name = " image " type = " file " >
< label for = " upload-login-logoheader " class = " button icon-upload svg " id = " upload-login-logoheader " title = " <?php p( $l->t ( " Upload new header logo " )) ?> " ></ label >
< div class = " image-preview " ></ div >
< div data - setting = " logoheaderMime " data - toggle = " tooltip " data - original - title = " <?php p( $l->t ('Reset to default')); ?> " class = " theme-undo icon icon-history " ></ div >
</ form >
</ div >
< div class = " advanced-option-favicon " >
< form class = " uploadButton " method = " post " action = " <?php p( $_['uploadLogoRoute'] ) ?> " data - image - key = " favicon " >
< input type = " hidden " id = " theming-faviconMime " value = " <?php p( $_['images'] ['favicon']['mime']); ?> " />
< input type = " hidden " name = " key " value = " favicon " />
< label for = " upload-login-favicon " >< span >< ? php p ( $l -> t ( 'Favicon' )) ?> </span></label>
< input id = " upload-login-favicon " class = " fileupload " name = " image " type = " file " >
2018-04-26 19:12:21 +03:00
< label for = " upload-login-favicon " class = " button icon-upload svg " id = " upload-login-favicon " title = " <?php p( $l->t ( " Upload new favicon " )) ?> " ></ label >
2018-02-26 16:07:07 +03:00
< div class = " image-preview " ></ div >
< div data - setting = " faviconMime " data - toggle = " tooltip " data - original - title = " <?php p( $l->t ('Reset to default')); ?> " class = " theme-undo icon icon-history " ></ div >
</ form >
</ div >
</ div >
2017-11-08 16:53:44 +03:00
< div class = " theming-hints " >
< ? php if ( ! $_ [ 'canThemeIcons' ]) { ?>
< p class = " info " >
< a href = " <?php p( $_['iconDocs'] ); ?> " >
< em >
< ? php p ( $l -> t ( 'Install the Imagemagick PHP extension with support for SVG images to automatically generate favicons based on the uploaded logo and color.' )); ?> ↗
</ em >
</ a >
</ p >
< ? php } ?>
</ div >
2016-06-07 20:09:49 +03:00
</ div >