885cf3bf895eb0bafc698030340a934f.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:92:"F:\docker_www\cjq.wngluo.org.cn_YAZSE\vendor\skycaiji\app\admin\view\taskgroup\add_ajax.html";i:1750210657;s:92:"F:\docker_www\cjq.wngluo.org.cn_YAZSE\vendor\skycaiji\app\admin\view\taskgroup\add_form.html";i:1750210657;}*/ ?>
  2. <form id="form_item" method="post" ajax-submit="true" role="form" action="<?php echo url('taskgroup/'.($tgData?'edit':'add')); ?>">
  3. <?php echo html_usertoken(); ?>
  4. <input type="hidden" name="referer" value="<?php echo $_SERVER['HTTP_REFERER']; ?>" />
  5. <?php if($tgData): ?>
  6. <input type="hidden" name="id" value="<?php echo $tgData['id']; ?>" />
  7. <?php endif; ?>
  8. <div class="form-group">
  9. <label><?php echo \think\Lang::get('taskgroup_name'); ?></label>
  10. <input type="text" class="form-control" name="name" value="<?php echo !empty($tgData)?$tgData['name']:''; ?>">
  11. </div>
  12. <div class="form-group">
  13. <label><?php echo \think\Lang::get('taskgroup_parent_id'); ?></label>
  14. <select name="parent_id" class="form-control">
  15. <option value="0"><?php echo \think\Lang::get('none'); ?></option>
  16. <?php if(is_array($parentTgList) || $parentTgList instanceof \think\Collection || $parentTgList instanceof \think\Paginator): if( count($parentTgList)==0 ) : echo "" ;else: foreach($parentTgList as $tgId=>$tgName): ?>
  17. <option value="<?php echo $tgId; ?>"><?php echo $tgName; ?></option>
  18. <?php endforeach; endif; else: echo "" ;endif; ?>
  19. </select>
  20. </div>
  21. <div class="form-group">
  22. <label><?php echo \think\Lang::get('taskgroup_sort'); ?></label>
  23. <input type="number" class="form-control" name="sort" autocomplete="off" value="<?php echo !empty($tgData)?intval($tgData['sort']):0; ?>">
  24. <p class="help-block"><?php echo \think\Lang::get('taskgroup_sort_help'); ?></p>
  25. </div>
  26. <button type="submit" class="btn btn-primary btn-block"><?php echo \think\Lang::get('submit'); ?></button>
  27. </form>
  28. <script type="text/javascript">
  29. <?php if($tgData&&$tgData['parent_id']): ?>
  30. $('#form_item select[name="parent_id"]').val("<?php echo $tgData['parent_id']; ?>");
  31. <?php endif; if(input('parent_id')): ?>
  32. $('#form_item select[name="parent_id"]').val("<?php echo input('parent_id'); ?>");
  33. <?php endif; ?>
  34. </script>