diff --git a/ProcessMaker/Mail/TaskActionByEmail.php b/ProcessMaker/Mail/TaskActionByEmail.php index 65ed8a40d7..c91f80481f 100644 --- a/ProcessMaker/Mail/TaskActionByEmail.php +++ b/ProcessMaker/Mail/TaskActionByEmail.php @@ -38,7 +38,7 @@ public function sendAbeEmail($config, $to, $data) $emailServer = $config['emailServer'] ?? 0; $subject = $config['subject'] ?? ''; $emailScreenRef = $config['screenEmailRef'] ?? 0; - + $emailConfig = [ 'subject' => $this->mustache($subject, $data), 'addEmails' => $to, @@ -47,7 +47,7 @@ public function sendAbeEmail($config, $to, $data) 'json_data' => '{}', 'emailServer' => $emailServer, ]; - + if (!empty($emailScreenRef)) { // Retrieve and render custom screen if specified $customScreen = Screen::findOrFail($emailScreenRef); @@ -56,10 +56,9 @@ public function sendAbeEmail($config, $to, $data) // Default message if no custom screen is configured $emailConfig['body'] = __('No screen configured'); } - + // Send the email using emailProvider $this->emailProvider->send($emailConfig); - } catch (\Exception $e) { Log::error('Error sending ABE email', [ 'to' => $to, @@ -69,6 +68,8 @@ public function sendAbeEmail($config, $to, $data) 'error' => $e->getMessage(), ]); } + + return true; } private function mustache($str, $data) diff --git a/ProcessMaker/Repositories/TokenRepository.php b/ProcessMaker/Repositories/TokenRepository.php index 2dab177fed..6a22ae25f4 100644 --- a/ProcessMaker/Repositories/TokenRepository.php +++ b/ProcessMaker/Repositories/TokenRepository.php @@ -177,7 +177,9 @@ public function persistActivityActivated(ActivityInterface $activity, TokenInter // Review if the task has enable the action by email $this->validateAndSendActionByEmail($activity, $token, $user->email); // Review if the user has enable the email notification - $this->validateEmailUserNotification($token, $user); + $isEmailTaskValid = $this->validateEmailUserNotification($token, $user); + // Define the flag if the email needs to sent + $token->is_emailsent = $isEmailTaskValid ? 1 : 0; } $this->instanceRepository->persistInstanceUpdated($token->getInstance()); } @@ -241,7 +243,7 @@ private function validateEmailUserNotification(TokenInterface $token, User $user try { Log::Info('User isEmailTaskEnable: ' . $user->email_task_notification); // Return if email task notification is not enabled or email is empty - if (!$user->email_task_notification || empty($user->email)) { + if ($user->email_task_notification === 0 || empty($user->email)) { return null; } // Prepare data for the email @@ -276,14 +278,15 @@ private function prepareEmailData(TokenInterface $token, User $user) 'element_name' => $taskName, 'case_title' => $caseTitle, // Populate this if needed 'due_date' => $token->due_at ?? '', - 'imgHeader' => config('app.url') . '/img/processmaker-login.svg', + 'link_review_task' => config('app.url') . 'tasks/' . $token->id . '/edit', + 'imgHeader' => config('app.url') . '/img/processmaker_login.png', ]; // Get the screen - $screen = Screen::where('title', 'Default Email Task Notification')->first(); + $screen = Screen::where('title', 'DEFAULT_EMAIL_TASK_NOTIFICATION')->first(); // Prepare the email configuration $configEmail = [ 'emailServer' => 0, // Use the default email server - 'subject' => "{$user->firstname} assigned you in {$taskName}", + 'subject' => "{$user->firstname} assigned you in '{$taskName}'", 'screenEmailRef' => $screen->id ?? 0, // Define here the screen to use ]; diff --git a/database/processes/screens/default-email-task-notification.json b/database/processes/screens/default-email-task-notification.json index b0169bee70..1f71f1e32c 100644 --- a/database/processes/screens/default-email-task-notification.json +++ b/database/processes/screens/default-email-task-notification.json @@ -1,651 +1,427 @@ [ - { - "name":"Default Email Task Notification", - "items":[ - { - "label":"Rich Text", - "config":{ - "icon":"fas fa-pencil-ruler", - "label":null, - "content":"

<\/p>", - "interactive":true, - "renderVarHtml":false - }, - "component":"FormHtmlViewer", - "inspector":[ - { - "type":"FormTextArea", - "field":"content", - "config":{ - "rows":5, - "label":"Content", - "value":null, - "helper":"The HTML text to display" - } - }, - { - "type":"FormCheckbox", - "field":"renderVarHtml", - "config":{ - "label":"Render HTML from a Variable", - "value":null, - "helper":null - } - }, - { - "type":"FormInput", - "field":"conditionalHide", - "config":{ - "label":"Visibility Rule", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"DeviceVisibility", - "field":"deviceVisibility", - "config":{ - "label":"Device Visibility", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"FormInput", - "field":"customFormatter", - "config":{ - "label":"Custom Format String", - "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", - "validation":null - } - }, - { - "type":"FormInput", - "field":"customCssSelector", - "config":{ - "label":"CSS Selector Name", - "helper":"Use this in your custom css rules", - "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type":"FormInput", - "field":"ariaLabel", - "config":{ - "label":"Aria Label", - "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type":"FormInput", - "field":"tabindex", - "config":{ - "label":"Tab Order", - "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", - "validation":"regex: [0-9]*" - } - }, - { - "type":"EncryptedConfig", - "field":"encryptedConfig", - "config":{ - "label":"Encrypted", - "helper":null - } - } - ], - "editor-control":"FormHtmlEditor", - "editor-component":"FormHtmlEditor" - }, - { - "uuid":"64801c0f-3b96-4261-a1ab-76f521a537ba", - "label":"Rich Text", - "config":{ - "icon":"fas fa-pencil-ruler", - "label":null, - "content":"

Hello {{ _firstname }}<\/strong> You just been assigned in a task by {{_assigned_by}}.<\/p>", - "interactive":true, - "renderVarHtml":false + { + "name": "DEFAULT_EMAIL_TASK_NOTIFICATION", + "items": [ + { + "uuid": "c331f828-3b0f-47a3-bf6e-9037717a7690", + "label": "Rich Text", + "config": { + "icon": "fas fa-pencil-ruler", + "label": null, + "content": "

", + "interactive": true, + "renderVarHtml": false + }, + "component": "FormHtmlViewer", + "inspector": [ + { + "type": "FormTextArea", + "field": "content", + "config": { + "rows": 5, + "label": "Content", + "value": null, + "helper": "The HTML text to display" + } + }, + { + "type": "FormCheckbox", + "field": "renderVarHtml", + "config": { + "label": "Render HTML from a Variable", + "value": null, + "helper": null + } + }, + { + "type": "FormInput", + "field": "conditionalHide", + "config": { + "label": "Visibility Rule", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "DeviceVisibility", + "field": "deviceVisibility", + "config": { + "label": "Device Visibility", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "FormInput", + "field": "customFormatter", + "config": { + "label": "Custom Format String", + "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", + "validation": null + } + }, + { + "type": "FormInput", + "field": "customCssSelector", + "config": { + "label": "CSS Selector Name", + "helper": "Use this in your custom css rules", + "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type": "FormInput", + "field": "ariaLabel", + "config": { + "label": "Aria Label", + "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type": "FormInput", + "field": "tabindex", + "config": { + "label": "Tab Order", + "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", + "validation": "regex: [0-9]*" + } + }, + { + "type": "EncryptedConfig", + "field": "encryptedConfig", + "config": { + "label": "Encrypted", + "helper": null + } + } + ], + "editor-control": "FormHtmlEditor", + "editor-component": "FormHtmlEditor" }, - "component":"FormHtmlViewer", - "inspector":[ - { - "type":"FormTextArea", - "field":"content", - "config":{ - "rows":5, - "label":"Content", - "value":null, - "helper":"The HTML text to display" - } - }, - { - "type":"FormCheckbox", - "field":"renderVarHtml", - "config":{ - "label":"Render HTML from a Variable", - "value":null, - "helper":null - } - }, - { - "type":"FormInput", - "field":"conditionalHide", - "config":{ - "label":"Visibility Rule", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"DeviceVisibility", - "field":"deviceVisibility", - "config":{ - "label":"Device Visibility", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"FormInput", - "field":"customFormatter", - "config":{ - "label":"Custom Format String", - "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", - "validation":null - } - }, - { - "type":"FormInput", - "field":"customCssSelector", - "config":{ - "label":"CSS Selector Name", - "helper":"Use this in your custom css rules", - "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type":"FormInput", - "field":"ariaLabel", - "config":{ - "label":"Aria Label", - "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type":"FormInput", - "field":"tabindex", - "config":{ - "label":"Tab Order", - "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", - "validation":"regex: [0-9]*" - } - }, - { - "type":"EncryptedConfig", - "field":"encryptedConfig", - "config":{ - "label":"Encrypted", - "helper":null - } - } - ], - "editor-control":"FormHtmlEditor", - "editor-component":"FormHtmlEditor" - }, - { - "uuid":"76e3d4a6-d4c0-411e-8f6d-1f87f484f4d2", - "label":"Submit Button", - "config":{ - "icon":"fas fa-share-square", - "name":null, - "event":"submit", - "label":"Review Task", - "loading":false, - "tooltip":[ - - ], - "variant":"primary", - "fieldValue":null, - "loadingLabel":"Loading...", - "defaultSubmit":true + { + "uuid": "64801c0f-3b96-4261-a1ab-76f521a537ba", + "label": "Rich Text", + "config": { + "icon": "fas fa-pencil-ruler", + "label": null, + "content": "

Hello {{ _firstname }} You just been assigned in a task by {{assigned_by}}.

", + "interactive": true, + "renderVarHtml": false + }, + "component": "FormHtmlViewer", + "inspector": [ + { + "type": "FormTextArea", + "field": "content", + "config": { + "rows": 5, + "label": "Content", + "value": null, + "helper": "The HTML text to display" + } + }, + { + "type": "FormCheckbox", + "field": "renderVarHtml", + "config": { + "label": "Render HTML from a Variable", + "value": null, + "helper": null + } + }, + { + "type": "FormInput", + "field": "conditionalHide", + "config": { + "label": "Visibility Rule", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "DeviceVisibility", + "field": "deviceVisibility", + "config": { + "label": "Device Visibility", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "FormInput", + "field": "customFormatter", + "config": { + "label": "Custom Format String", + "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", + "validation": null + } + }, + { + "type": "FormInput", + "field": "customCssSelector", + "config": { + "label": "CSS Selector Name", + "helper": "Use this in your custom css rules", + "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type": "FormInput", + "field": "ariaLabel", + "config": { + "label": "Aria Label", + "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type": "FormInput", + "field": "tabindex", + "config": { + "label": "Tab Order", + "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", + "validation": "regex: [0-9]*" + } + }, + { + "type": "EncryptedConfig", + "field": "encryptedConfig", + "config": { + "label": "Encrypted", + "helper": null + } + } + ], + "editor-control": "FormHtmlEditor", + "editor-component": "FormHtmlEditor" }, - "component":"FormButton", - "inspector":[ - { - "type":"FormInput", - "field":"label", - "config":{ - "label":"Label", - "helper":"The label describes the button's text" - } - }, - { - "type":"FormInput", - "field":"name", - "config":{ - "name":"Variable Name", - "label":"Variable Name", - "helper":"A variable name is a symbolic name to reference information.", - "validation":"regex:\/^(?:[A-Za-z])(?:[0-9A-Z_.a-z])*(? Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", - "validation":null - } - }, - { - "type":"FormInput", - "field":"customCssSelector", - "config":{ - "label":"CSS Selector Name", - "helper":"Use this in your custom css rules", - "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type":"FormInput", - "field":"ariaLabel", - "config":{ - "label":"Aria Label", - "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type":"FormInput", - "field":"tabindex", - "config":{ - "label":"Tab Order", - "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", - "validation":"regex: [0-9]*" - } - }, - { - "type":"EncryptedConfig", - "field":"encryptedConfig", - "config":{ - "label":"Encrypted", - "helper":null - } - } - ], - "editor-control":"FormSubmit", - "editor-component":"FormButton" - }, - { - "uuid":"34e729bb-1b04-4023-8593-3a740c34ca2b", - "label":"Record List", - "config":{ - "form":null, - "icon":"fas fa-th-list", - "name":"form_record_list_1", - "label":"New Record List", - "fields":{ - "jsonData":"[{\"content\":\"Task\",\"value\":\"element_name\"},{\"content\":\"Case\",\"value\":\"case_title\"},{\"content\":\"Due Date\",\"value\":\"due_date\"},{\"content\":\"Assigned By\",\"value\":\"assigned_by\"}]", - "editIndex":null, - "dataSource":"provideData", - "optionsList":[ - { - "value":"element_name", - "content":"Task" - }, - { - "value":"case_title", - "content":"Case" - }, - { - "value":"due_date", - "content":"Due Date" - }, - { - "value":"assigned_by", - "content":"Assigned By" - } - ], - "removeIndex":null, - "showJsonEditor":false, - "showOptionCard":false, - "showRemoveWarning":false - }, - "source":{ - "pmql":null, - "singleField":null, - "sourceOptions":"Variable", - "variableStore":null, - "collectionFields":[ - - ], - "dataSelectionOptions":"no-selection", - "collectionFieldsColumns":[ - - ] - }, - "editable":false + { + "uuid": "1329abf7-3427-49cf-98f8-31f64fcbdd1b", + "label": "Link URL", + "config": { + "icon": "fas fa-link", + "event": "link", + "label": "REVIEW TASK", + "linkUrl": "{{link_review_task}}", + "variant": "primary" + }, + "component": "LinkButton", + "inspector": [ + { + "type": "FormInput", + "field": "label", + "config": { + "label": "Label", + "helper": "The label describes the button's text" + } + }, + { + "type": "FormInput", + "field": "linkUrl", + "config": { + "label": "Link URL", + "helper": "Type here the URL link. Mustache syntax is supported." + } + }, + { + "type": "FormMultiselect", + "field": "variant", + "config": { + "label": "Button Variant Style", + "helper": "The variant determines the appearance of the button", + "options": [ + { + "value": "primary", + "content": "Primary" + }, + { + "value": "secondary", + "content": "Secondary" + }, + { + "value": "success", + "content": "Success" + }, + { + "value": "danger", + "content": "Danger" + }, + { + "value": "warning", + "content": "Warning" + }, + { + "value": "info", + "content": "Info" + }, + { + "value": "light", + "content": "Light" + }, + { + "value": "dark", + "content": "Dark" + }, + { + "value": "link", + "content": "Link" + } + ] + } + }, + { + "type": "FormInput", + "field": "conditionalHide", + "config": { + "label": "Visibility Rule", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "DeviceVisibility", + "field": "deviceVisibility", + "config": { + "label": "Device Visibility", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "FormInput", + "field": "customFormatter", + "config": { + "label": "Custom Format String", + "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", + "validation": null + } + }, + { + "type": "FormInput", + "field": "customCssSelector", + "config": { + "label": "CSS Selector Name", + "helper": "Use this in your custom css rules", + "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type": "FormInput", + "field": "ariaLabel", + "config": { + "label": "Aria Label", + "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type": "FormInput", + "field": "tabindex", + "config": { + "label": "Tab Order", + "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", + "validation": "regex: [0-9]*" + } + }, + { + "type": "EncryptedConfig", + "field": "encryptedConfig", + "config": { + "label": "Encrypted", + "helper": null + } + } + ], + "editor-control": "LinkButton", + "editor-component": "LinkButton" }, - "component":"FormRecordList", - "inspector":[ - { - "type":"FormInput", - "field":"name", - "config":{ - "name":"Variable Name", - "label":"Variable Name", - "helper":"A variable name is a symbolic name to reference information.", - "validation":"dot_notation|required|not_in:null,break,case,catch,continue,debugger,default,delete,do,else,finally,for,function,if,in,instanceof,new,return,switch,this,throw,try,typeof,var,void,while,with,class,const,enum,export,extends,import,super,true,false" - } - }, - { - "type":"FormInput", - "field":"label", - "config":{ - "label":"List Label", - "helper":"The label describes this record list" - } - }, - { - "type":"collectionDataSource", - "field":"source", - "config":{ - "label":"Source of Record List", - "helper":"A record list can display the data of a defined variable or a collection" - } - }, - { - "type":"ColumnSetup", - "field":"fields", - "config":{ - "label":"Columns", - "helper":"List of columns to display in the record list" - } - }, - { - "type":"FormMultiselect", - "field":"paginationOption", - "config":{ - "icon":"fas", - "label":"pagination", - "helper":null, - "options":[ - { - "value":0, - "content":"No Pagination (show all)" - }, - { - "value":5, - "content":"5 items per page" - }, - { - "value":10, - "content":"10 items per page" - }, - { - "value":15, - "content":"15 items per page" - }, - { - "value":25, - "content":"25 items per page" - }, - { - "value":50, - "content":"50 items per page" - } - ] - } - }, - { - "type":"collectionDesignerMode", - "field":"designerMode", - "config":{ - "label":"Table Style", - "helper":null - } - }, - { - "type":"ColorSelectRecord", - "field":"color", - "config":{ - "label":"Text Color", - "helper":"Set the element's text color", - "options":[ - { - "value":"text-primary", - "content":"primary" - }, - { - "value":"text-secondary", - "content":"secondary" - }, - { - "value":"text-success", - "content":"success" - }, - { - "value":"text-danger", - "content":"danger" - }, - { - "value":"text-warning", - "content":"warning" - }, - { - "value":"text-info", - "content":"info" - }, - { - "value":"text-light", - "content":"light" - }, - { - "value":"text-dark", - "content":"dark" - } - ] - } - }, - { - "type":"ColorSelectRecord", - "field":"bgcolor", - "config":{ - "label":"Background Color", - "helper":"Set the element's background color", - "options":[ - { - "value":"alert alert-primary", - "content":"primary" - }, - { - "value":"alert alert-secondary", - "content":"secondary" - }, - { - "value":"alert alert-success", - "content":"success" - }, - { - "value":"alert alert-danger", - "content":"danger" - }, - { - "value":"alert alert-warning", - "content":"warning" - }, - { - "value":"alert alert-info", - "content":"info" - }, - { - "value":"alert alert-light", - "content":"light" - }, - { - "value":"alert alert-dark", - "content":"dark" - } - ] - } - }, - { - "type":"ColorSelectModern", - "field":"bgcolormodern", - "config":{ - "label":null, - "helper":null, - "options":[ - { - "value":"alert alert-primary", - "content":"primary" - }, - { - "value":"alert alert-success", - "content":"success" - }, - { - "value":"alert alert-warning", - "content":"warning" - }, - { - "value":"alert alert-secondary", - "content":"secondary" - } - ] - } - }, - { - "type":"FormInput", - "field":"conditionalHide", - "config":{ - "label":"Visibility Rule", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"DeviceVisibility", - "field":"deviceVisibility", - "config":{ - "label":"Device Visibility", - "helper":"This control is hidden until this expression is true" - } - }, - { - "type":"FormInput", - "field":"customFormatter", - "config":{ - "label":"Custom Format String", - "helper":"Use the Mask Pattern format
Date ##\/##\/####
SSN ###-##-####
Phone (###) ###-####", - "validation":null - } - }, - { - "type":"FormInput", - "field":"customCssSelector", - "config":{ - "label":"CSS Selector Name", - "helper":"Use this in your custom css rules", - "validation":"regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" - } - }, - { - "type":"FormInput", - "field":"ariaLabel", - "config":{ - "label":"Aria Label", - "helper":"Attribute designed to help assistive technology (e.g. screen readers) attach a label" - } - }, - { - "type":"FormInput", - "field":"tabindex", - "config":{ - "label":"Tab Order", - "helper":"Order in which a user will move focus from one control to another by pressing the Tab key", - "validation":"regex: [0-9]*" - } - }, - { - "type":"EncryptedConfig", - "field":"encryptedConfig", - "config":{ - "label":"Encrypted", - "helper":null - } - } - ], - "editor-control":"FormRecordList", - "editor-component":"FormText" - } - ], - "order":1 - } + { + "uuid": "1c520abd-b1ef-4d42-9b69-887c70bb94b6", + "label": "Rich Text", + "config": { + "icon": "fas fa-pencil-ruler", + "label": null, + "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
TaskCaseDue DateAssigned By
{{element_name}}{{case_title}}{{due_date}}{{assigned_by}}
", + "interactive": true, + "renderVarHtml": false + }, + "component": "FormHtmlViewer", + "inspector": [ + { + "type": "FormTextArea", + "field": "content", + "config": { + "rows": 5, + "label": "Content", + "value": null, + "helper": "The HTML text to display" + } + }, + { + "type": "FormCheckbox", + "field": "renderVarHtml", + "config": { + "label": "Render HTML from a Variable", + "value": null, + "helper": null + } + }, + { + "type": "FormInput", + "field": "conditionalHide", + "config": { + "label": "Visibility Rule", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "DeviceVisibility", + "field": "deviceVisibility", + "config": { + "label": "Device Visibility", + "helper": "This control is hidden until this expression is true" + } + }, + { + "type": "FormInput", + "field": "customFormatter", + "config": { + "label": "Custom Format String", + "helper": "Use the Mask Pattern format
Date ##/##/####
SSN ###-##-####
Phone (###) ###-####", + "validation": null + } + }, + { + "type": "FormInput", + "field": "customCssSelector", + "config": { + "label": "CSS Selector Name", + "helper": "Use this in your custom css rules", + "validation": "regex: [-?[_a-zA-Z]+[_-a-zA-Z0-9]*]" + } + }, + { + "type": "FormInput", + "field": "ariaLabel", + "config": { + "label": "Aria Label", + "helper": "Attribute designed to help assistive technology (e.g. screen readers) attach a label" + } + }, + { + "type": "FormInput", + "field": "tabindex", + "config": { + "label": "Tab Order", + "helper": "Order in which a user will move focus from one control to another by pressing the Tab key", + "validation": "regex: [0-9]*" + } + }, + { + "type": "EncryptedConfig", + "field": "encryptedConfig", + "config": { + "label": "Encrypted", + "helper": null + } + } + ], + "editor-control": "FormHtmlEditor", + "editor-component": "FormHtmlEditor" + } + ], + "order": 1 + } ] diff --git a/database/seeders/ScreenSystemSeeder.php b/database/seeders/ScreenSystemSeeder.php index e09777fe8b..27caff13b1 100644 --- a/database/seeders/ScreenSystemSeeder.php +++ b/database/seeders/ScreenSystemSeeder.php @@ -35,6 +35,7 @@ private function createUpdateSystemScreen($path, $type, $key, $description) $systemCategory = ScreenCategory::where('is_system', true)->first(); if ($screen && $systemCategory && $screen->screen_category_id === $systemCategory->id) { $screen->screen_category_id = null; + $screen->config = $json; $screen->categories()->sync([]); $screen->save(); }