<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
              <form id="actioninfoPrefix-form">
                <div class="row g-3">
                  <div class="col-md-12">
                    <div class="row">
                      <label class="col-sm-2 col-form-label text-sm-end" for="id"
                        >아이디</label
                      >
                      <div class="col-sm-10">
                        <input name="id" type="text" required data-map="GRP_ID" maxlength="50" class="form-control" placeholder="prefixName 아이디" />
                      </div>
                    </div>
                  </div>
                  <div class="col-md-12">
                    <div class="row">
                      <label class="col-sm-2 col-form-label text-sm-end" for="name"
                        >이름</label
                      >
                      <div class="col-sm-10">
                        <input name="name" type="text" required  data-map="GRP_NM" maxlength="60" class="form-control" placeholder="prefixName 이름" />
                      </div>
                    </div>
                  </div>
                  <div class="col-md-12">
                    <div class="row">
                      <label class="col-sm-2 col-form-label text-sm-end" for="description"
                        >설명</label
                      >
                      <div class="col-sm-10">
                        <input name="description" type="text" data-map="DSCRP" maxlength="200" class="form-control dob-picker" placeholder="prefixName 설명"/>
                      </div>
                    </div>
                  </div>
                <div class="row mt-4 justify-content-end">
                      <div class="col-sm-12 text-end">
                        <button onclick="saveinfoPrefix();" type="button" class="btn btn-primary">저장</button>
                      </div>
                </div>
              </form>
<script type="text/javascript">

var actioninfoPrefixFields = new FormFields("#actioninfoPrefix-form");

actioninfoPrefixControl.groups.setInfo = obj => {
	actioninfoPrefixFields.set(actioninfoPrefixControl, obj);
	let create = isEmpty(obj.data.GRP_ID);
	$("input[name='id']").prop("readonly", !create);
	$("#actioninfoPrefix-form input").onEnterPress(saveinfoPrefix);
	
	document.querySelector("input[name='" + (create ? "id" : "name") + "']").focus();
}

actioninfoPrefixControl.groups.onModify = (changed) => {
	if (["GRP_NM"].filter(e => changed.includes(e)).length < 1)
		return;
	
	renderactioninfoPrefixList();
	actioninfoPrefixControl.groups.dataset.setState();
}

function saveinfoPrefix() {
	if (!$("#actioninfoPrefix-form input").validInputs()) return;
	
	dialog.alert({
		content:"현재 prefixName 정보를 저장하시겠습니까?",
		onOK:() => {
			actioninfoPrefixControl.groups.save(actioninfoPrefixFields.get());
		}
	});
}
//# sourceURL=actionGroup-info.jsp
</script>