<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>偏好设置-Smartcost</title>
    <link rel="stylesheet" href="/lib/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/web/building_saas/css/main.css">
    <link rel="stylesheet" href="/lib/font-awesome/font-awesome.min.css">
</head>

<body>
    <div class="header">
        <%include ../../common/html/header.html %>
    </div>
    <div class="main">
        <div class="poj-manage container-fluid">
            <div class="row">
                <div class="col-lg-2">
                    <div class="poj-cate mt-3">
                        <ul class="nav nav-pills flex-column">
                            <li class="nav-item">
                                <a class="nav-link" href="user-info.html">账号资料</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="user-safe.html">账号安全</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" href="user-buy.html">产品购买</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link active" href="user-set.html">偏好设置</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="col-lg-10">
                    <div class="col-lg-4">
                        <legend class="my-3">偏好设置</legend>
                        <form method="post" action="/user/save-preferences">
                            <div class="form-group">
                                <label class="form-control-label">登录时选择版本</label>
                                <div>
                                    <label class="custom-control custom-radio">
                                      <input name="login_ask" type="radio" class="custom-control-input" value="1"
                                        <% if(preferenceSetting.login_ask === 1) { %>checked="checked" <% } %>>
                                      <span class="custom-control-indicator"></span>
                                      <span class="custom-control-description">每次询问</span>
                                    </label>
                                    <label class="custom-control custom-radio">
                                      <input name="login_ask" type="radio" class="custom-control-input" value="0"
                                        <% if(preferenceSetting.login_ask === 0) { %>checked="checked" <% } %>>
                                      <span class="custom-control-indicator"></span>
                                      <span class="custom-control-description">指定版本</span>
                                    </label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="form-control-label">指定版本</label>
                                <select class="form-control" name="select_version">
                                    <option value="">请选择版本</option>
                                    <% if (compilationList.length > 0) {%>
                                    <% compilationList.forEach(function(compilation) { %>
                                    <option value="<%= compilation._id %>" <% if(preferenceSetting.select_version === compilation._id.toString()) { %>selected="selected" <% } %>><%= compilation.name %></option>
                                    <% }) %>
                                    <% } %>
                                </select>
                            </div>
                            <div class="form-group mt-3">
                                <button class="btn btn-primary" type="submit">确认</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- JS. -->
    <script src="/lib/jquery/jquery.min.js"></script>
    <script src="/lib/tether/tether.min.js"></script>
    <script src="/lib/bootstrap/bootstrap.min.js"></script>
    <script src="/web/building_saas/js/global.js"></script>
</body>
<script type="text/javascript">
    autoFlashHeight();
</script>

</html>
