Ext.define("MyApp.Application",{name:"MyApp",extend:Ext.app.Application,views:[],controllers:[],stores:[]});Ext.define("MyApp.controller.Main",{extend:Ext.app.Controller});Ext.define("MyApp.controller.WorkflowNotifications",{extend:Ext.app.Controller,refs:[{ref:"workflowNotificationsForm",selector:"#workflowNotificationsForm"},{ref:"workflowNotificationsSaveButton",selector:"#workflowNotificationsSaveButton"}],init:function(a){this.control({"#workflowNotificationsSaveButton":{click:function(){this.save()}},"#workflowNotificationsForm":{dirtychange:function(b,c){if(c){this.getWorkflowNotificationsSaveButton().enable()}else{this.getWorkflowNotificationsSaveButton().disable()}},actioncomplete:function(b,d,c){this.load()}}})},onLaunch:function(){this.load()},load:function(){Ext.Ajax.request({url:"../../service/default_settings_workflow.php",method:"GET",params:Ext.Object.fromQueryString(document.location.search),success:function(a,b){this.getWorkflowNotificationsForm().getForm().setValues(Ext.JSON.decode(a.responseText))},failure:function(a,b){var c=a.responseText;Ext.Error.raise({msg:"Failed to get report parameters",option:c,object:b})},scope:this})},save:function(){this.getWorkflowNotificationsSaveButton().disable();var a=this.getWorkflowNotificationsForm().url+document.location.search;this.getWorkflowNotificationsForm().submit({url:a,params:Ext.Object.fromQueryString(document.location.search)})}});Ext.define("MyApp.view.Main",{extend:Ext.panel.Panel,border:false,layout:"fit",header:false,title:"Workflow settings",initComponent:function(){var a=this;Ext.applyIf(a,{items:[{xtype:"fieldset",title:"Workflow settings",layout:{type:"vbox",align:"stretch"},items:[{xtype:"form",border:false,itemId:"workflowNotificationsForm",jsonSubmit:true,trackResetOnLoad:true,url:"../../service/default_settings_workflow.php",items:[{xtype:"container",margin:"0 0 5 0",autoScroll:true,layout:{type:"hbox",align:"stretch"},items:[{xtype:"checkboxgroup",flex:1,itemId:"mycheckboxgroup",minHeight:100,width:400,fieldLabel:"Requested",labelAlign:"top",labelSeparator:" ",layout:{type:"vbox",align:"stretch"},items:[{xtype:"checkboxfield",name:"workflownotifications1",boxLabel:"Approver(s)",inputValue:"true",uncheckedValue:"false"},{xtype:"checkboxfield",name:"workflownotifications2",boxLabel:"User(s)",inputValue:"true",uncheckedValue:"false"},{xtype:"checkboxfield",name:"workflownotifications3",boxLabel:"Admin",inputValue:"true",uncheckedValue:"false"}]},{xtype:"checkboxgroup",flex:1,itemId:"mycheckboxgroup1",width:400,fieldLabel:"Approved",labelAlign:"top",labelSeparator:" ",layout:{type:"vbox",align:"stretch"},items:[{xtype:"checkboxfield",name:"workflownotifications4",boxLabel:"Approver(s)",inputValue:"true",uncheckedValue:"false"},{xtype:"checkboxfield",name:"workflownotifications5",boxLabel:"User(s)",inputValue:"true",uncheckedValue:"false"},{xtype:"checkboxfield",name:"workflownotifications6",boxLabel:"Admin",inputValue:"true",uncheckedValue:"false"}]},{xtype:"checkboxgroup",flex:1,itemId:"mycheckboxgroup2",width:400,fieldLabel:"Rejected",labelAlign:"top",labelSeparator:" ",layout:{type:"vbox",align:"stretch"},items:[{xtype:"checkboxfield",name:"workflownotifications7",boxLabel:"Approver(s)",inputValue:"true",uncheckedValue:"false"},{xtype:"checkboxfield",name:"workflownotifications8",boxLabel:"User(s)",inputValue:"true",uncheckedValue:"false"},{xtype:"checkboxfield",name:"workflownotifications9",boxLabel:"Admin",inputValue:"true",uncheckedValue:"false"}]}]},{xtype:"numberfield",afterLabelTextTpl:Ext.create("Ext.XTemplate",'&nbsp;<img align="top" src="../gfx/icon_question-small-white.png" data-qtip="{qtip:this.translate}" />',{translate:function(){return CCS.Translator.getText("Choose the minimum number of approvers to approve a workflow.")}}),fieldLabel:"Approver minimum",labelAlign:"top",labelSeparator:" ",name:"workflow_approver_minimum",fieldCls:"x-form-field, numberField",minValue:1},{xtype:"textfield",width:300,fieldLabel:"Sender email address",labelAlign:"top",labelSeparator:" ",labelWidth:300,name:"workflownotificationsemail"}]},{xtype:"container",margins:"20 0 8 20",layout:{type:"hbox",align:"bottom",pack:"end"},items:[{xtype:"button",disabled:true,itemId:"workflowNotificationsSaveButton",padding:"5 10 5 10",icon:"../gfx/save.png",scale:"medium",text:"Save changes"}]}]}]});a.callParent(arguments)}});Ext.define("MyApp.view.Viewport",{extend:Ext.container.Viewport,layout:{type:"fit"},items:[{xtype:"app-main"}]});