<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="新增OA请假单" bodyClass="white-bg" libs=["bootstrapSelect"]/>
<div class="wrapper wrapper-content ibox-content">
<@f.form id="form-form-add" class="form-horizontal">
    <input  type="hidden" name="userId" value="${user.id}">
    <input  type="hidden" name="userName" value="${user.name}">
    <input  type="hidden" name="modelKey" value="${bpmTaskFrom.modelKey}">
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "表单名称"/>：</label>
        <div class="col-sm-8">
            <input name="fromName"  value="${bpmTaskFrom.fromName}" class="form-control" type="text" readonly="true">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "开始时间"/>：</label>
        <div class="col-sm-8">
            <div class="input-group date">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input class="form-control time-input" name="startTime"  data-type="date" data-format="yyyy-MM-dd" type="text"  required>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "结束时间"/>：</label>
        <div class="col-sm-8">
            <div class="input-group date">
                <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                <input class="form-control time-input" name="endTime"  data-type="date" data-format="yyyy-MM-dd" type="text"  required>
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "请假天数"/>：
                         </label>
        <div class="col-sm-8">
            <input name="leaveDays" class="form-control" type="text" required>
                            </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "请假类型"/>：</label>
        <div class="col-sm-8">
            <@f.select name="leaveType" dictType="sys_leave_type" />
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "请假原因"/>：</label>
        <div class="col-sm-8">
            <textarea name="leaveReason" class="form-control" required></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "备注"/>：
                         </label>
        <div class="col-sm-8">
            <input name="remark" class="form-control" type="text">
                            </div>
    </div>
</@f.form>
</div>
<@footer>
<script type="text/javascript">
    var prefix = baseURL + "bpm/form"
    $("#form-form-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if (opt.validate.form()) {
            opt.operate.save(prefix + "/add", $('#form-form-add').serialize());
        }
    }
</script>
</@footer>
</@pageTheme>