<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="新增模块" bodyClass="white-bg"/>
<div class="wrapper wrapper-content ibox-content">
<@f.form id="form-sysModule-add" class="form-horizontal">
    <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">
            <@f.input name="moduleName" required=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">
            <@f.input name="moduleCode" required=true/>
        </div>
    </div>
    <div class="form-group">
    <label class="col-sm-3 control-label"><@ctx.i18n text = "图标"/>：
        <a tabindex="0" role="button" data-toggle="popover" data-trigger="focus" data-html="true" data-placement="bottom"
           data-content="自定义获取图标:<a href='http://www.fontawesome.com.cn/faicons/' target='_blank'>http://www.fontawesome.com.cn/faicons/</a>">
            <i class="fa fa-question-circle-o" style="color: orange"></i></a>
    </label>
    <div class="col-sm-8">
        <@f.iconselect name="icon" placeholder="选择图标"/>
    </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">
            <@f.textarea name="description" required=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">
            <@f.input name="mainClassName" required=true helpTip = "该模块的状态验证类，如果该类检测不存在，则该模块状态提示 \"未安装\",验证原理：Class.forName()"/>
        </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">
            <@f.input name="currentVersion" required=true/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "备注信息"/>：</label>
        <div class="col-sm-8">
            <@f.textarea name="remark"/>
        </div>
    </div>
</@f.form>
</div>
<@footer>
<script type="text/javascript">
    var prefix = baseURL + "sys/module"
    $("#form-sysModule-add").validate({
        focusCleanup: true
    });

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