You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

settings-admin.php 4.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. /**
  3. *
  4. * @author Bjoern Schiessle <bjoern@schiessle.org>
  5. * @author Jan-Christoph Borchardt <hey@jancborchardt.net>
  6. * @author Lukas Reschke <lukas@statuscode.ch>
  7. *
  8. * @license GNU AGPL version 3 or any later version
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License as
  12. * published by the Free Software Foundation, either version 3 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. */
  24. script('theming', 'settings-admin');
  25. script('theming', '3rdparty/jscolor/jscolor');
  26. style('theming', 'settings-admin');
  27. ?>
  28. <div id="theming" class="section">
  29. <h2 class="inlineblock"><?php p($l->t('Theming')); ?></h2>
  30. <div id="theming_settings_msg" class="msg success inlineblock" style="display: none;">Saved</div>
  31. <?php if ($_['themable'] === false) { ?>
  32. <p>
  33. <?php p($_['errorMessage']) ?>
  34. </p>
  35. <?php } else { ?>
  36. <div>
  37. <label>
  38. <span><?php p($l->t('Name')) ?></span>
  39. <input id="theming-name" type="text" placeholder="<?php p($l->t('Name')); ?>" value="<?php p($_['name']) ?>" maxlength="250" />
  40. <div data-setting="name" data-toggle="tooltip" data-original-title="<?php p($l->t('reset to default')); ?>" class="theme-undo icon icon-history"></div>
  41. </label>
  42. </div>
  43. <div>
  44. <label>
  45. <span><?php p($l->t('Web address')) ?></span>
  46. <input id="theming-url" type="text" placeholder="<?php p($l->t('Web address https://…')); ?>" value="<?php p($_['url']) ?>" maxlength="500" />
  47. <div data-setting="url" data-toggle="tooltip" data-original-title="<?php p($l->t('reset to default')); ?>" class="theme-undo icon icon-history"></div>
  48. </label>
  49. </div>
  50. <div>
  51. <label>
  52. <span><?php p($l->t('Slogan')) ?></span>
  53. <input id="theming-slogan" type="text" placeholder="<?php p($l->t('Slogan')); ?>" value="<?php p($_['slogan']) ?>" maxlength="500" />
  54. <div data-setting="slogan" data-toggle="tooltip" data-original-title="<?php p($l->t('reset to default')); ?>" class="theme-undo icon icon-history"></div>
  55. </label>
  56. </div>
  57. <div>
  58. <label>
  59. <span><?php p($l->t('Color')) ?></span>
  60. <input id="theming-color" type="text" class="jscolor" maxlength="6" value="<?php p($_['color']) ?>" />
  61. <div data-setting="color" data-toggle="tooltip" data-original-title="<?php p($l->t('reset to default')); ?>" class="theme-undo icon icon-history"></div>
  62. </label>
  63. </div>
  64. <div>
  65. <form class="uploadButton inlineblock" method="post" action="<?php p($_['uploadLogoRoute']) ?>">
  66. <input type="hidden" id="current-logoMime" name="current-logoMime" value="<?php p($_['logoMime']); ?>" />
  67. <label for="uploadlogo"><span><?php p($l->t('Logo')) ?></span></label>
  68. <input id="uploadlogo" class="upload-logo-field" name="uploadlogo" type="file" />
  69. <label for="uploadlogo" class="button icon-upload svg" id="uploadlogo" title="<?php p($l->t('Upload new logo')) ?>"></label>
  70. <div data-setting="logoMime" data-toggle="tooltip" data-original-title="<?php p($l->t('reset to default')); ?>" class="theme-undo icon icon-history"></div>
  71. </form>
  72. </div>
  73. <div>
  74. <form class="uploadButton inlineblock" method="post" action="<?php p($_['uploadLogoRoute']) ?>">
  75. <input type="hidden" id="current-backgroundMime" name="current-backgroundMime" value="<?php p($_['backgroundMime']); ?>" />
  76. <label for="upload-login-background"><span><?php p($l->t('Log in image')) ?></span></label>
  77. <input id="upload-login-background" class="upload-logo-field" name="upload-login-background" type="file">
  78. <label for="upload-login-background" class="button icon-upload svg" id="upload-login-background" title="<?php p($l->t("Upload new login background")) ?>"></label>
  79. <div data-setting="backgroundMime" data-toggle="tooltip" data-original-title="<?php p($l->t('reset to default')); ?>" class="theme-undo icon icon-history"></div>
  80. </form>
  81. </div>
  82. <div id="theming-preview" style="background-color:<?php p($_['color']);?>; background-image:url(<?php p($_['background']); ?>);">
  83. <img src="<?php p($_['logo']); ?>" id="theming-preview-logo" />
  84. </div>
  85. <?php } ?>
  86. </div>