fix form validation in file upload buttons

This commit is contained in:
Girish Ramakrishnan
2025-12-03 23:39:09 +01:00
parent fdac444aed
commit 97128673ff
2 changed files with 4 additions and 2 deletions
@@ -261,7 +261,8 @@ onMounted(async () => {
<input type="file" id="gcsKeyFileInput" style="display:none" accept="application/json, text/json" @change="onGcsKeyChange"/>
<label for="gcsKeyInput">{{ $t('backups.configureBackupStorage.gcsServiceKey') }}{{ providerConfig.projectId ? ` - project: ${providerConfig.projectId}` : '' }}</label>
<InputGroup>
<TextInput readonly required style="flex-grow: 1" v-model="providerConfig.credentials.client_email" placeholder="Service account key" onclick="document.getElementById('gcsKeyFileInput').click();"/>
<input style="display: none" :value="providerConfig.credentials.client_email" required /> <!-- for form validation -->
<TextInput readonly style="cursor: pointer; flex-grow: 1" v-model="providerConfig.credentials.client_email" placeholder="Service account key" onclick="document.getElementById('gcsKeyFileInput').click();"/>
<Button tool icon="fa fa-upload" onclick="document.getElementById('gcsKeyFileInput').click();"/>
</InputGroup>
<div class="error-label" v-show="gcsFileParseError">{{ gcsFileParseError }}</div>