fix
This commit is contained in:
parent
183244e07b
commit
eb97c16f19
@ -53,8 +53,8 @@
|
||||
<option value="{% if IsSub %}custom{% else %}none{% endif %}">Inference Endpoints</option>
|
||||
</select>
|
||||
</div>
|
||||
<p class="is-hidden" style="color: red;" id="endpoint-error"></p>
|
||||
<small>You can only use custom endpoint if you are a subscriber</small>
|
||||
<p class="is-hidden" style="color: red;" id="endpoint-error">
|
||||
<small>Need subscription</small>
|
||||
</p>
|
||||
<input class="input is-small mb-3 is-hidden" type="text" id="model-cid-input" name="model-cid-input"
|
||||
placeholder="Model id" autocomplete="off">
|
||||
@ -107,7 +107,7 @@
|
||||
});
|
||||
|
||||
document.getElementById('model-name-input').addEventListener('input', function () {
|
||||
document.getElementById('confirm-create-model-button').disabled = this.value === '';
|
||||
document.getElementById('confirm-create-model-button').disabled = this.value === '' || !document.getElementById('endpoint-error').classList.contains('is-hidden');
|
||||
})
|
||||
|
||||
document.addEventListener('click', function (event) {
|
||||
@ -124,8 +124,10 @@
|
||||
|
||||
if (this.value === 'none') {
|
||||
document.getElementById('endpoint-error').classList.remove('is-hidden');
|
||||
document.getElementById('confirm-create-model-button').disabled = true;
|
||||
} else {
|
||||
document.getElementById('endpoint-error').classList.add('is-hidden');
|
||||
document.getElementById('confirm-create-model-button').disabled = false;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user