createprompt.html.php 1.0 KB

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * The ai createPrompt 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. ->width('full');
  18. $fields->field('desc')
  19. ->label($lang->ai->prompts->description)
  20. ->control('textarea', array('rows' => 6))
  21. ->width('full');
  22. formGridPanel(set::title($title), set::defaultMode('full'), set::modeSwitcher(false), set::size('sm'), set::submitBtnText($lang->ai->nextStep), set::fields($fields), on::inited()->call('window.initPromptForm'), on::input('[name="name"]')->call('window.changePromptName', jsRaw('event')));