Overview
Comment:Fix background image saving
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA3-256: bd250771e34e382947957658a12ba0d02faf525a5748ae8b32971691bba3011b
User & Date: bohwaz on 2021-04-02 14:21:13
Other Links: branch diff | manifest | tags
Context
2021-04-02
14:42
Accept absolute URIs in links check-in: e26b1d4970 user: bohwaz tags: dev
14:21
Fix background image saving check-in: bd250771e3 user: bohwaz tags: dev
13:40
Forgot to change title check-in: 7fdc2560e8 user: bohwaz tags: dev
Changes

Modified src/include/lib/Garradin/Config.php from [3ee283733a] to [362169af35].

201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
			if ($file) {
				$file->storeFromBase64($source['admin_background']);
			}
			else {
				$file = File::createFromBase64(Utils::dirname(self::ADMIN_BACKGROUND_FILENAME), Utils::basename(self::ADMIN_BACKGROUND_FILENAME), $source['admin_background']);
			}

			unset($source['admin_background']);
		}

		parent::importForm($source);
	}

	protected function _filterType(string $key, $value)
	{







|







201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
			if ($file) {
				$file->storeFromBase64($source['admin_background']);
			}
			else {
				$file = File::createFromBase64(Utils::dirname(self::ADMIN_BACKGROUND_FILENAME), Utils::basename(self::ADMIN_BACKGROUND_FILENAME), $source['admin_background']);
			}

			$source['admin_background'] = $file->path;
		}

		parent::importForm($source);
	}

	protected function _filterType(string $key, $value)
	{

Modified src/templates/web/config.tpl from [ff6499315a] to [8397b3f71c].

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

	<div class="block alert">
		<h3>Site public désactivé</h3>
		<p>Le site public est désactivé, les visiteurs sont redirigés automatiquement vers la page de connexion.</p>
		<form method="post" action="{$self_url}">
			<p class="submit">
				{csrf_field key="config_site"}
				{button type="submit" name="enable_site" label="Réactiver le site public" shape="right" class="main"}
			</p>
		</form>
	</div>

	{else}

	<fieldset>







|







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

	<div class="block alert">
		<h3>Site public désactivé</h3>
		<p>Le site public est désactivé, les visiteurs sont redirigés automatiquement vers la page de connexion.</p>
		<form method="post" action="{$self_url}">
			<p class="submit">
				{csrf_field key="config_site"}
				{button type="submit" name="enable_site" label="Activer le site public" shape="right" class="main"}
			</p>
		</form>
	</div>

	{else}

	<fieldset>