Overview
Comment:Merge trunk fixes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA3-256: 0e4057ab65719315335809f1f6c057d7fabe2127a34c747d92b8e4dff1a79069
User & Date: bohwaz on 2021-03-19 23:09:12
Other Links: branch diff | manifest | tags
Context
2021-03-20
00:04
Implement minimal API check-in: 28c82e3d09 user: bohwaz tags: dev
2021-03-19
23:09
Merge trunk fixes check-in: 0e4057ab65 user: bohwaz tags: dev
22:36
Make sure that skeletons can be downloaded, it's a funky security case, but hey it's easier like that check-in: c7df5f56e6 user: bohwaz tags: dev, 1.1.0-alpha7
2021-03-12
19:22
Validation error when trying to create a transaction to a non-existing user or year check-in: 93aeaacac6 user: bohwaz tags: trunk, stable
Changes

Modified src/templates/services/save.tpl from [9c93e683cc] to [4ec50aff25].

58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
...
148
149
150
151
152
153
154


155
156
157
158
159
160
161

		{foreach from=$grouped_services item="service"}
		<?php if (!count($service->fees)) { continue; } ?>
		<dl data-service="s{$service.id}">
			<dt><label for="f_fee">Tarif</label> <b>(obligatoire)</b></dt>
			{foreach from=$service.fees key="service_id" item="fee"}
			<dd class="radio-btn">
				{input type="radio" name="id_fee" value=$fee.id data-user-amount=$fee.user_amount data-account=$fee.id_account label=null}
				<label for="f_id_fee_{$fee.id}">
					<div>
						<h3>{$fee.label}</h3>
						<p>
							{if !$fee.user_amount}
								prix libre ou gratuit
							{elseif $fee.user_amount && $fee.formula}
................................................................................

	// Toggle accounting part of the form
	var accounting = elm.getAttribute('data-account') ? true : false;
	g.toggle('.accounting', accounting);

	if (accounting) {
		$('#f_create_payment_1').checked = true;


	}

	// Fill the amount paid by the user
	if (amount && !first_load) {
		$('#f_amount').value = g.formatMoney(amount);
	}
}







|







 







>
>







58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
...
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163

		{foreach from=$grouped_services item="service"}
		<?php if (!count($service->fees)) { continue; } ?>
		<dl data-service="s{$service.id}">
			<dt><label for="f_fee">Tarif</label> <b>(obligatoire)</b></dt>
			{foreach from=$service.fees key="service_id" item="fee"}
			<dd class="radio-btn">
				{input type="radio" name="id_fee" value=$fee.id data-user-amount=$fee.user_amount data-account=$fee.id_account data-year=$fee.id_year label=null}
				<label for="f_id_fee_{$fee.id}">
					<div>
						<h3>{$fee.label}</h3>
						<p>
							{if !$fee.user_amount}
								prix libre ou gratuit
							{elseif $fee.user_amount && $fee.formula}
................................................................................

	// Toggle accounting part of the form
	var accounting = elm.getAttribute('data-account') ? true : false;
	g.toggle('.accounting', accounting);

	if (accounting) {
		$('#f_create_payment_1').checked = true;
		let btn = $('#f_account_container').firstElementChild;
		btn.value = btn.value.replace(/&year=\d+/, '') + '&year=' + elm.getAttribute('data-year');
	}

	// Fill the amount paid by the user
	if (amount && !first_load) {
		$('#f_amount').value = g.formatMoney(amount);
	}
}

Modified src/www/admin/config/donnees/local.php from [9202552ed1] to [9914dfe2ec].

11
12
13
14
15
16
17




18
19
20
21
22




23
24
25
26
27
28
29
30
}

$form->runIf('create', function () use ($s) {
	$s->create();
}, 'backup_create', Utils::getSelfURI(['ok' => 'create']));

$form->runIf('restore', function () use ($s) {




	$r = $s->restoreFromLocal(f('selected'));
	Utils::redirect(Utils::getSelfURI(['ok' => 'restore', 'code' => (int)$r]));
}, 'backup_manage');

$form->runIf('remove', function () use ($s) {




	$s->remove(f('selected'));
}, 'backup_manage', Utils::getSelfURI(['ok' => 'remove']));

$tpl->assign('ok_code', qg('code'));
$tpl->assign('ok', qg('ok'));
$tpl->assign('list', $s->getList());

$tpl->display('admin/config/donnees/local.tpl');







>
>
>
>





>
>
>
>








11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
}

$form->runIf('create', function () use ($s) {
	$s->create();
}, 'backup_create', Utils::getSelfURI(['ok' => 'create']));

$form->runIf('restore', function () use ($s) {
	if (!f('selected')) {
		throw new UserException('Aucune sauvegarde sélectionnée');
	}

	$r = $s->restoreFromLocal(f('selected'));
	Utils::redirect(Utils::getSelfURI(['ok' => 'restore', 'code' => (int)$r]));
}, 'backup_manage');

$form->runIf('remove', function () use ($s) {
	if (!f('selected')) {
		throw new UserException('Aucune sauvegarde sélectionnée');
	}

	$s->remove(f('selected'));
}, 'backup_manage', Utils::getSelfURI(['ok' => 'remove']));

$tpl->assign('ok_code', qg('code'));
$tpl->assign('ok', qg('ok'));
$tpl->assign('list', $s->getList());

$tpl->display('admin/config/donnees/local.tpl');