Skip to content

Commit f90eaa7

Browse files
committed
refactor: unify fieldName as field property for processors
1 parent 825c33e commit f90eaa7

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

assets/components/modai/js/mgr/autosummary.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Ext.onReady(function() {
184184
resource: MODx.request.id,
185185
prompt: defaultPrompt,
186186
mediaSource,
187-
fieldName,
187+
field: fieldName,
188188
},
189189
listeners: {
190190
success: {
@@ -299,7 +299,7 @@ Ext.onReady(function() {
299299
params: {
300300
action: 'modAI\\Processors\\Prompt\\Vision',
301301
image: base64Data,
302-
fieldName
302+
field: fieldName
303303
},
304304
listeners: {
305305
success: {

assets/components/modai/js/mgr/widgets/image_prompt.window.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Ext.extend(modAI.window.ImagePrompt,MODx.Window, {
165165
},
166166
{
167167
xtype: 'hidden',
168-
name: 'fieldName'
168+
name: 'field'
169169
},
170170
this.hidenUrl,
171171
this.hidenBase64,

core/components/modai/src/Processors/Prompt/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function process()
1414
set_time_limit(0);
1515

1616
$prompt = $this->getProperty('prompt');
17-
$field = $this->getProperty('fieldName', '');
17+
$field = $this->getProperty('field', '');
1818
$namespace = $this->getProperty('namespace', 'modai');
1919

2020
if (empty($prompt)) {

core/components/modai/src/Processors/Prompt/Vision.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public function process()
1212
{
1313
set_time_limit(0);
1414

15-
$field = $this->getProperty('fieldName');
15+
$field = $this->getProperty('field');
1616
$namespace = $this->getProperty('namespace', 'modai');
1717
$image = $this->getProperty('image');
1818

0 commit comments

Comments
 (0)