MDL-29614 theme_formal_white: Change the way Formal White theme shrinks pages
[moodle.git] / theme / formal_white / settings.php
CommitLineData
57bfc29a
AB
1<?php
2
3/**
dbf9e4ba 4 * Settings for the formal_white theme
57bfc29a
AB
5 */
6
dbf9e4ba
PS
7defined('MOODLE_INTERNAL') || die;
8
9if ($ADMIN->fulltree) {
b396e167 10 // font size reference
11 $name = 'theme_formal_white/fontsizereference';
12 $title = get_string('fontsizereference','theme_formal_white');
13 $description = get_string('fontsizereferencedesc', 'theme_formal_white');
14 $default = '13';
15 $choices = array(11=>'11px', 12=>'12px', 13=>'13px', 14=>'14px', 15=>'15px', 16=>'16px');
16 $setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
17 $settings->add($setting);
dbf9e4ba 18
4afb01db 19 // moodle 1.* like setting
20 $name = 'theme_formal_white/noframe';
21 $title = get_string('noframe','theme_formal_white');
22 $description = get_string('noframedesc', 'theme_formal_white');
0e412e87 23 $default = '0';
24 $setting = new admin_setting_configcheckbox($name, $title, $description, $default);
25 $settings->add($setting);
26
1bc47427
K
27 // Frame margin
28 $name = 'theme_formal_white/framemargin';
29 $title = get_string('framemargin','theme_formal_white');
30 $description = get_string('framemargindesc', 'theme_formal_white');
31 $default = '15';
32 $choices = array(0=>'0px', 5=>'5px', 10=>'10px', 15=>'15px', 20=>'20px', 25=>'25px', 30=>'30px', 35=>'35px', 40=>'40px', 45=>'45px', 50=>'50px');
33 $setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
34 $settings->add($setting);
35
b396e167 36 // Display logo or heading
37 $name = 'theme_formal_white/displaylogo';
38 $title = get_string('displaylogo','theme_formal_white');
39 $description = get_string('displaylogodesc', 'theme_formal_white');
40 $default = '1';
ec140757 41 $choices = array(1=>get_string('moodlelogo', 'theme_formal_white'), 0=>get_string('heading', 'theme_formal_white'));
b396e167 42 $setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
43 $settings->add($setting);
44
ec140757 45 // Custom site logo setting
b396e167 46 $name = 'theme_formal_white/logo';
47 $title = get_string('logo','theme_formal_white');
48 $description = get_string('logodesc', 'theme_formal_white');
49 $default = '';
50 $setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_URL);
51 $settings->add($setting);
52
ec140757
K
53 // Custom front page site logo setting
54 $name = 'theme_formal_white/frontpagelogo';
55 $title = get_string('frontpagelogo','theme_formal_white');
56 $description = get_string('frontpagelogodesc', 'theme_formal_white');
57 $default = '';
58 $setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_URL);
59 $settings->add($setting);
60
0e412e87 61 // page header background colour setting
62 $name = 'theme_formal_white/headerbgc';
63 $title = get_string('headerbgc','theme_formal_white');
64 $description = get_string('headerbgcdesc', 'theme_formal_white');
65 $default = '#E3DFD4';
66 $previewconfig = array('selector'=>'#page-header', 'style'=>'backgroundColor');
67 $setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
4afb01db 68 $settings->add($setting);
69
e0523b97 70 // creditstomoodleorg: ctmo
71 $name = 'theme_formal_white/creditstomoodleorg';
72 $title = get_string('creditstomoodleorg','theme_formal_white');
73 $description = get_string('creditstomoodleorgdesc', 'theme_formal_white');
74 $default = '2';
1924a86a
SH
75 $choices = array(2 => get_string('ctmo_ineverypage', 'theme_formal_white'), 1 => get_string('ctmo_onfrontpageonly', 'theme_formal_white'), 0 => get_string('ctmo_no', 'theme_formal_white'));
76 $setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
77 $settings->add($setting);
78
ec140757
K
79 // Block region width
80 $name = 'theme_formal_white/blockcolumnwidth';
81 $title = get_string('blockcolumnwidth','theme_formal_white');
82 $description = get_string('blockcolumnwidthdesc', 'theme_formal_white');
83 $default = '200';
84 $choices = array(150=>'150px', 170=>'170px', 200=>'200px', 240=>'240px', 290=>'290px', 350=>'350px', 420=>'420px');
85 $setting = new admin_setting_configselect($name, $title, $description, $default, $choices);
86 $settings->add($setting);
87
b396e167 88 // Block content background colour setting
4afb01db 89 $name = 'theme_formal_white/blockcontentbgc';
90 $title = get_string('blockcontentbgc','theme_formal_white');
91 $description = get_string('blockcontentbgcdesc', 'theme_formal_white');
92 $default = '#F6F6F6';
dbf9e4ba
PS
93 $previewconfig = array('selector'=>'.block .content', 'style'=>'backgroundColor');
94 $setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
95 $settings->add($setting);
96
b396e167 97 // Left column colour setting
98 $name = 'theme_formal_white/lblockcolumnbgc';
99 $title = get_string('lblockcolumnbgc','theme_formal_white');
100 $description = get_string('lblockcolumnbgcdesc', 'theme_formal_white');
4afb01db 101 $default = '#E3DFD4';
102 $previewconfig = array('selector'=>'#page-content, #page-content #region-pre, #page-content #region-post-box', 'style'=>'backgroundColor');
103 $setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
104 $settings->add($setting);
105
b396e167 106 // Right column colour setting
107 $name = 'theme_formal_white/rblockcolumnbgc';
108 $title = get_string('rblockcolumnbgc','theme_formal_white');
109 $description = get_string('rblockcolumnbgcdesc', 'theme_formal_white');
4afb01db 110 $default = '';
b396e167 111 $previewconfig = array('selector'=>'#page-content #region-post-box, #page-content #region-post', 'style'=>'backgroundColor');
112 $setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig);
dbf9e4ba
PS
113 $settings->add($setting);
114
dbf9e4ba
PS
115 // Foot note setting
116 $name = 'theme_formal_white/footnote';
117 $title = get_string('footnote','theme_formal_white');
118 $description = get_string('footnotedesc', 'theme_formal_white');
4afb01db 119 $default = '';
120 $setting = new admin_setting_confightmleditor($name, $title, $description, $default);
dbf9e4ba
PS
121 $settings->add($setting);
122
123 // Custom CSS file
124 $name = 'theme_formal_white/customcss';
125 $title = get_string('customcss','theme_formal_white');
126 $description = get_string('customcssdesc', 'theme_formal_white');
4afb01db 127 $default = '';
128 $setting = new admin_setting_configtextarea($name, $title, $description, $default);
dbf9e4ba
PS
129 $settings->add($setting);
130}