Some Suggestions for 4.4

Posted by Community Admin on 03-Aug-2018 23:38

Some Suggestions for 4.4

All Replies

Posted by Community Admin on 26-Nov-2011 00:00

Hi, I think I have the basics working (minus the menus) and starting to poke around to get the site ready for production.

1 - Settings - SMTP(Email Settings) - add a test section, so after I save it, I can test to see if the configuration is working.

2 - User Login Widget.  Add an option for "Registration" that would sit next to the "Login" link

3 - User Registration Widget - I know lots of people want Captcha on forms, but it is a REQUIREMENT on the registration widget.

 

Posted by Community Admin on 27-Nov-2011 00:00

The SMTP test gave me a different idea... a test/confirmation for shipping providers to tell you if they are working/configured properly. I had UPS working earlier and don't think I've changed anything, but now it is broken.

Eric

Posted by Community Admin on 28-Nov-2011 00:00

Yep, anywhere there is a configuration that requires connection to another system.

Posted by Community Admin on 30-Nov-2011 00:00

Hello Tom,


1. To test SMTP settings run cmd and telnet the SMTP used

> telnet smtp.server.com 25
the result is (depending on the SMTP server)
>220 smtp.server.com ESMTP Postfix
And an error will be thrown if SMTP is not working

2. I realize the value of the suggestion, but it may prove to be a problem in different cases since at some the login widget is used only to login at a page where users registered from a limited registration form can login.

What I can suggest is to map the template for the login widget and add a link to the registration form page.
Here is the template.

To map it go to administration->Settings->Advanced->Controls->ViewMap and enter
Host: Telerik.Sitefinity.Web.UI.PublicControls.LoginControl
LayoutTemplate: ~/Custom/LoginTemplate.ascx  <--- relative path to the template
(restart the application after saving to apply the new template)
Add a template in your project solution (.ascx file) with this markup

<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI"
    TagPrefix="sitefinity" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Control Language="C#" %>
 
<sitefinity:ClientLabelManager id="clientLabelManager" runat="server">
    <Labels>
        <sitefinity:ClientLabel ClassId="Labels" Key="LogoutUserConfirm" runat="server" />
        <sitefinity:ClientLabel ClassId="Labels" Key="UserNotSelected" runat="server" />
        <sitefinity:ClientLabel ClassId="Labels" Key="SelfLogoutUserConfirm" runat="server" />
    </Labels>
</sitefinity:ClientLabelManager>
 
