mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-10 09:34:30 +01:00
Field validation
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<div class="form-group col-md-4">
|
||||
<label> </label>
|
||||
<select class="form-control" v-model="srvModel.currency" v-on:change="inputChanges">
|
||||
@foreach(var item in Model.CurrencyDropdown)
|
||||
@foreach (var item in Model.CurrencyDropdown)
|
||||
{
|
||||
<option>@item</option>
|
||||
}
|
||||
@@ -78,8 +78,11 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Send Email Notifications to</label>
|
||||
<input type="text" class="form-control" placeholder="(optional)"
|
||||
v-model="srvModel.emailToNotify" v-on:change="inputChanges">
|
||||
<input type="text" name="emailToNotify" class="form-control" placeholder="(optional)"
|
||||
v-model="srvModel.emailToNotify" v-on:change="inputChanges"
|
||||
v-validate="'email'" :class="{'is-invalid': errors.has('emailToNotify') }">
|
||||
<small class="text-danger">{{ errors.first('emailToNotify') }}</small>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Browser Redirect</label>
|
||||
@@ -116,8 +119,12 @@
|
||||
<script src="~/vendor/highlightjs/highlight.min.js"></script>
|
||||
|
||||
<script src="~/vendor/vuejs/vue.js"></script>
|
||||
<!-- jsdelivr cdn -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/vee-validate@latest/dist/vee-validate.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var srvModel = @Html.Raw(Json.Serialize(Model));
|
||||
Vue.use(VeeValidate);
|
||||
var payButtonCtrl = new Vue({
|
||||
el: '#payButtonCtrl',
|
||||
data: {
|
||||
@@ -128,7 +135,7 @@
|
||||
inputChanges(event, buttonSize);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function inputChanges(event, buttonSize) {
|
||||
if (buttonSize != null) {
|
||||
|
||||
Reference in New Issue
Block a user