diff --git a/Build/Sources/TypeScript/workspaces/Resources/Public/TypeScript/Workspaces.ts b/Build/Sources/TypeScript/workspaces/Resources/Public/TypeScript/Workspaces.ts index 9ae676652c389b12e854e83b18ee0b22fdf0a5ea..df0f979ce3cb75424746c4ef180259f08b7112df 100644 --- a/Build/Sources/TypeScript/workspaces/Resources/Public/TypeScript/Workspaces.ts +++ b/Build/Sources/TypeScript/workspaces/Resources/Public/TypeScript/Workspaces.ts @@ -45,16 +45,18 @@ export default class Workspaces { for (const recipient of result.sendMailTo) { $form.append( - $('<div />', {class: 'checkbox'}).append( - $('<label />').text(recipient.label).prepend( - $('<input />', { - type: 'checkbox', - name: 'recipients', - class: 't3js-workspace-recipient', - id: recipient.name, - value: recipient.value, - }).prop('checked', recipient.checked).prop('disabled', recipient.disabled), - ), + $('<div />', {class: 'form-check'}).append( + $('<input />', { + type: 'checkbox', + name: 'recipients', + class: 'form-check-input t3js-workspace-recipient', + id: recipient.name, + value: recipient.value, + }).prop('checked', recipient.checked).prop('disabled', recipient.disabled), + $('<label />', { + class: 'form-check-label', + for: recipient.name + }).text(recipient.label), ), ); } diff --git a/typo3/sysext/workspaces/Resources/Public/JavaScript/Workspaces.js b/typo3/sysext/workspaces/Resources/Public/JavaScript/Workspaces.js index d1bf199e0d0d209433b6b5dfcccfcc41b4c494fb..3bef194f192a3226c1f044d06291709700fe54cf 100644 --- a/typo3/sysext/workspaces/Resources/Public/JavaScript/Workspaces.js +++ b/typo3/sysext/workspaces/Resources/Public/JavaScript/Workspaces.js @@ -10,4 +10,4 @@ * * The TYPO3 project - inspiring people to share! */ -var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};define(["require","exports","TYPO3/CMS/Core/Ajax/AjaxRequest","TYPO3/CMS/Backend/Enum/Severity","jquery","TYPO3/CMS/Backend/Modal"],(function(e,t,a,n,o,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=__importDefault(o);t.default=class{constructor(){this.tid=0}renderSendToStageWindow(e){const t=e[0].result,a=o.default("<form />");if(void 0!==t.sendMailTo&&t.sendMailTo.length>0){a.append(o.default("<label />",{class:"control-label"}).text(TYPO3.lang["window.sendToNextStageWindow.itemsWillBeSentTo"])),a.append(o.default("<div />",{class:"form-group"}).append(o.default('<button type="button" class="btn btn-default btn-xs t3js-workspace-recipients-selectall" />').text(TYPO3.lang["window.sendToNextStageWindow.selectAll"])," ",o.default('<button type="button" class="btn btn-default btn-xs t3js-workspace-recipients-deselectall" />').text(TYPO3.lang["window.sendToNextStageWindow.deselectAll"])));for(const e of t.sendMailTo)a.append(o.default("<div />",{class:"checkbox"}).append(o.default("<label />").text(e.label).prepend(o.default("<input />",{type:"checkbox",name:"recipients",class:"t3js-workspace-recipient",id:e.name,value:e.value}).prop("checked",e.checked).prop("disabled",e.disabled))))}void 0!==t.additional&&a.append(o.default("<div />",{class:"form-group"}).append(o.default("<label />",{class:"control-label",for:"additional"}).text(TYPO3.lang["window.sendToNextStageWindow.additionalRecipients"]),o.default("<textarea />",{class:"form-control",name:"additional",id:"additional"}).text(t.additional.value),o.default("<span />",{class:"help-block"}).text(TYPO3.lang["window.sendToNextStageWindow.additionalRecipients.hint"]))),a.append(o.default("<div />",{class:"form-group"}).append(o.default("<label />",{class:"control-label",for:"comments"}).text(TYPO3.lang["window.sendToNextStageWindow.comments"]),o.default("<textarea />",{class:"form-control",name:"comments",id:"comments"}).text(t.comments.value)));const s=l.show(TYPO3.lang.actionSendToStage,a,n.SeverityEnum.info,[{text:TYPO3.lang.cancel,active:!0,btnClass:"btn-default",name:"cancel",trigger:()=>{s.modal("hide")}},{text:TYPO3.lang.ok,btnClass:"btn-info",name:"ok"}]);return s}checkIntegrity(e){return this.sendRemoteRequest(this.generateRemotePayload("checkIntegrity",e))}sendRemoteRequest(e){return new a(TYPO3.settings.ajaxUrls.workspace_dispatch).post(e,{headers:{"Content-Type":"application/json; charset=utf-8"}})}generateRemotePayload(e,t={}){return this.generateRemotePayloadBody("RemoteServer",e,t)}generateRemoteMassActionsPayload(e,t={}){return this.generateRemotePayloadBody("MassActions",e,t)}generateRemoteActionsPayload(e,t={}){return this.generateRemotePayloadBody("Actions",e,t)}generateRemotePayloadBody(e,t,a){return a instanceof Array?a.push(TYPO3.settings.Workspaces.token):a=[a,TYPO3.settings.Workspaces.token],{action:e,data:a,method:t,type:"rpc",tid:this.tid++}}}})); \ No newline at end of file +var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};define(["require","exports","TYPO3/CMS/Core/Ajax/AjaxRequest","TYPO3/CMS/Backend/Enum/Severity","jquery","TYPO3/CMS/Backend/Modal"],(function(e,t,a,n,o,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=__importDefault(o);t.default=class{constructor(){this.tid=0}renderSendToStageWindow(e){const t=e[0].result,a=o.default("<form />");if(void 0!==t.sendMailTo&&t.sendMailTo.length>0){a.append(o.default("<label />",{class:"control-label"}).text(TYPO3.lang["window.sendToNextStageWindow.itemsWillBeSentTo"])),a.append(o.default("<div />",{class:"form-group"}).append(o.default('<button type="button" class="btn btn-default btn-xs t3js-workspace-recipients-selectall" />').text(TYPO3.lang["window.sendToNextStageWindow.selectAll"])," ",o.default('<button type="button" class="btn btn-default btn-xs t3js-workspace-recipients-deselectall" />').text(TYPO3.lang["window.sendToNextStageWindow.deselectAll"])));for(const e of t.sendMailTo)a.append(o.default("<div />",{class:"form-check"}).append(o.default("<input />",{type:"checkbox",name:"recipients",class:"form-check-input t3js-workspace-recipient",id:e.name,value:e.value}).prop("checked",e.checked).prop("disabled",e.disabled),o.default("<label />",{class:"form-check-label",for:e.name}).text(e.label)))}void 0!==t.additional&&a.append(o.default("<div />",{class:"form-group"}).append(o.default("<label />",{class:"control-label",for:"additional"}).text(TYPO3.lang["window.sendToNextStageWindow.additionalRecipients"]),o.default("<textarea />",{class:"form-control",name:"additional",id:"additional"}).text(t.additional.value),o.default("<span />",{class:"help-block"}).text(TYPO3.lang["window.sendToNextStageWindow.additionalRecipients.hint"]))),a.append(o.default("<div />",{class:"form-group"}).append(o.default("<label />",{class:"control-label",for:"comments"}).text(TYPO3.lang["window.sendToNextStageWindow.comments"]),o.default("<textarea />",{class:"form-control",name:"comments",id:"comments"}).text(t.comments.value)));const s=l.show(TYPO3.lang.actionSendToStage,a,n.SeverityEnum.info,[{text:TYPO3.lang.cancel,active:!0,btnClass:"btn-default",name:"cancel",trigger:()=>{s.modal("hide")}},{text:TYPO3.lang.ok,btnClass:"btn-info",name:"ok"}]);return s}checkIntegrity(e){return this.sendRemoteRequest(this.generateRemotePayload("checkIntegrity",e))}sendRemoteRequest(e){return new a(TYPO3.settings.ajaxUrls.workspace_dispatch).post(e,{headers:{"Content-Type":"application/json; charset=utf-8"}})}generateRemotePayload(e,t={}){return this.generateRemotePayloadBody("RemoteServer",e,t)}generateRemoteMassActionsPayload(e,t={}){return this.generateRemotePayloadBody("MassActions",e,t)}generateRemoteActionsPayload(e,t={}){return this.generateRemotePayloadBody("Actions",e,t)}generateRemotePayloadBody(e,t,a){return a instanceof Array?a.push(TYPO3.settings.Workspaces.token):a=[a,TYPO3.settings.Workspaces.token],{action:e,data:a,method:t,type:"rpc",tid:this.tid++}}}})); \ No newline at end of file