To/From Fields enabled/disabled, reply message fix
This commit is contained in:
parent
41348b285d
commit
7b9cd39cb7
|
@ -1,10 +1,4 @@
|
|||
@namespace Oqtane.Modules.Admin.UserProfile
|
||||
@inherits ModuleBase
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IUserService UserService
|
||||
@inject INotificationService NotificationService
|
||||
|
||||
@if (PageState.User != null)
|
||||
@if (PageState.User != null)
|
||||
{
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
|
@ -23,6 +17,19 @@
|
|||
<input class="form-control" @bind="@subject" />
|
||||
</td>
|
||||
</tr>
|
||||
@if (title == "From")
|
||||
{
|
||||
<td>
|
||||
<input class="form-control" @bind="@subject" readonly />
|
||||
</td>
|
||||
}
|
||||
@if (title == "To")
|
||||
{
|
||||
<td>
|
||||
<input class="form-control" @bind="@subject" />
|
||||
</td>
|
||||
</tr>}
|
||||
|
||||
@if (title == "From")
|
||||
{
|
||||
<tr>
|
||||
|
@ -30,10 +37,23 @@
|
|||
<label class="control-label">Date: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@createdon" />
|
||||
<input class="form-control" @bind="@createdon" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (title == "From")
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">Message: </label>
|
||||
</td>
|
||||
<td>
|
||||
<textarea class="form-control" @bind="@body" rows="5" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (title == "To")
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">Message: </label>
|
||||
|
@ -42,22 +62,34 @@
|
|||
<textarea class="form-control" @bind="@body" rows="5" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</table>
|
||||
|
||||
@if (reply != string.Empty)
|
||||
{
|
||||
<button type="button" class="btn btn-primary" @onclick="Send">Send</button>
|
||||
}
|
||||
<button type="button" class="btn btn-primary" @onclick="Send">Send</button> }
|
||||
else
|
||||
{
|
||||
if (title == "From")
|
||||
{
|
||||
<button type="button" class="btn btn-primary" @onclick="Reply">Reply</button>
|
||||
}
|
||||
<button type="button" class="btn btn-primary" @onclick="Reply">Reply</button>}
|
||||
}
|
||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
|
||||
<br />
|
||||
<br />
|
||||
<p>@reply</p>
|
||||
@if (title == "To")
|
||||
{
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label">Original Message: </label>
|
||||
</td>
|
||||
<td>
|
||||
<textarea class="form-control" @bind="@reply" rows="5" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
|
@ -124,8 +156,12 @@
|
|||
private void Reply()
|
||||
{
|
||||
title = "To";
|
||||
if (!subject.Contains("RE:"))
|
||||
{
|
||||
subject = "RE: " + subject;
|
||||
}
|
||||
reply = body;
|
||||
body = "\n\n--------------------------------------------\nSent: " + createdon + "\nSubject: " + subject + "\n\n" + body;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user