<fieldset class="sfLoginWrp">
<asp:Panel ID="loginPanel" runat="server">
    <asp:Label runat="server" ID="FailureText" EnableViewState="False" Visible="false"
        CssClass="sfFailure" />        
    <ol class="sfLoginFieldsWrp">
        <li id="ProvidersHolder" runat="server" class="sfLoginField">
            <asp:Label ID="ProvidersLabel" Text="<%$ Resources:Labels, Provider %>" AssociatedControlID="ProvidersList"
                runat="server" CssClass="sfTxtLbl" />
            <asp:DropDownList ID="ProvidersList" AutoPostBack="false" AccessKey="l" runat="server" />
        </li>
        <li class="sfLoginField">
            <asp:Label ID="UserNameLabel" Text="<%$ Resources:Labels, Username %>" AssociatedControlID="UserName"
                runat="server" CssClass="sfTxtLbl" />
            <asp:TextBox ID="UserName" AccessKey="u" runat="server" CssClass="sfTxt" />
            <asp:RequiredFieldValidator ID="UserNameRequired" Display="Dynamic" ControlToValidate="UserName"
                ValidationGroup="LoginBox" ErrorMessage="<%$ Resources:Labels, UsernameCannotBeEmpty %>"
                CssClass="sfValidator" runat="server">
                <strong><asp:Literal ID="UserNameRequiredLiteral" runat="server" Text="<%$ Resources:Labels, UsernameCannotBeEmpty %>" /></strong>
            </asp:RequiredFieldValidator>
        </li>
        <li class="sfLoginField">
            <asp:Label ID="PasswordLabel" Text="<%$ Resources:Labels, Password %>" AssociatedControlID="Password"
                runat="server" CssClass="sfTxtLbl" />
            <asp:TextBox ID="Password" TextMode="Password" AccessKey="p" runat="server" CssClass="sfTxt" />
            <asp:RequiredFieldValidator ID="PasswordRequired" Display="Dynamic" ControlToValidate="Password"
                ValidationGroup="LoginBox" ErrorMessage="<%$ Resources:Labels, PasswordCannotBeEmpty %>"
                CssClass="sfValidator" runat="server">
                <strong><asp:Literal ID="PasswordRequiredLiteral" runat="server" Text="<%$ Resources:Labels, PasswordCannotBeEmpty %>" /></strong>
            </asp:RequiredFieldValidator>
        </li>
        <li class="sfLoginField sfCheckBoxWrapper" id="rememberMeContainer" runat="server">
            <asp:CheckBox runat="server" ID="RememberMe" />
            <asp:Label ID="RememberMeTextLabel" Text="<%$ Resources:Labels, RememberMe %>" AssociatedControlID="RememberMe"
                runat="server" />
        </li>
    </ol>
    <div class="sfSubmitBtn">
        <asp:LinkButton ID="LoginButton" CommandName="Login" CssClass="sfLinkBtn sfSave"
            ValidationGroup="LoginBox" runat="server">
            <strong class="sfLinkBtnIn">
                <asp:Literal ID="LoginButtonLiteral" runat="server" Text="<%$ Resources:Labels, LoginCaps %>"></asp:Literal>
            </strong>
        </asp:LinkButton>
        <!-- do not remove this button. It is used for the default form submit (pressing enter) -->
        <div style="display: none;">
            <asp:Button ID="hiddenSubmitButton" runat="server" CommandName="Login" ValidationGroup="LoginBox" />
        </div>
    </div>     
         
</asp:Panel>
<asp:Panel ID="userListPanel" runat="server" Visible="false">
    <p class="sfNeutral"><asp:Literal ID="userLimitLabel" runat="server" Text="<%$ Resources:Labels, UserLimitLabel%>" /></p>
    <asp:DropDownList ID="userListChoice" runat="server" />          
    <div class="sfSubmitBtn">
        <asp:LinkButton ID="logoutButton" runat="server" OnClientClick="return AlertLogOut();" CssClass="sfLinkBtn">
            <strong class="sfLinkBtnIn">
                <asp:Literal ID="LogoutButtonLiteral" runat="server" Text="<%$ Resources:Labels, LogoutButtonText%>"></asp:Literal>
            </strong>
        </asp:LinkButton>
    </div>
         
</asp:Panel>
 
<asp:Panel ID="selfLogoffPanel" runat="server" Visible="false">
    <p class="sfNeutral"><asp:Literal ID="selfLogoffLabel" runat="server" Text="<%$ Resources:Labels, SelfLogoffLabel%>" /></p>
    <div class="sfSubmitBtn">
        <asp:LinkButton ID="selfLogoutButton" runat="server" OnClientClick="return AlertSelfLogOut();" CssClass="sfLinkBtn">
            <strong class="sfLinkBtnIn">
                <asp:Literal ID="LogoutOtherUserAndEnterLiteral" runat="server" Text="<%$ Resources:Labels, SelftLogoutButtonText%>"></asp:Literal>
            </strong>
        </asp:LinkButton>
        <asp:LinkButton ID="selfLogoutCancelButton" runat="server" Text="<%$ Resources:Labels, Cancel%>" CssClass="sfCancel" />
    </div>
         
</asp:Panel>
 
<asp:Panel ID="denyLogonPanel" runat="server" Visible="false">
    <p class="sfNeutral"><asp:Literal ID="denyLogonMesage" runat="server" Text="<%$ Resources:Labels, DenyLogonMesage%>" /></p>
    <p><asp:Literal ID="loginRetryMessage" runat="server" Text="<%$ Resources:Labels, LoginRetryMessage%>" /></p>
        
