...
This commit is contained in:
@@ -42,33 +42,36 @@
|
||||
<div class="row gx-20">
|
||||
<div class="col-12">
|
||||
<div class="postbox__comment-input mb-30">
|
||||
<InputText onkeydown="@OnClearmessageStore" @bind-Value="model.FullName" id="FullName" type="text" class="inputText" required="" />
|
||||
<InputText style="text-align:center" onkeydown="@OnClearmessageStore" @bind-Value="model.FullName" id="FullName" type="text" class="inputText" required="" />
|
||||
<span class="floating-label">نام شما</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="postbox__comment-input mb-35">
|
||||
<InputText onkeydown="@OnClearmessageStore" @bind-Value="model.Mobile" id="Mobile" type="text" class="inputText" required="" />
|
||||
<InputText dir="ltr" style="text-align:center" onkeydown="@OnClearmessageStore" @bind-Value="model.Mobile" id="Mobile" type="number" class="inputText" required="" />
|
||||
<span class="floating-label">موبایل</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="postbox__comment-input mb-35">
|
||||
<InputText @bind-Value="model.Title" id="Title" type="text" class="inputText" required=""/>
|
||||
<InputText style="text-align:right" @bind-Value="model.Title" id="Title" type="text" class="inputText" required="" />
|
||||
<span class="floating-label">عنوان</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xxl-12">
|
||||
<div class="postbox__comment-input mb-30">
|
||||
<InputText @bind-Value="model.Text" id="Text" class="textareaText" required=""></InputText>
|
||||
<InputText style="text-align:right" @bind-Value="model.Text" id="Text" class="textareaText" required=""></InputText>
|
||||
<span class="floating-label-2">پیام شما ...</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xxl-12">
|
||||
<div class="col-xxl-10">
|
||||
<div class="postbox__btn-box">
|
||||
<button type="submit" class="submit-btn w-100">ارسال پیام</button>
|
||||
<Button Disabled="SpinnerVisible" Type="ButtonType.Submit" Color="ButtonColor.Primary">ارسال پیام</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2" style="align-content:center">
|
||||
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
|
||||
</div>
|
||||
</div>
|
||||
</EditForm>
|
||||
|
||||
@@ -83,7 +86,7 @@
|
||||
|
||||
|
||||
@code {
|
||||
|
||||
public bool SpinnerVisible { get; set; } = false;
|
||||
string type = "NewTicketNoAuthentication";
|
||||
private EditContext? editContext;
|
||||
[SupplyParameterFromForm]
|
||||
@@ -97,7 +100,7 @@
|
||||
// editContext = new(modelTaxTools);
|
||||
// editContext.OnValidationRequested += HandleValidationRequested;
|
||||
// messageStore = new(editContext);
|
||||
|
||||
SpinnerVisible = false;
|
||||
editContext = new EditContext(model);
|
||||
messageStore = new(editContext);
|
||||
}
|
||||
@@ -105,7 +108,7 @@
|
||||
@functions{
|
||||
private async Task OnClearmessageStore() => messageStore?.Clear();
|
||||
private async Task newTicket(){
|
||||
|
||||
SpinnerVisible = true;
|
||||
var request = await _hc.PostAsJsonAsync("Ticket/NewTicketNoAuthentication", model);
|
||||
if (request.IsSuccessStatusCode)
|
||||
{
|
||||
@@ -119,6 +122,7 @@
|
||||
messageStore?.Add(() => model.Mobile, error);
|
||||
|
||||
}
|
||||
SpinnerVisible = false;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user