Differences From Artifact [642442e512]:

To Artifact [d5ece6e6b5]:


225
226
227
228
229
230
231




232
233
234
235
236
237
238
		if ($type == 'radio' || $type == 'checkbox') {
			$attributes['id'] .= '_' . $value;

			if (isset($_POST[$name]) && $_POST[$name] == $value) {
				$attributes['checked'] = 'checked';
			}
		}





		// Create attributes string
		if (array_key_exists('required', $attributes)) {
			$attributes['required'] = 'required';
		}

		$attributes_string = $attributes;







>
>
>
>







225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
		if ($type == 'radio' || $type == 'checkbox') {
			$attributes['id'] .= '_' . $value;

			if (isset($_POST[$name]) && $_POST[$name] == $value) {
				$attributes['checked'] = 'checked';
			}
		}

		if ($type == 'file') {
			$help = sprintf('Taille maximale : %s', Utils::format_bytes(Utils::getMaxUploadSize()));
		}

		// Create attributes string
		if (array_key_exists('required', $attributes)) {
			$attributes['required'] = 'required';
		}

		$attributes_string = $attributes;
301
302
303
304
305
306
307




308
309
310
311
312
313
314
		$required_label = array_key_exists('required', $attributes) ? ' <b title="Champ obligatoire">(obligatoire)</b>' : '';

		$out = '<dt>';

		if ($type == 'radio' || $type == 'checkbox') {
			$out .= $input . ' ';
		}





		$out .= sprintf('<label for="%s">%s</label>%s</dt>', $attributes['id'], $this->escape($label), $required_label);

		if (isset($help)) {
			$out .= sprintf('<dd class="help">%s</dd>', $this->escape($help));
		}








>
>
>
>







305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
		$required_label = array_key_exists('required', $attributes) ? ' <b title="Champ obligatoire">(obligatoire)</b>' : '';

		$out = '<dt>';

		if ($type == 'radio' || $type == 'checkbox') {
			$out .= $input . ' ';
		}

		if ($type == 'file') {
			$input .= sprintf('<input type="hidden" name="MAX_FILE_SIZE" value="%d" id="f_maxsize" />', Utils::return_bytes(Utils::getMaxUploadSize()));
		}

		$out .= sprintf('<label for="%s">%s</label>%s</dt>', $attributes['id'], $this->escape($label), $required_label);

		if (isset($help)) {
			$out .= sprintf('<dd class="help">%s</dd>', $this->escape($help));
		}