Garradin Plugins

Check-in [16a086a63a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 16a086a63a528ca9835c8708cd2548608548a8ad
User & Date: bohwaz 2020-05-07 21:44:16
Context
2020-05-16
00:32
Correction bug dans les récupérations de dispo check-in: 877f5de8ce user: bohwaz tags: trunk
2020-05-07
21:44
Fix check-in: 16a086a63a user: bohwaz tags: trunk
21:31
Ajout choix date sur lignes ajoutées dynamiquement check-in: 99d4908075 user: bohwaz tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to reservations/templates/admin/config.tpl.

90
91
92
93
94
95
96








97
98
99
100
101
102
103
	var new_row = row.cloneNode(true);
	row.parentNode.appendChild(new_row);

	index++;

	new_row.querySelectorAll('input').forEach(function (elm) {
		if (elm.classList.contains('date')) {








			new datepickr(elm, config_fr);
		}
		elm.name = elm.name.replace(/slot\[_?\d+\]/, 'slot[_' + index + ']');
	});

	return false;
}







>
>
>
>
>
>
>
>







90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
	var new_row = row.cloneNode(true);
	row.parentNode.appendChild(new_row);

	index++;

	new_row.querySelectorAll('input').forEach(function (elm) {
		if (elm.classList.contains('date')) {
			elm.onchange = function ()
			{
				if (this.value.match(/\d{2}\/\d{2}\/\d{4}/))
					this.nextSibling.value = this.value.split('/').reverse().join('-');
				else
					this.nextSibling.value = this.value;
			};

			new datepickr(elm, config_fr);
		}
		elm.name = elm.name.replace(/slot\[_?\d+\]/, 'slot[_' + index + ']');
	});

	return false;
}