--HG--
branch : dev
This commit is contained in:
Andre Rodrigues 2010-11-20 16:07:29 -08:00
commit 2a51bfac5d
4 changed files with 12 additions and 3 deletions

View File

@ -25,7 +25,14 @@ namespace Orchard.Email.Drivers {
} }
protected override DriverResult Editor(SmtpSettingsPart part, IUpdateModel updater, dynamic shapeHelper) { protected override DriverResult Editor(SmtpSettingsPart part, IUpdateModel updater, dynamic shapeHelper) {
var previousPassword = part.Password;
updater.TryUpdateModel(part, Prefix, null, null); updater.TryUpdateModel(part, Prefix, null, null);
// restore password if the input is empty, meaning it has not been reseted
if (string.IsNullOrEmpty(part.Password)) {
part.Password = previousPassword;
}
return ContentShape("Parts_SmtpSettings_Edit", return ContentShape("Parts_SmtpSettings_Edit",
() => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: part, Prefix: Prefix)); () => shapeHelper.EditorTemplate(TemplateName: TemplateName, Model: part, Prefix: Prefix));
} }

View File

@ -35,6 +35,7 @@ namespace Orchard.Messaging.Drivers {
protected override DriverResult Editor(MessageSettingsPart part, IUpdateModel updater, dynamic shapeHelper) { protected override DriverResult Editor(MessageSettingsPart part, IUpdateModel updater, dynamic shapeHelper) {
var model = new MessageSettingsPartViewModel { var model = new MessageSettingsPartViewModel {
ChannelServices = _messageQueueManager.GetAvailableChannelServices(),
MessageSettings = part MessageSettings = part
}; };

View File

@ -3,7 +3,8 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion></ProductVersion> <ProductVersion>
</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}</ProjectGuid> <ProjectGuid>{085948FF-0E9B-4A9A-B564-F8B8B4BDDDBC}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

View File

@ -1,6 +1,6 @@
@model MessageSettingsPartViewModel @model MessageSettingsPartViewModel
@using Orchard.Core.Messaging.Models; @using Orchard.Messaging.Models;
@using Orchard.Core.Messaging.ViewModels; @using Orchard.Messaging.ViewModels;
<fieldset> <fieldset>
<legend>@T("Messaging")</legend> <legend>@T("Messaging")</legend>
<div> <div>