diff --git a/module/ai/view/promptassignrole.html.php b/module/ai/view/promptassignrole.html.php
index d097ef8c53..97f9043a8f 100644
--- a/module/ai/view/promptassignrole.html.php
+++ b/module/ai/view/promptassignrole.html.php
@@ -57,7 +57,7 @@ function validateForm()
const model = document.getElementById('model')?.value;
if(!model)
{
- alert('ai->validate->noEmpty, $lang->ai->prompts->model)?>');
+ $.zui.messager.danger('ai->validate->noEmpty, $lang->ai->prompts->model);?>');
pass = false;
}
return pass;
diff --git a/module/ai/view/promptfinalize.html.php b/module/ai/view/promptfinalize.html.php
index 31b4e22705..bef4504f60 100644
--- a/module/ai/view/promptfinalize.html.php
+++ b/module/ai/view/promptfinalize.html.php
@@ -56,8 +56,8 @@ function validateForm()
const name = document.getElementById('name')?.value;
if(!name)
{
+ $.zui.messager.danger('ai->validate->noEmpty, $lang->ai->prompts->name);?>');
pass = false;
- alert('ai->validate->noEmpty, $lang->ai->prompts->name);?>');
}
return pass;
}
diff --git a/module/ai/view/promptselectdatasource.html.php b/module/ai/view/promptselectdatasource.html.php
index e15858f00e..c8bad74956 100644
--- a/module/ai/view/promptselectdatasource.html.php
+++ b/module/ai/view/promptselectdatasource.html.php
@@ -432,7 +432,7 @@ function validateForm()
const dataSource = document.querySelector('input[name="datasource"]')?.value;
if(!dataGroup || !dataSource)
{
- alert('ai->validate->noEmpty, $lang->ai->prompts->selectDataSource);?>');
+ $.zui.messager.danger('ai->validate->noEmpty, $lang->ai->prompts->selectDataSource);?>');
pass = false;
}
if(pass)
diff --git a/module/ai/view/promptsetpurpose.html.php b/module/ai/view/promptsetpurpose.html.php
index 7566b5ac55..df0bc437e2 100644
--- a/module/ai/view/promptsetpurpose.html.php
+++ b/module/ai/view/promptsetpurpose.html.php
@@ -143,7 +143,7 @@ function validateForm()
if(!purpose)
{
pass = false;
- alert('ai->validate->noEmpty, $lang->ai->prompts->purpose);?>');
+ $.zui.messager.danger('ai->validate->noEmpty, $lang->ai->prompts->purpose);?>');
}
return pass;
}
diff --git a/module/ai/view/promptsettargetform.html.php b/module/ai/view/promptsettargetform.html.php
index 11330204c3..bc18c9504f 100644
--- a/module/ai/view/promptsettargetform.html.php
+++ b/module/ai/view/promptsettargetform.html.php
@@ -123,7 +123,7 @@ function validateForm()
}
if(!pass)
{
- alert('ai->validate->noEmpty, $lang->ai->prompts->selectTargetForm);?>');
+ $.zui.messager.danger('ai->validate->noEmpty, $lang->ai->prompts->selectTargetForm);?>');
}
return pass;
}