Project

General

Profile

Bug #82545 » missing_helptext.patch

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

View differences:

typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php (revision 42a658acb33e8f96458fc6e206188bf9580bc6bc)
$buttonText = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:online_media.new_media.button'));
$placeholder = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:online_media.new_media.placeholder'));
$buttonSubmit = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:online_media.new_media.submit'));
$onlineMediaAllowedHelpText = htmlspecialchars($languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.allowedFileExtensions'));
$item .= '
<span class="btn btn-default t3js-online-media-add-btn ' . $this->inlineData['config'][$nameObject]['md5'] . '"
' . $buttonStyle . '
data-file-irre-object="' . htmlspecialchars($objectPrefix) . '"
data-online-media-allowed="' . htmlspecialchars(implode(',', $onlineMediaAllowed)) . '"
data-online-media-allowed-help-text="' . $onlineMediaAllowedHelpText . '"
data-target-folder="' . htmlspecialchars($folder->getCombinedIdentifier()) . '"
title="' . $buttonText . '"
data-btn-submit="' . $buttonSubmit . '"
typo3/sysext/backend/Resources/Public/JavaScript/OnlineMedia.js (revision 42a658acb33e8f96458fc6e206188bf9580bc6bc)
me.target = me.$btn.data('target-folder');
me.irreObjectUid = me.$btn.data('file-irre-object');
me.allowed = me.$btn.data('online-media-allowed');
me.allowedHelpText = me.$btn.data('online-media-allowed-help-text') || 'Allowed file extensions:';
me.btnSubmit = me.$btn.data('data-btn-submit') || 'Add';
me.placeholder = me.$btn.data('placeholder') || 'Paste media url here...';
......
* Trigger the modal
*/
me.triggerModal = function() {
var allowedExtMarkup = $.map(me.allowed.split(','), function(ext) {
return '<span class="label label-success">' + ext.toUpperCase() + '</span>';
});
var $modal = Modal.show(
me.$btn.attr('title'),
'<div class="form-control-wrap">' +
'<input type="text" class="form-control online-media-url" placeholder="' + me.placeholder + '" />' +
'</div>',
'</div><div class="help-block">' + me.allowedHelpText + '<br>' + allowedExtMarkup.join(' ') + '</div>',
Severity.notice,
[{
text: me.btnSubmit,
(2-2/2)