diff --git a/resources/views/esign/template-fields.blade.php b/resources/views/esign/template-fields.blade.php
index ad96c231..262169b2 100644
--- a/resources/views/esign/template-fields.blade.php
+++ b/resources/views/esign/template-fields.blade.php
@@ -247,10 +247,16 @@ className={`w-full relative rounded border-2 transition-all ${p === currentPage
boxShadow: resizeMode ? `0 0 0 2px ${color}, 0 2px 12px rgba(0,0,0,0.2)` : (selected ? `0 0 0 1px ${color}, 0 2px 8px rgba(0,0,0,0.15)` : 'none'),
}}
className={`flex items-center select-none group transition-shadow ${{'L':'justify-start','C':'justify-center','R':'justify-end'}[field.text_align] || 'justify-start'}`}>
-
- {typeInfo.icon}
- {field.field_variable ? `{{${field.field_variable}}}` : (field.field_label || signerName)}
-
+ {field.field_type === 'checkbox' ? (
+
+ ☑
+
+ ) : (
+
+ {typeInfo.icon}
+ {field.field_variable ? `{{${field.field_variable}}}` : (field.field_label || signerName)}
+
+ )}
{/* 리사이즈 모드 안내 툴팁 */}
{resizeMode && (
@@ -290,14 +296,13 @@ className={`flex items-center select-none group transition-shadow ${{'L':'justif
const signers = Array.from({ length: signerCount }, (_, i) => ({ order: i + 1, label: SIGNER_LABELS[i] || `서명자 ${i + 1}` }));
const [newVarKey, setNewVarKey] = React.useState('');
const [newVarLabel, setNewVarLabel] = React.useState('');
- const [newVarType, setNewVarType] = React.useState('text');
const addVariable = () => {
const key = newVarKey.trim();
const label = newVarLabel.trim();
if (!key || !label) return;
if (templateVariables.some(v => v.key === key)) { alert('이미 존재하는 변수 키입니다.'); return; }
- onSetTemplateVariables([...templateVariables, { key, label, type: newVarType, default: newVarType === 'checkbox' ? false : '' }]);
+ onSetTemplateVariables([...templateVariables, { key, label, type: 'text', default: '' }]);
setNewVarKey('');
setNewVarLabel('');
};
@@ -333,12 +338,9 @@ className="border rounded px-2 py-1 text-xs flex-1">
{templateVariables.length === 0 &&
정의된 변수 없음
}
{templateVariables.map(v => (
-
+
-
- {v.key}
- {v.type === 'checkbox' && ☑}
-
+
{v.key}
{v.label}
@@ -346,13 +348,8 @@ className="border rounded px-2 py-1 text-xs flex-1">
))}
-
setNewVarKey(e.target.value.replace(/[^a-z0-9_]/gi, ''))}
- placeholder="키 (영문)" className="border rounded px-1.5 py-1 text-[10px] w-16" />
+ placeholder="키 (영문)" className="border rounded px-1.5 py-1 text-[10px] w-20" />
setNewVarLabel(e.target.value)}
placeholder="표시명" className="border rounded px-1.5 py-1 text-[10px] flex-1"
onKeyDown={e => e.key === 'Enter' && addVariable()} />
@@ -416,28 +413,30 @@ className="w-full border rounded px-2 py-1 text-xs mt-0.5">
placeholder="선택사항"
className="w-full border rounded px-2 py-1 text-xs mt-0.5" />
- {['text', 'date', 'checkbox'].includes(selectedField.field_type) && (
+ {selectedField.field_type === 'checkbox' && (
+
+ ☑ 이 위치에 체크 표시가 렌더링됩니다
+
+ )}
+ {['text', 'date'].includes(selectedField.field_type) && (
{selectedField.field_variable && (
{`{{${selectedField.field_variable}}}`}
- {selectedField.field_type === 'checkbox' && (체크 시 ☑ 표시)}
)}