浏览代码

Fix double id

Visman 2 年之前
父节点
当前提交
0c020783d4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/templates/layouts/form.forkbb.php

+ 2 - 2
app/templates/layouts/form.forkbb.php

@@ -13,9 +13,9 @@
         @endif
         @foreach ($setVal['fields'] as $key => $cur)
             @if ('info' === $cur['type'])
-            <p id="id-{{ $cur['id'] or $key }}" class="f-yinfo"> @if ($cur['html']){!! $cur['value'] !!} @else{{ $cur['value'] }} @endif</p>
+            <p id="id-{{ $cur['id'] or $setKey.$key }}" class="f-yinfo"> @if ($cur['html']){!! $cur['value'] !!} @else{{ $cur['value'] }} @endif</p>
             @elseif ('wrap' === $cur['type'])
-            <div id="id-{{ $cur['id'] or $key }}" @if ($cur['class']) class="f-wrap-{{ \implode(' f-wrap-', $cur['class']) }}" @endif>
+            <div id="id-{{ $cur['id'] or $setKey.$key }}" @if ($cur['class']) class="f-wrap-{{ \implode(' f-wrap-', $cur['class']) }}" @endif>
             @elseif ('endwrap' === $cur['type'])
             </div>
             @else