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>
|
<option value="{% if IsSub %}custom{% else %}none{% endif %}">Inference Endpoints</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<p class="is-hidden" style="color: red;" id="endpoint-error"></p>
|
<p class="is-hidden" style="color: red;" id="endpoint-error">
|
||||||
<small>You can only use custom endpoint if you are a subscriber</small>
|
<small>Need subscription</small>
|
||||||
</p>
|
</p>
|
||||||
<input class="input is-small mb-3 is-hidden" type="text" id="model-cid-input" name="model-cid-input"
|
<input class="input is-small mb-3 is-hidden" type="text" id="model-cid-input" name="model-cid-input"
|
||||||
placeholder="Model id" autocomplete="off">
|
placeholder="Model id" autocomplete="off">
|
||||||
@ -107,7 +107,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('model-name-input').addEventListener('input', function () {
|
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) {
|
document.addEventListener('click', function (event) {
|
||||||
@ -124,8 +124,10 @@
|
|||||||
|
|
||||||
if (this.value === 'none') {
|
if (this.value === 'none') {
|
||||||
document.getElementById('endpoint-error').classList.remove('is-hidden');
|
document.getElementById('endpoint-error').classList.remove('is-hidden');
|
||||||
|
document.getElementById('confirm-create-model-button').disabled = true;
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('endpoint-error').classList.add('is-hidden');
|
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