Garradin Plugins

Check-in [99d4908075]
Login

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

Overview
Comment:Ajout choix date sur lignes ajoutées dynamiquement
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 99d4908075b66ad26e514d08621f471756fc266e
User & Date: bohwaz 2020-05-07 21:31:59
Context
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
20:58
Ne pas permettre de réserver des créneaux qui sont déjà passés check-in: 87caf8232f user: bohwaz tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

87
88
89
90
91
92
93
94
95
96



97
98

99
100










101
102
103
104
105
106
107
108
109
110
111
112
	}

	var row = table.rows[table.rows.length-1];
	var new_row = row.cloneNode(true);
	row.parentNode.appendChild(new_row);

	index++;
	console.log(index);

	new_row.querySelectorAll('input').forEach(function (elm) {



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

	return false;
}











document.getElementById('copyBtn').onclick = function (e) {
	var input = e.target.parentNode.querySelector('input');
	input.select();
	input.focus();
	input.setSelectionRange(0, 99999);
	document.execCommand("copy");
}
{/literal}
</script>

{include file="admin/_foot.tpl"}







<


>
>
>


>


>
>
>
>
>
>
>
>
>
>












87
88
89
90
91
92
93

94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
	}

	var row = table.rows[table.rows.length-1];
	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;
}

var config_fr = {
	fullCurrentMonth: true,
	dateFormat: 'd/m/Y',
	firstDayOfWeek: 0,
	weekdays: ['Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam', 'Dim'],
	months: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
	suffix: { 1: 'er' },
	defaultSuffix: ''
};

document.getElementById('copyBtn').onclick = function (e) {
	var input = e.target.parentNode.querySelector('input');
	input.select();
	input.focus();
	input.setSelectionRange(0, 99999);
	document.execCommand("copy");
}
{/literal}
</script>

{include file="admin/_foot.tpl"}