</asp:Panel>
 
<asp:PlaceHolder ID="loginLinksHolder" runat="server">
    <div class="sfLoginHelp">
        <asp:Literal ID="HelpTitleLiteral" runat="server" Text="<%$ Resources:Labels, Help %>" />:
        <a id="PasswordRecoveryLink" href="~/Sitefinity/Login/PasswordRecovery" runat="server" onclick="toggleSmtpErrorMessage();">
            <asp:Literal ID="PasswordRecoveryTextLiteral" runat="server" Text="<%$ Resources:Labels, ForgotYourPassword %>" />
        </a>
        <a id="ChangePasswordLink" href="~/Sitefinity/Login/ChangePassword" runat="server" onclick="toggleSmtpErrorMessage();">
            <asp:Literal ID="ChangePasswordTextLiteral" runat="server" Text="<%$ Resources:Labels, ChangePassword %>" />
        </a>
        <a id="CreateUserLink" href="~/Sitefinity/Login/Register" runat="server">
            <asp:Literal ID="RegisterUserTextLiteral" runat="server" Text="<%$ Resources:Labels, Register %>" />
        </a>
        <a id="HelpLink" href="~/Sitefinity/Help/UsersAndRoles/LoggingIn" runat="server">
            <asp:Literal ID="HelpLinkLiteral" runat="server" Text="<%$ Resources:Labels, Help %>" />
        </a>       
    </div>
</asp:PlaceHolder>
 
<div id="smtpNotSetContainer" class="sfNeutral sfDetailedInfo" style="display:none;">  
    <p>
        <strong><asp:Literal runat="server" ID="ErrorMessageNoSmtpConfigLiteral" Text="<%$ Resources:ErrorMessages, TheSystemHasNotBeenConfiguredToSendEmails %>" /></strong>
    </p>
    <ul>
        <li><asp:Literal runat="server" ID="ErrorMessageContactAdminToResetYourPasswordLiteral" Text="<%$ Resources:ErrorMessages, ContactAnAdministratorToResetYourPasswordManually %>" /></li>
        <li>
            <asp:Literal runat="server" ID="ErrorOrAskAnAdministratorToConfigureTheSystemLiteral" Text="<%$ Resources:ErrorMessages, OrAskAnAdministratorToConfigureThSystem %>" />
            <a href="javascript:void(0)" onclick="toggleVisibility('smtpNotSetSolution')">
                <asp:Literal runat="server" ID="ErrorMessageSmtpDetailsTitle" Text="<%$ Resources:ErrorMessages, Details %>" />
            </a>
        </li>
    </ul>
    <div id="smtpNotSetSolution" class="sfDetailedHowTo" style="display: none; ">
        <p><asp:Literal runat="server" ID="ErrorMessageSmtpSettingsNotSetLiteral" Text="<%$ Resources:ErrorMessages, SmtpSettingsAreNotSet %>" /></p>
        <p><strong><asp:Literal runat="server" ID="ErrorMessageHowToSetSmtpLiteral" Text="<%$ Resources:ErrorMessages, HowToSetSMTP %>" /></strong></p>
        <ol>
            <li><asp:Literal runat="server" ID="Literal15" Text="<%$ Resources:ErrorMessages, GoToSettingsConfiguration %>" /></li>
            <li><asp:Literal runat="server" ID="Literal16" Text="<%$ Resources:ErrorMessages, SelectSystemSMTPSettings %>" /></li>
        </ol>
    </div>
</div>
 
