promptedit.html.php 1.1 KB

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * The ai prompt edit view file of ai module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  6. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Zemei Wang <wangzemei@easycorp.ltd>
  8. * @package ai
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. $fields = defineFieldList('ai.createPrompt');
  13. $fields->field('name')
  14. ->label($lang->ai->prompts->name)
  15. ->control('input')
  16. ->required(true)
  17. ->value($prompt->name)
  18. ->width('full');
  19. $fields->field('desc')
  20. ->label($lang->ai->prompts->description)
  21. ->control('textarea', array('rows' => 6))
  22. ->value($prompt->desc)
  23. ->width('full');
  24. formGridPanel(set::title($title . '-' . $prompt->name), set::defaultMode('full'), set::modeSwitcher(false), set::size('sm'), set::submitBtnText($lang->save), set::fields($fields), on::inited()->call('window.initPromptForm'), on::input('[name="name"]')->call('window.changePromptName', jsRaw('event')));