* alter alter to zui messager.
This commit is contained in:
@@ -57,7 +57,7 @@ function validateForm()
|
||||
const model = document.getElementById('model')?.value;
|
||||
if(!model)
|
||||
{
|
||||
alert('<?php echo sprintf($lang->ai->validate->noEmpty, $lang->ai->prompts->model)?>');
|
||||
$.zui.messager.danger('<?php echo sprintf($lang->ai->validate->noEmpty, $lang->ai->prompts->model);?>');
|
||||
pass = false;
|
||||
}
|
||||
return pass;
|
||||
|
||||
@@ -56,8 +56,8 @@ function validateForm()
|
||||
const name = document.getElementById('name')?.value;
|
||||
if(!name)
|
||||
{
|
||||
$.zui.messager.danger('<?php echo sprintf($lang->ai->validate->noEmpty, $lang->ai->prompts->name);?>');
|
||||
pass = false;
|
||||
alert('<?php echo sprintf($lang->ai->validate->noEmpty, $lang->ai->prompts->name);?>');
|
||||
}
|
||||
return pass;
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ function validateForm()
|
||||
const dataSource = document.querySelector('input[name="datasource"]')?.value;
|
||||
if(!dataGroup || !dataSource)
|
||||
{
|
||||
alert('<?php echo sprintf($lang->ai->validate->noEmpty, $lang->ai->prompts->selectDataSource);?>');
|
||||
$.zui.messager.danger('<?php echo sprintf($lang->ai->validate->noEmpty, $lang->ai->prompts->selectDataSource);?>');
|
||||
pass = false;
|
||||
}
|
||||
if(pass)
|
||||
|
||||
@@ -143,7 +143,7 @@ function validateForm()
|
||||
if(!purpose)
|
||||
{
|
||||
pass = false;
|
||||
alert('<?php echo sprintf($lang->ai->validate->noEmpty, $lang->ai->prompts->purpose);?>');
|
||||
$.zui.messager.danger('<?php echo sprintf($lang->ai->validate->noEmpty, $lang->ai->prompts->purpose);?>');
|
||||
}
|
||||
return pass;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ function validateForm()
|
||||
}
|
||||
if(!pass)
|
||||
{
|
||||
alert('<?php echo sprintf($lang->ai->validate->noEmpty, $lang->ai->prompts->selectTargetForm);?>');
|
||||
$.zui.messager.danger('<?php echo sprintf($lang->ai->validate->noEmpty, $lang->ai->prompts->selectTargetForm);?>');
|
||||
}
|
||||
return pass;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user