<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@include file="/WEB-INF/ehr/commons/jsp/commonInclude.jsp" %>

<!--######应用管理页面 > 应用详情模板页######-->
<div id="div_info_form" class="m-form-inline" style="padding-top:10px;" data-role-form>
    <input id="flag" value="${flag}" style="display: none">
    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>应用名称：</label>

        <div class="m-form-control ">
            <div class="l-text">
                <input type="text" class="l-text-field required" placeholder="请输入应用名称" name="name"/>
            </div>
        </div>
    </div>
    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>英文名称：</label>

        <div class="m-form-control">
            <div class="l-text">
                <input type="text" class="l-text-field required" placeholder="请输入英文名称" name="code"/>
            </div>
        </div>
    </div>

    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>图标：</label>
        <div class="m-form-control">
            <c:choose>
                <c:when test="${model.icon!='' && model.icon !=null}">
                    <img style="width: 60px;" src="${dfs}/${model.icon}" id="img_icon" >
                </c:when>
                <c:otherwise>
                    <img style="width: 60px;" src="${dfs}/${model.icon}" id="img_icon" hidden="hidden" >
                </c:otherwise>
            </c:choose>

        </div>
    </div>
    <div class="m-form-group">
        <label><span class="red"></span></label>

        <div class="m-form-control">
            <form id="form1" action="${dfs}" method="post" enctype="multipart/form-data">
                    <input type="text" id="name_icon" name="icon" class="l-textbox btnGrayUp" style="width: 144px;"  placeholder="点击选择应用图标" readonly="readonly" data-id=""/>
                    <div style="float: right;">
                        <div  class="l-button l-button-no btnGrayDo" data-id="1">
                            <span style="background-color: rgb(240, 240, 240);">上传</span>
                        </div>
                        <label class="say1" style="display: inline-block;width: 70px;"></label>
                    </div>
                <input type="file" name="file" style="display: none" id="file1" accept="image/jpg,image/jpeg,image/gif" />
            </form>
        </div>
    </div>


    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>回调URL：</label>

        <div class="m-form-control">
            <div class="l-text">
                <input type="text" class="l-text-field required" placeholder="请输入回调URL" name="appUrl"/>
            </div>
        </div>
    </div>
    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>开发者：</label>

        <div class="m-form-control">
            <div class="l-text">
                <input type="text" class="l-text-field required" placeholder="请输入开发者名称" name="developer"/>
            </div>
        </div>
    </div>
    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>appKey：</label>

        <div class="m-form-control">
            <div class="l-text">
                <input type="text" class="l-text-field required" placeholder="请输入appKey" name="appKey"/>
            </div>
        </div>
    </div>
    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>appSecret：</label>
        <div class="m-form-control ">
            <div class="l-text">
                <input type="text"  class="l-text-field required"  placeholder="请输入appSecret" name="appSecret">
            </div>
        </div>
    </div>
    <div class="m-form-group">
        <label><span class="red">*&nbsp;</span>状态：</label>
        <div class="m-form-control ">
            <div class="l-text">
                <input type="text" id="status"  class="l-text-field required" name="status">
            </div>
        </div>
    </div>

    <!-- 隐藏字段 -->
    <div class="m-form-group" style="display: none;">
        <input name="id" hidden="hidden"/>
    </div>
    <div class="m-form-bottom">
        <div id="btnCancel" class="l-button l-button-no">
            <span>关闭</span>
        </div>
        <div id="btnEditor" class="l-button" style="display: no">
            <span>编辑</span>
        </div>
        <div id="btnSave" class="l-button">
            <span>保存</span>
        </div>
    </div>
</div>

<style>
    .m-form-group label{width: 135px;}
    .btnGrayUp.required{border: #FF7777 1px solid; float: left;}
</style>