证书上传时可以选择输入文本内容

This commit is contained in:
刘祥超
2021-10-09 17:30:05 +08:00
parent d5b5af5d3a
commit dbc60ccca4
9 changed files with 2617 additions and 902 deletions

View File

@@ -4,6 +4,7 @@
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
<input type="hidden" name="certId" :value="certConfig.id"/>
<input type="hidden" name="textMode" :value="textMode ? 1 : 0"/>
<table class="ui table definition selectable">
<tr>
<td class="title">证书说明 *</td>
@@ -24,15 +25,17 @@
<tr>
<td>选择证书文件</td>
<td>
<input type="file" name="certFile" accept="application/x-pem-file, application/pkcs10, application/x-pkcs12, application/x-x509-user-cert, application/x-x509-ca-cert, application/pkix-cert"/>
<p class="comment">内容中通常含有"-----BEGIN CERTIFICATE-----"类似的信息。</p>
<input type="file" name="certFile" accept="application/x-pem-file, application/pkcs10, application/x-pkcs12, application/x-x509-user-cert, application/x-x509-ca-cert, application/pkix-cert" v-if="!textMode"/>
<textarea name="certText" placeholder="-----BEGIN CERTIFICATE-----" v-if="textMode"></textarea>
<p class="comment"><a href="" @click.prevent="switchTextMode">[<span v-if="!textMode">输入内容</span><span v-else>上传文件</span>]</a>。文件内容中通常含有"-----BEGIN CERTIFICATE-----"类似的信息。</p>
</td>
</tr>
<tr v-show="isCA == 0">
<td>选择私钥文件</td>
<td>
<input type="file" name="keyFile" accept="application/pkcs8"/>
<p class="comment">内容中通常含有"-----BEGIN RSA PRIVATE KEY-----"类似的信息。</p>
<input type="file" name="keyFile" accept="application/pkcs8" v-if="!textMode"/>
<textarea name="keyText" placeholder="-----BEGIN RSA PRIVATE KEY-----" v-if="textMode"></textarea>
<p class="comment"><a href="" @click.prevent="switchTextMode">[<span v-if="!textMode">输入内容</span><span v-else>上传文件</span>]</a>。文件内容中通常含有"-----BEGIN RSA PRIVATE KEY-----"类似的信息。</p>
</td>
</tr>
<tr>