Error compiling template "/Designs/Paragraph/RegisterForgotPassword.cshtml" Line 17: The type or namespace name 'Activities' does not exist in the namespace 'System' (are you missing an assembly reference?)
1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 2 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 17 using System.Activities.Statements; 18 19 #line default 20 #line hidden 21 22 #line 3 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 23 using Dynamicweb; 24 25 #line default 26 #line hidden 27 28 #line 4 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 29 using Dynamicweb.Content; 30 31 #line default 32 #line hidden 33 34 #line 5 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 35 using MedilinkWeb.Client.MedilinkData; 36 37 #line default 38 #line hidden 39 40 #line 6 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 41 using MedilinkWeb.Library.State; 42 43 #line default 44 #line hidden 45 46 #line 7 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 47 using System.Web; 48 49 #line default 50 #line hidden 51 52 #line 8 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 53 using CSharpTest.Net.Crypto; 54 55 #line default 56 #line hidden 57 58 #line 9 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 59 using DwCustomModules.Ajax; 60 61 #line default 62 #line hidden 63 64 65 public class RazorEngine_a5417f7a8ebc46709c2053f3f6a35623 : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> { 66 67 #line hidden 68 69 public RazorEngine_a5417f7a8ebc46709c2053f3f6a35623() { 70 } 71 72 public override void Execute() { 73 74 #line 10 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 75 76 //Dynamicweb.Frontend.PageView pageView = Dynamicweb.Frontend.PageView.Current(); 77 //List<Dynamicweb.Content.Paragraph> 78 // pageParagraphCollection = Dynamicweb.Content.Paragraph.GetParagraphsByPageID(pageView.Page.ID).ToList(); 79 80 Dynamicweb.Content.Page page = Dynamicweb.Frontend.PageView.Current().Page; 81 ParagraphService paragraphService = new ParagraphService(); 82 List<Paragraph> pageParagraphCollection = paragraphService.GetParagraphsByPageId(page.ID).ToList(); 83 84 string paragraphContent = pageParagraphCollection.Where(m => m.Header == "Forgot Password").Select(n => n.Text).FirstOrDefault(); 85 86 bool redirected = false; 87 AsyncWebRequest validUser = new AsyncWebRequest(); 88 89 if (!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["Token1"]) && !string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["Token2"])) 90 { 91 paragraphContent = pageParagraphCollection.Where(m => m.Header == "Reset Password").Select(n => n.Text).FirstOrDefault(); 92 93 redirected = true; 94 95 string token1 = HttpContext.Current.Request.QueryString["Token1"].Trim(); 96 string token2 = HttpContext.Current.Request.QueryString["Token2"].Trim(); 97 98 // Request.QueryString decodes the string, but the plus + character is interpreted as a space. Later in the method we compare strings and it wont match with a space. 99 validUser = DwCustomModules.Ajax.RegisterMember.PreparePasswordReset(token1.Replace(" ", "+"), token2.Replace(" ", "+")); 100 101 if (validUser.CompletionStatus == ClientTaskStatus.Failed || validUser.CompletionStatus == ClientTaskStatus.Aborted) 102 { 103 paragraphContent = String.Format("<h1>Reset your password</h1><p>{0}</p>", validUser.ReportText); 104 } 105 } 106 107 108 109 #line default 110 #line hidden 111 WriteLiteral("\r\n\r\n<div"); 112 113 WriteLiteral(" id=\"ForgotPassword\""); 114 115 WriteLiteral(" class=\"generalcontent\""); 116 117 WriteLiteral(">\r\n\r\n <div"); 118 119 WriteLiteral(" class=\"searchform\""); 120 121 WriteLiteral(" role=\"search\""); 122 123 WriteLiteral(">\r\n\r\n <div"); 124 125 WriteLiteral(" id=\"findPassword\""); 126 127 WriteLiteral(">\r\n\r\n"); 128 129 WriteLiteral(" "); 130 131 132 #line 50 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 133 Write(paragraphContent); 134 135 136 #line default 137 #line hidden 138 WriteLiteral("\r\n\r\n <form"); 139 140 WriteLiteral(" id=\"resetpassword\""); 141 142 WriteLiteral(" method=\"post\""); 143 144 WriteLiteral(">\r\n\r\n"); 145 146 147 #line 54 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 148 149 150 #line default 151 #line hidden 152 153 #line 54 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 154 if (redirected) 155 { 156 if (validUser.CompletionStatus == ClientTaskStatus.Success && !string.IsNullOrEmpty(validUser.Username)) 157 { 158 159 160 #line default 161 #line hidden 162 WriteLiteral(" <div"); 163 164 WriteLiteral(" class=\"field\""); 165 166 WriteLiteral(">\r\n\r\n <label"); 167 168 WriteLiteral(" for=\"login_username\""); 169 170 WriteLiteral(">Username: "); 171 172 173 #line 60 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 174 Write(validUser.Username); 175 176 177 #line default 178 #line hidden 179 WriteLiteral("</label>\r\n <input"); 180 181 WriteLiteral(" type=\"hidden\""); 182 183 WriteLiteral(" id=\"login_username\""); 184 185 WriteLiteral(" name=\"LoginUsername\""); 186 187 WriteAttribute("value", Tuple.Create(" value=\"", 2821), Tuple.Create("\"", 2848) 188 189 #line 61 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 190 , Tuple.Create(Tuple.Create("", 2829), Tuple.Create<System.Object, System.Int32>(validUser.Username 191 192 #line default 193 #line hidden 194 , 2829), false) 195 ); 196 197 WriteLiteral(" autocomplete=\"off\""); 198 199 WriteLiteral(" />\r\n\r\n </div>\r\n"); 200 201 202 #line 64 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 203 204 205 206 #line default 207 #line hidden 208 WriteLiteral(" <div"); 209 210 WriteLiteral(" class=\"field\""); 211 212 WriteLiteral(">\r\n\r\n <label"); 213 214 WriteLiteral(" for=\"login_password\""); 215 216 WriteLiteral(">New Password <span"); 217 218 WriteLiteral(" class=\"field-required\""); 219 220 WriteLiteral("><strong>*</strong></span></label>\r\n <input"); 221 222 WriteLiteral(" type=\"password\""); 223 224 WriteLiteral(" name=\"LoginPassword\""); 225 226 WriteLiteral(" id=\"LoginPassword\""); 227 228 WriteLiteral(" required"); 229 230 WriteLiteral(" maxlength=\"50\""); 231 232 WriteLiteral(" value=\"\""); 233 234 WriteLiteral(" autocomplete=\"off\""); 235 236 WriteLiteral(" />\r\n\r\n </div>\r\n"); 237 238 239 #line 71 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 240 241 242 243 #line default 244 #line hidden 245 WriteLiteral(" <div"); 246 247 WriteLiteral(" class=\"field\""); 248 249 WriteLiteral(">\r\n\r\n <label"); 250 251 WriteLiteral(" for=\"ConfirmPassword\""); 252 253 WriteLiteral(">Confirm your Password <span"); 254 255 WriteLiteral(" class=\"field-required\""); 256 257 WriteLiteral("><strong>*</strong></span></label>\r\n <input"); 258 259 WriteLiteral(" name=\"ConfirmPassword\""); 260 261 WriteLiteral(" id=\"ConfirmPassword\""); 262 263 WriteLiteral(" type=\"password\""); 264 265 WriteLiteral(" required"); 266 267 WriteLiteral(" maxlength=\"50\""); 268 269 WriteLiteral(" value=\"\""); 270 271 WriteLiteral(" autocomplete=\"off\""); 272 273 WriteLiteral(">\r\n\r\n </div>\r\n"); 274 275 276 #line 78 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 277 } 278 279 } 280 else 281 { 282 283 284 #line default 285 #line hidden 286 WriteLiteral(" <div"); 287 288 WriteLiteral(" class=\"field\""); 289 290 WriteLiteral(">\r\n\r\n <label"); 291 292 WriteLiteral(" for=\"login_username\""); 293 294 WriteLiteral(">Enter your Username <span"); 295 296 WriteLiteral(" class=\"field-required\""); 297 298 WriteLiteral("><strong>*</strong></span></label>\r\n <input"); 299 300 WriteLiteral(" type=\"text\""); 301 302 WriteLiteral(" name=\"Username\""); 303 304 WriteLiteral(" required"); 305 306 WriteLiteral(" id=\"login_username\""); 307 308 WriteLiteral(" value=\"\""); 309 310 WriteLiteral(" placeholder=\"Enter your Username\""); 311 312 WriteLiteral(" maxlength=\"50\""); 313 314 WriteLiteral(" autocomplete=\"off\""); 315 316 WriteLiteral(" />\r\n\r\n </div>\r\n"); 317 318 319 #line 89 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 320 321 322 323 #line default 324 #line hidden 325 WriteLiteral(" <p>\r\n <a"); 326 327 WriteLiteral(" id=\"userNameLink\""); 328 329 WriteLiteral(" class=\"password\""); 330 331 WriteLiteral(" href=\"/Register/Forgot-Username\""); 332 333 WriteLiteral(">Forgotten your username?</a>\r\n </p>\r\n"); 334 335 336 #line 93 "C:\SaltsWebsites\Medilink\MedilinkLiveV9\Files\Templates\Designs\Paragraph\RegisterForgotPassword.cshtml" 337 } 338 339 340 #line default 341 #line hidden 342 WriteLiteral("\r\n\r\n </form>\r\n\r\n </div>\r\n\r\n <label"); 343 344 WriteLiteral(" id=\"ReportStatus\""); 345 346 WriteLiteral("></label>\r\n\r\n <div"); 347 348 WriteLiteral(" class=\"searchform-button\""); 349 350 WriteLiteral(">\r\n\r\n <input"); 351 352 WriteLiteral(" type=\"image\""); 353 354 WriteLiteral(" id=\"btnSubmit\""); 355 356 WriteLiteral(" class=\"button btn green-white submit\""); 357 358 WriteLiteral(" alt=\"Submit\""); 359 360 WriteLiteral(" onclick=\"resetPassword()\""); 361 362 WriteLiteral(" style=\"border-width: 0px;\""); 363 364 WriteLiteral(" value=\"next\""); 365 366 WriteLiteral(" />\r\n\r\n </div>\r\n\r\n <div"); 367 368 WriteLiteral(" id=\"userLoggedin\""); 369 370 WriteLiteral(" style=\"display:none;\""); 371 372 WriteLiteral(">\r\n <h1>Your Password was changed</h1>\r\n <p>Continue to you" + 373 "r profile page</p>\r\n <p><a"); 374 375 WriteLiteral(" href=\"/My-Account\""); 376 377 WriteLiteral(" class=\"btn btn-primary next\""); 378 379 WriteLiteral(">Go to My Account</a></p>\r\n </div>\r\n </div>\r\n\r\n</div>\r\n\r\n<script"); 380 381 WriteLiteral(" type=\"text/javascript\""); 382 383 WriteLiteral(" src=\"/Files/Templates/Designs/MedilinkCore/scripts/RegisterOptions.js\""); 384 385 WriteLiteral("></script>"); 386 387 } 388 } 389 } 390
1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using System.Activities.Statements 3 @using Dynamicweb; 4 @using Dynamicweb.Content; 5 @using MedilinkWeb.Client.MedilinkData 6 @using MedilinkWeb.Library.State 7 @using System.Web; 8 @using CSharpTest.Net.Crypto 9 @using DwCustomModules.Ajax 10 @{ 11 //Dynamicweb.Frontend.PageView pageView = Dynamicweb.Frontend.PageView.Current(); 12 //List<Dynamicweb.Content.Paragraph> 13 // pageParagraphCollection = Dynamicweb.Content.Paragraph.GetParagraphsByPageID(pageView.Page.ID).ToList(); 14 15 Dynamicweb.Content.Page page = Dynamicweb.Frontend.PageView.Current().Page; 16 ParagraphService paragraphService = new ParagraphService(); 17 List<Paragraph> pageParagraphCollection = paragraphService.GetParagraphsByPageId(page.ID).ToList(); 18 19 string paragraphContent = pageParagraphCollection.Where(m => m.Header == "Forgot Password").Select(n => n.Text).FirstOrDefault(); 20 21 bool redirected = false; 22 AsyncWebRequest validUser = new AsyncWebRequest(); 23 24 if (!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["Token1"]) && !string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["Token2"])) 25 { 26 paragraphContent = pageParagraphCollection.Where(m => m.Header == "Reset Password").Select(n => n.Text).FirstOrDefault(); 27 28 redirected = true; 29 30 string token1 = HttpContext.Current.Request.QueryString["Token1"].Trim(); 31 string token2 = HttpContext.Current.Request.QueryString["Token2"].Trim(); 32 33 // Request.QueryString decodes the string, but the plus + character is interpreted as a space. Later in the method we compare strings and it wont match with a space. 34 validUser = DwCustomModules.Ajax.RegisterMember.PreparePasswordReset(token1.Replace(" ", "+"), token2.Replace(" ", "+")); 35 36 if (validUser.CompletionStatus == ClientTaskStatus.Failed || validUser.CompletionStatus == ClientTaskStatus.Aborted) 37 { 38 paragraphContent = String.Format("<h1>Reset your password</h1><p>{0}</p>", validUser.ReportText); 39 } 40 } 41 42 } 43 44 <div id="ForgotPassword" class="generalcontent"> 45 46 <div class="searchform" role="search"> 47 48 <div id="findPassword"> 49 50 @paragraphContent 51 52 <form id="resetpassword" method="post"> 53 54 @if (redirected) 55 { 56 if (validUser.CompletionStatus == ClientTaskStatus.Success && !string.IsNullOrEmpty(validUser.Username)) 57 { 58 <div class="field"> 59 60 <label for="login_username">Username: @validUser.Username</label> 61 <input type="hidden" id="login_username" name="LoginUsername" value="@validUser.Username" autocomplete="off" /> 62 63 </div> 64 65 <div class="field"> 66 67 <label for="login_password">New Password <span class="field-required"><strong>*</strong></span></label> 68 <input type="password" name="LoginPassword" id="LoginPassword" required maxlength="50" value="" autocomplete="off" /> 69 70 </div> 71 72 <div class="field"> 73 74 <label for="ConfirmPassword">Confirm your Password <span class="field-required"><strong>*</strong></span></label> 75 <input name="ConfirmPassword" id="ConfirmPassword" type="password" required maxlength="50" value="" autocomplete="off"> 76 77 </div> 78 } 79 80 } 81 else 82 { 83 <div class="field"> 84 85 <label for="login_username">Enter your Username <span class="field-required"><strong>*</strong></span></label> 86 <input type="text" name="Username" required id="login_username" value="" placeholder="Enter your Username" maxlength="50" autocomplete="off" /> 87 88 </div> 89 90 <p> 91 <a id="userNameLink" class="password" href="/Register/Forgot-Username">Forgotten your username?</a> 92 </p> 93 } 94 95 96 </form> 97 98 </div> 99 100 <label id="ReportStatus"></label> 101 102 <div class="searchform-button"> 103 104 <input type="image" id="btnSubmit" class="button btn green-white submit" alt="Submit" onclick="resetPassword()" style="border-width: 0px;" value="next" /> 105 106 </div> 107 108 <div id="userLoggedin" style="display:none;"> 109 <h1>Your Password was changed</h1> 110 <p>Continue to your profile page</p> 111 <p><a href="/My-Account" class="btn btn-primary next">Go to My Account</a></p> 112 </div> 113 </div> 114 115 </div> 116 117 <script type="text/javascript" src="/Files/Templates/Designs/MedilinkCore/scripts/RegisterOptions.js"></script>