mirror of https://github.com/abpframework/abp.git
5 changed files with 48 additions and 8 deletions
@ -1,23 +1,25 @@ |
|||||
@page |
@page |
||||
@using Volo.Blogging.Pages.Blog.Posts |
@using Volo.Blogging.Pages.Blog.Posts |
||||
@model EditModel |
@model EditModel |
||||
|
@inherits Volo.Blogging.Pages.Blog.BloggingPage |
||||
|
|
||||
<form method="post" id="edit-post-form"> |
@section scripts { |
||||
|
<abp-script-bundle name="@typeof(EditModel).FullName"> |
||||
<abp-input asp-for="@Model.Post.Title" auto-focus="true" /> |
<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" /> |
<abp-input asp-for="@Model.Post.Url" /> |
||||
|
|
||||
<div class="form-group"> |
<div class="form-group"> |
||||
<label>Content</label> |
<label>@L["Content"]</label> |
||||
<textarea rows="4" class="form-control" name="Post.Content">@Model.Post.Content</textarea> |
<textarea rows="4" class="form-control" name="Post.Content">@Model.Post.Content</textarea> |
||||
</div> |
</div> |
||||
|
|
||||
<abp-input asp-for="@Model.Post.BlogId" hidden="" /> |
<abp-input asp-for="@Model.Post.BlogId" hidden="" /> |
||||
<abp-input asp-for="@Model.Post.Id" hidden="" /> |
<abp-input asp-for="@Model.Post.Id" hidden="" /> |
||||
|
|
||||
<abp-button type="submit" form="edit-post-form"> |
<abp-button type="submit" text="@L["Submit"].Value" /> |
||||
<span>Submit</span> |
|
||||
</abp-button> |
|
||||
|
|
||||
</form> |
</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