Browse Source

Fixed pass checking for simple, raw, and download

tags/2.0.3
Teknikode 4 years ago
parent
commit
4b6f81153b

+ 1
- 1
Teknik/Areas/Paste/Controllers/PasteController.cs View File

@@ -63,7 +63,7 @@ namespace Teknik.Areas.Paste.Controllers
{
PasswordViewModel passModel = new PasswordViewModel();
passModel.Url = url;
passModel.CallingAction = Url.SubRouteUrl("paste", "Paste.View", new { type = type });
passModel.Type = type;
// Redirect them to the password request page
return View("~/Areas/Paste/Views/Paste/PasswordNeeded.cshtml", passModel);
}

+ 1
- 1
Teknik/Areas/Paste/ViewModels/PasswordViewModel.cs View File

@@ -11,6 +11,6 @@ namespace Teknik.Areas.Paste.ViewModels
{
public string Url { get; set; }

public string CallingAction { get; set; }
public string Type { get; set; }
}
}

+ 2
- 1
Teknik/Areas/Paste/Views/Paste/PasswordNeeded.cshtml View File

@@ -3,8 +3,9 @@
<div class="container">
<div class="row text-center">
<div class="col-sm-6 col-sm-offset-3">
<form class="form-inline" method="post" action="@Model.CallingAction">
<form class="form-inline" method="post" action="@Url.SubRouteUrl("paste", "Paste.View")">
<h3><span class="glyphicon glyphicon-warning-sign"></span> This paste is password protected.</h3>
<input type="hidden" name="type" value="@Model.Type">
<input type="hidden" name="url" value="@Model.Url">
<div class="well no-padding">
<div class="form-group">

Loading…
Cancel
Save