missing_helptext.patch

DANIEL Rémy, 2017-09-22 18:09

Download (3.25 KB)

View differences:

typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php (revision 42a658acb33e8f96458fc6e206188bf9580bc6bc)
523 523
                    $buttonText = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:online_media.new_media.button'));
524 524
                    $placeholder = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:online_media.new_media.placeholder'));
525 525
                    $buttonSubmit = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:online_media.new_media.submit'));
526
                    $onlineMediaAllowedHelpText = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.allowedFileExtensions'));
526 527
                    $item .= '
527 528
						<span class="btn btn-default t3js-online-media-add-btn ' . $this->inlineData['config'][$nameObject]['md5'] . '"
528 529
							' . $buttonStyle . '
529 530
							data-file-irre-object="' . htmlspecialchars($objectPrefix) . '"
530 531
							data-online-media-allowed="' . htmlspecialchars(implode(',', $onlineMediaAllowed)) . '"
532
							data-online-media-allowed-help-text="' . $onlineMediaAllowedHelpText . '"
531 533
							data-target-folder="' . htmlspecialchars($folder->getCombinedIdentifier()) . '"
532 534
							title="' . $buttonText . '"
533 535
							data-btn-submit="' . $buttonSubmit . '"
typo3/sysext/backend/Resources/Public/JavaScript/OnlineMedia.js (revision 42a658acb33e8f96458fc6e206188bf9580bc6bc)
35 35
		me.target = me.$btn.data('target-folder');
36 36
		me.irreObjectUid = me.$btn.data('file-irre-object');
37 37
		me.allowed = me.$btn.data('online-media-allowed');
38
		me.allowedHelpText = me.$btn.data('online-media-allowed-help-text') || 'Allowed file extensions:';
38 39
		me.btnSubmit = me.$btn.data('data-btn-submit') || 'Add';
39 40
		me.placeholder = me.$btn.data('placeholder') || 'Paste media url here...';
40 41

  
......
82 83
		 * Trigger the modal
83 84
		 */
84 85
		me.triggerModal = function() {
86
			var allowedExtMarkup = $.map(me.allowed.split(','), function(ext) {
87
				return '<span class="label label-success">' + ext.toUpperCase() + '</span>';
88
			});
85 89
			var $modal = Modal.show(
86 90
				me.$btn.attr('title'),
87 91
				'<div class="form-control-wrap">' +
88 92
					'<input type="text" class="form-control online-media-url" placeholder="' + me.placeholder + '" />' +
89
				'</div>',
93
                '</div><div class="help-block">' + me.allowedHelpText + '<br>' + allowedExtMarkup.join(' ') + '</div>',
90 94
				Severity.notice,
91 95
				[{
92 96
					text: me.btnSubmit,