{
"B34 的表單": {
"prefix": "form",
"scope": "html,smarty",
"body": [
"<form action=\"${1:檔案}.php\" method=\"${2|post,get|}\" id=\"${3:myForm}\" enctype=\"multipart/form-data\" class=\"form-horizontal\">",
" $0",
" <{\\$token_form}>",
" <input type=\"hidden\" name=\"op\" value=\"<{\\$next_op}>\">",
" <div class=\"bar\">",
" <button type=\"submit\" class=\"btn btn-primary\">",
" <i class=\"fa fa-save\" aria-hidden=\"true\"></i> <{\\$smarty.const._TAD_SAVE}>",
" </button>",
" </div>",
"</form>"
],
"description": "B34 的表單"
},
"B34 的 form-group>input": {
"prefix": "form-group>input",
"scope": "html,smarty",
"body": [
"<div class=\"form-group row\">",
" <label class=\"col-sm-${1:2} control-label col-form-label text-md-right\">",
" ${3:標題}",
" </label>",
" <div class=\"col-sm-${2:4}\">",
" <input type=\"text\" name=\"${4:變數名稱}\" id=\"$4\" class=\"form-control ${5|validate[required],''|}\" value=\"<{$$4}>\" placeholder=\"請輸入$3\">",
" </div>",
"</div>"
],
"description": "B34 的 form-group>input"
},
"B34 的 input": {
"prefix": "textarea",
"scope": "html,smarty",
"body": [
"<input type=\"text\" name=\"${1:變數名稱}\" id=\"$1\" class=\"form-control ${2|validate[required],''|}\" value=\"<{$$1}>\" placeholder=\"請輸入$1\">"
],
"description": "B34 的 input"
},
"B34 的 form-group>textarea": {
"prefix": "form-group>textarea",
"scope": "html,smarty",
"body": [
"<div class=\"form-group row\">",
" <label class=\"col-sm-${1:2} control-label col-form-label text-md-right\">",
" ${3:標題}",
" </label>",
" <div class=\"col-sm-${2:4}\">",
" <textarea name=\"${4:變數名稱}\" id=\"$4\" class=\"form-control ${5|validate[required],''|}\" placeholder=\"請輸入$3\"><{$$4}></textarea>",
" </div>",
"</div>"
],
"description": "B34 的 form-group>textarea"
},
"B34 的 textarea": {
"prefix": "textarea",
"scope": "html,smarty",
"body": [
"<textarea name=\"${1:name}\" id=\"$1\" class=\"form-control ${2|validate[required],''|}\" placeholder=\"請輸入$1\"><{$$1}></textarea>"
],
"description": "B34 的 textarea"
},
"B34 的 form-group>select": {
"prefix": "form-group>select",
"scope": "html,smarty",
"body": [
"<div class=\"form-group row\">",
" <label class=\"col-sm-${1:2} control-label col-form-label text-md-right\">",
" ${3:標題}",
" </label>",
" <div class=\"col-sm-${2:4}\">",
" <select name=\"${4:變數名稱}\" id=\"$4\" class=\"form-control ${5|validate[required],''|}\" placeholder=\"請輸入$3\">",
" <option value=\"${6:值}\" <{if \\$$4 == '$6'}>checked<{/if}>>$6</option>",
" </select>",
" </div>",
"</div>"
],
"description": "B34 的 form-group>select"
},
"B34 的 select": {
"prefix": "select",
"scope": "html,smarty",
"body": [
"<select name=\"${1:name}\" id=\"$1\" class=\"form-control ${2|validate[required],''|}\" placeholder=\"請輸入$1\">",
" <option value=\"${3:值}\" <{if \\$$1 == '$3'}>checked<{/if}>>$3</option>",
"</select>"
],
"description": "B34 的 select"
},
"B34 的 form-group>radio": {
"prefix": "form-group>radio",
"scope": "html,smarty",
"body": [
"<div class=\"form-group row\">",
" <label class=\"col-sm-${1:2} control-label col-form-label text-md-right\">",
" ${3:標題}",
" </label>",
" <div class=\"col-sm-${2:4}\" style=\"padding-top: 8px;\">",
" <div class=\"form-check-inline radio-inline\">",
" <label class=\"form-check-label\">",
" <input class=\"form-check-input\" type=\"radio\" name=\"${4:變數名稱}\" value=\"${5:值}\" <{if \\$$4=='$5'}>checked<{/if}>>",
" $5",
" </label>",
" </div>",
" </div>",
"</div>"
],
"description": "B34 的 form-group>radio"
},
"B34 的 radio": {
"prefix": "radio",
"scope": "html,smarty",
"body": [
"<div class=\"form-check-inline radio-inline\">",
" <label class=\"form-check-label\">",
" <input class=\"form-check-input\" type=\"radio\" name=\"${1:名稱}\" value=\"${2:值}\" <{if \\$${1:名稱}=='$2'}>checked<{/if}>>",
" $2",
" </label>",
"</div>"
],
"description": "B34的radio"
},
"B34 的 form-group>checkbox": {
"prefix": "form-group>checkbox",
"scope": "html,smarty",
"body": [
"<div class=\"form-group row\">",
" <label class=\"col-sm-${1:2} control-label col-form-label text-md-right\">",
" ${3:標題}",
" </label>",
" <div class=\"col-sm-${2:4}\" style=\"padding-top: 8px;\">",
" <div class=\"form-check-inline checkbox-inline\">",
" <label class=\"form-check-label\">",
" <input class=\"form-check-input\" type=\"checkbox\" name=\"${4:變數名稱}[]\" value=\"${5:值}\" <{if \\$$5|in_array:\\$$4_arr}>checked<{/if}>>",
" $5",
" </label>",
" </div>",
" </div>",
"</div>"
],
"description": "B34 的 form-group>checkbox"
},
"B34 的 checkbox": {
"prefix": "checkbox",
"scope": "html,smarty",
"body": [
"<div class=\"form-check-inline checkbox-inline\">",
" <label class=\"form-check-label\">",
" <input class=\"form-check-input\" type=\"checkbox\" name=\"${1:名稱}[]\" value=\"${2:值}\" <{if \\$$2|in_array:\\$$1_arr}>checked<{/if}>>",
" $2",
" </label>",
"</div>"
],
"description": "B34 的 checkbox"
},
"B34 的 input-group": {
"prefix": "input-group",
"scope": "html,smarty",
"body": [
"<div class=\"input-group\">",
" <div class=\"input-group-prepend input-group-addon\">",
" <span class=\"input-group-text\">${1:文字}</span>",
" </div>",
" <input type=\"text\" name=\"${2:name}\" class=\"form-control\" placeholder=\"${3:佔字符}\">",
" <div class=\"input-group-append input-group-btn\">",
" <button type=\"submit\" class=\"btn btn-primary\">${4:送出}</button>",
" </div>",
"</div>"
],
"description": "B34 的 input-group"
},
}