mirror of https://github.com/abpframework/abp.git
5 changed files with 48 additions and 8 deletions
@ -1,23 +1,25 @@ |
|||
@page |
|||
@using Volo.Blogging.Pages.Blog.Posts |
|||
@model EditModel |
|||
@inherits Volo.Blogging.Pages.Blog.BloggingPage |
|||
|
|||
<form method="post" id="edit-post-form"> |
|||
|
|||
<abp-input asp-for="@Model.Post.Title" auto-focus="true" /> |
|||
@section scripts { |
|||
<abp-script-bundle name="@typeof(EditModel).FullName"> |
|||
<abp-script src="/pages/blog/posts/edit.js" /> |
|||
</abp-script-bundle> |
|||
} |
|||
|
|||
<form method="post"> |
|||
<abp-input asp-for="@Model.Post.Title" auto-focus="true" /> |
|||
<abp-input asp-for="@Model.Post.Url" /> |
|||
|
|||
<div class="form-group"> |
|||
<label>Content</label> |
|||
<label>@L["Content"]</label> |
|||
<textarea rows="4" class="form-control" name="Post.Content">@Model.Post.Content</textarea> |
|||
</div> |
|||
|
|||
<abp-input asp-for="@Model.Post.BlogId" hidden="" /> |
|||
<abp-input asp-for="@Model.Post.Id" hidden="" /> |
|||
|
|||
<abp-button type="submit" form="edit-post-form"> |
|||
<span>Submit</span> |
|||
</abp-button> |
|||
|
|||
<abp-button type="submit" text="@L["Submit"].Value" /> |
|||
</form> |
|||
@ -0,0 +1,14 @@ |
|||
(function ($) { |
|||
$('#Post_Title').on("change paste keyup", function() { |
|||
var title = $('#Post_Title').val(); |
|||
|
|||
if (title.length > 64) { |
|||
title = title.substring(0, 64); |
|||
} |
|||
|
|||
title = title.replace(' ','-'); |
|||
|
|||
$('#Post_Url').val(title); |
|||
}); |
|||
|
|||
})(jQuery); |
|||
@ -0,0 +1,14 @@ |
|||
(function ($) { |
|||
$('#Post_Title').on("change paste keyup", function() { |
|||
var title = $('#Post_Title').val(); |
|||
|
|||
if (title.length > 64) { |
|||
title = title.substring(0, 64); |
|||
} |
|||
|
|||
title = title.replace(' ','-'); |
|||
|
|||
$('#Post_Url').val(title); |
|||
}); |
|||
|
|||
})(jQuery); |
|||
Loading…
Reference in new issue