Updated Smtp-settings: username/password auto-hide when windows-authentication is selected

This commit is contained in:
Kees Damen
2015-04-25 21:55:30 +02:00
parent c91ff87773
commit 23e773910f
2 changed files with 21 additions and 18 deletions

View File

@@ -175,7 +175,7 @@
if (controller.is(":checkbox")) {
controller.click($(this).toggleWhatYouControl).each($(this).toggleWhatYouControl);
} else if (controller.is(":radio")) {
$("[name=" + controller.attr("name") + "]").click(function () { $("[name=" + $(this).attr("name") + "]").each($(this).toggleWhatYouControl); });
$("[name='" + controller.attr("name") + "']").click(function () { $("[name='" + $(this).attr("name") + "']").each($(this).toggleWhatYouControl); });
}
else if (controller.is("option")) {
controller.parent().change(function () {

View File

@@ -37,30 +37,33 @@
</div>
<div data-controllerid="@Html.FieldIdFor(m => m.RequireCredentials)">
<div>
@Html.RadioButtonFor(m => m.UseDefaultCredentials, false)
<label for="@Html.FieldIdFor(m => m.UseDefaultCredentials)" class="forcheckbox">@T("Specify username/password")</label>
@Html.RadioButtonFor(m => m.UseDefaultCredentials, false, new { id = "customCredentialsOption", name = "UseDefaultCredentials" })
<label for="customCredentialsOption" class="forcheckbox">@T("Specify username/password")</label>
@Html.ValidationMessage("UseDefaultCredentials", "*")
</div>
<div>
<div>
<label for="@Html.FieldIdFor(m => m.UserName)">@T("User name")</label>
@Html.TextBoxFor(m => m.UserName, new { @class = "text" })
@Html.ValidationMessage("UserName", "*")
<span class="hint">@T("The username for authentication.")</span>
</div>
<div>
<label for="@Html.FieldIdFor(m => m.Password)">@T("Password")</label>
@Html.TextBoxFor(m => m.Password, new { type = "password", @class = "text medium" })
@Html.ValidationMessage("Password", "*")
<span class="hint">@T("The password for authentication.")</span>
<div class="options">
<span data-controllerid="customCredentialsOption">
<label for="@Html.FieldIdFor(m => m.UserName)">@T("User name")</label>
@Html.TextBoxFor(m => m.UserName, new { @class = "text" })
@Html.ValidationMessage("UserName", "*")
<span class="hint">@T("The username for authentication.")</span>
</span>
<span data-controllerid="customCredentialsOption">
<label for="@Html.FieldIdFor(m => m.Password)">@T("Password")</label>
@Html.TextBoxFor(m => m.Password, new { type = "password", @class = "text medium" })
@Html.ValidationMessage("Password", "*")
<span class="hint">@T("The password for authentication.")</span>
</span>
</div>
</div>
<div>
@Html.RadioButtonFor(m => m.UseDefaultCredentials, true, new { id = "smtpUseDefaultCredentials" })
<label for="smtpUseDefaultCredentials" class="forcheckbox">@T("Use Windows authentication")</label>
@Html.ValidationMessage("UseCustomCredentials", "*")
<span class="hint">@T("When this option is checked, the aplication pool or host-process identity is used to authenticate with the mail server. ")</span>
@Html.RadioButtonFor(m => m.UseDefaultCredentials, true, new { id = "defaultCredentialsOptions", name = "UseDefaultCredentials" })
<label for="defaultCredentialsOptions" class="forcheckbox">@T("Use Windows authentication")</label>
@Html.ValidationMessage("UseDefaultCredentials", "*")
<span class="hint">@T("When this option is selected, the aplication pool or host-process identity is used to authenticate with the mail server. ")</span>
</div>
</div>
</fieldset>