{$layout}

<div class="margin"></div>

<div class="audit-message warning" v-if="!user.isVerified">
  <i class="icon warning circle"></i>
  请耐心等待管理员审核。
</div>
<div class="audit-message error" v-if="user.isVerified && user.isRejected">
  <i class="icon error circle"></i>
  注册信息被拒绝<span v-if="user.rejectReason.length > 0">原因：{{user.rejectReason}}</span>。
</div>

<div class="http-config-container">
  <form method="post" class="ui form http-config-form" data-tea-action="$" data-tea-success="success">
    <div class="config-section">
      <div class="section-title">
        <i class="icon mobile"></i>
        手机号设置
      </div>
      
      <div class="config-item">
        <div class="item-label">
          <i class="icon phone"></i>
          联系手机号 *
        </div>
        <div class="item-content">
          <input type="text" name="mobile" maxlength="11" placeholder="手机号" v-model="user.mobile" />
        </div>
      </div>
      
      <div class="config-item">
        <div class="item-label">
          <i class="icon check circle"></i>
          已绑定手机号码
        </div>
        <div class="item-content">
          <span v-if="user.verifiedMobile.length > 0">{{user.verifiedMobile}} &nbsp; <a
                  href="/settings/mobile-verify" v-if="mobileRequireVerification">修改</a>
          </span>
          <span class="disabled" v-else>没有设置 &nbsp; &nbsp; <a href="/settings/mobile-verify"
                  v-if="mobileRequireVerification">设置</a>
          </span>
          <p class="comment">用于登录系统、找回密码等。</p>
        </div>
      </div>
    </div>
    
    <div class="config-section">
      <div class="section-title">
        <i class="icon mail"></i>
        邮箱设置
      </div>
      
      <div class="config-item">
        <div class="item-label">
          <i class="icon at"></i>
          常用电子邮箱
        </div>
        <div class="item-content">
          <input type="text" name="email" maxlength="100" placeholder="常用电子邮箱" v-model="user.email" />
          <p class="comment">用于接收系统通知、账单提醒等。</p>
        </div>
      </div>
      
      <div class="config-item" v-if="user.verifiedEmail.length > 0 || latestEmailVerification == null">
        <div class="item-label">
          <i class="icon check circle"></i>
          已绑定电子邮箱
        </div>
        <div class="item-content">
          <span v-if="user.verifiedEmail.length > 0">{{user.verifiedEmail}} &nbsp; <a
                  href="/settings/email-verify" v-if="emailRequireVerification">修改</a>
          </span>
          <span class="disabled" v-else>没有设置 &nbsp; &nbsp; <a href="/settings/email-verify"
                  v-if="emailRequireVerification">设置</a>
          </span>
          <p class="comment">用于登录系统、找回密码等。</p>
        </div>
      </div>
      
      <div class="config-item" v-if="latestEmailVerification != null">
        <div class="item-label">
          <i class="icon clock"></i>
          等待绑定邮箱
        </div>
        <div class="item-content">
          <span>{{latestEmailVerification.email}} &nbsp; <a href="/settings/email-verify"
                  v-if="emailRequireVerification">修改</a>
          </span>
          <p class="comment" v-if="!latestEmailVerification.isSent">系统正在发送绑定链接到此邮箱中，请耐心等待。</p>
          <p class="comment" v-if="latestEmailVerification.isSent"><span
                  class="red">请在{{latestEmailVerification.expiresTime}}前点击邮件中的激活链接进行绑定。</span></p>
        </div>
      </div>
    </div>
    
    <div class="config-section">
      <div class="section-title">
        <i class="icon user"></i>
        用户信息
      </div>
      
      <div class="config-item">
        <div class="item-label">
          <i class="icon id card"></i>
          用户姓名或者公司名称 *
        </div>
        <div class="item-content">
          <input type="text" name="fullname" maxlength="50" ref="focus" v-model="user.fullname"
                 placeholder="用户姓名或者公司名称" />
        </div>
      </div>
    </div>
        <table class="ui table definition selectable">
		<tr>
			<td class="title">语言 </td>
			<td>
                <select name="lang" v-model="user.lang">
                    <option value="">跟随系统</option>
                    <option value="zh_CN">简体中文</option>
                    <option value="en_US">English</option>
                </select>
			</td>
		</tr>
	</table>
    <submit-btn></submit-btn>
  </form>
</div>