<div id="smtpPermissionDeniedContainer" class="sfNeutral sfDetailedInfo" style="display:none;">
    <h3>
        <asp:Literal runat="server" ID="ErrorMessageTheSysIsNotPermittedToSendEmailsLiteral" Text="<%$ Resources:ErrorMessages, TheSystemHasIsNotPermittedToSendEmails %>" />
    </h3>
    <ul>
        <li><asp:Literal runat="server" ID="ErrorMessageContactAdminToResetYourPasswordSmtpLiteral" Text="<%$ Resources:ErrorMessages, ContactAnAdministratorToResetYourPasswordManually %>" /></li>
        <li>
            <asp:Literal runat="server" ID="ErrorOrAskAnAdministratorToConfigureTheSystemSmtpLiteral" Text="<%$ Resources:ErrorMessages, OrAskAnAdministratorToConfigureThSystem %>" />
            <a href="javascript:void(0)" onclick="toggleVisibility('smtpPermissionsDeniedDetails')">
                <asp:Literal runat="server" ID="ErrorMessageSmtpPermissionDeniedDetailsTitle" Text="<%$ Resources:ErrorMessages, Details %>" />
            </a>
        </li>
    </ul>
    <div id="smtpPermissionsDeniedDetails" class="sfDetailedHowTo" style="display: none; ">
        <p><asp:Literal ID="SmtpPermissionErrorMessage" runat="server" /></p>       
    </div>
</div>
</fieldset>
 
<asp:HiddenField id="logoutUser" runat="server" value="" />
<asp:HiddenField id="loginTicket" runat="server" value="" />
<asp:HiddenField id="mode" runat="server" value="" />
<asp:HiddenField id="smtpSettingsAreSet" runat="server" value="" />
<asp:HiddenField id="smtpPermissionDenied" runat="server" value="" />
 
<telerik:RadCodeBlock runat="server">
<script type="text/javascript">
 
    var userChoices;
    var smtpSettingsAreSet;
    var smtpPermissionDenied;
 
    function pageLoad()
        userChoices = $find("<%= userListChoice.ClientID %>");
        smtpSettingsAreSet = getBooleanHiddenField("<%= smtpSettingsAreSet.ClientID %>");
        smtpPermissionDenied = getBooleanHiddenField("<%= smtpPermissionDenied.ClientID %>");
    
 
    function getBooleanHiddenField(id)
        var field = $get(id);
 
        if (field !== null && field.value)
            return Boolean.parse(field.value);
        
 
        return false;
    
 
    function toggleVisibility()
        var elem = arguments[0] ? document.getElementById(arguments[0]) : this;
        if (elem.style.display == "block")
            elem.style.display = "none";
        
        else
            elem.style.display = "block";
        
    
 
    function toggleSmtpErrorMessage()
        if (!smtpSettingsAreSet)
            toggleVisibility('smtpNotSetContainer');
         else if (smtpPermissionDenied)
            toggleVisibility('smtpPermissionDeniedContainer');
        
    
 
    function AlertSelfLogOut()
        var clientLabelManager = $find('<%= clientLabelManager.ClientID %>');
        var result = confirm(clientLabelManager.getLabel('Labels', 'SelfLogoutUserConfirm'));
        return result;
    
 
    function AlertLogOut()
 
        var value = userChoices.get_value();
        var clientLabelManager = $find('<%= clientLabelManager.ClientID %>');
        if (value == null || value.length == 0)
            alert(clientLabelManager.getLabel('Labels', 'UserNotSelected'));
            return false;
        
 
        var selectedItemId = userChoices.get_value(); // selectedItem[0].id;
        var result = confirm(clientLabelManager.getLabel('Labels', 'LogoutUserConfirm'));
 
        if (result)
            $get('<%= logoutUser.ClientID %>').value = value;
 
        
        return result;
    
 
</script>
</telerik:RadCodeBlock>


3. I have logged this as a feature request for the registration form. We will consider adding this improvement in the next planning meeting.

Greetings,
Stanislav Velikov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 30-Nov-2011 00:00

#1 You miss my point.  I know the SMTP server is working.  I want to make sure the configuration info is right.  The only way to do that is a built in test.  You already have the code written in the email campaign module!  You just have to hook it in here too.

#2  Thanks for the template.  I still think this should be a feature.  You should be able to hide it (of course) or put a URL in for it as you suggest.  We shouldn't have to do a custom template.  And you do have the User Registration widget in beta.  It seems to make perfect sense to have this option built in..

This thread is closed