JXMovies/CMS/JXCMS.CMS.Movie/Admin/Views/Collection/WebSiteDialog.cshtml
2020-02-09 22:43:16 +08:00

56 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@{
Layout = "_DialogLayout";
}
@using JXCMS.CMS.Movie.Entity
@model JXCMS.CMS.Movie.Entity.WebSiteEntity
<form id="modify_website" action="@Url.Action("AddWebSite")" method="post">
<input type="hidden" id="id" name="id" value="@Model.Id"/>
<div class="form-group">
<label for="website_display" class="control-label">网站显示名称:</label>
<input type="text" class="form-control" id="website_display" name="webSiteName" value="@Model.WebSiteName">
</div>
<div class="form-group">
<label for="website_api" class="control-label">网站地址(海洋CMS API)</label>
<input type="text" class="form-control" id="website_api" name="apiUrl" value="@Model.ApiUrl">
</div>
<div class="form-group">
<label for="website_cron" class="control-label">采集时间默认每小时0分0秒执行</label>
<input type="text" class="form-control" id="website_cron" name="cron" value="@Model.Cron">
</div>
<div class="form-group row m-b-10">
<label class="col-xs-6 control-label">启用采集:</label>
<div class="col-xs-6">
<label class="lyear-switch switch-primary">
<input type="checkbox" @(Model.IsEnable?"checked=\"checked\"":"") name="isEnable">
<span></span>
</label>
</div>
</div>
</form>
@section dialogScript
{
<script type="text/javascript">
$('#commit').click(function() {
var url = $("#website_api").val();
var name = $("#website_display").val();
var cron = $("#website_cron").val();
if (url === "" || name === "" || cron === ""){
lightyear.notify('输入内容不能为空', 'danger', 100);
return;
}
if (!IsURL(url)) {
lightyear.notify('URL格式不正确', 'danger', 100);
return;
}
var msg = cronValidate(cron);
if (msg !== true) {
lightyear.notify(msg, 'danger', 100);
return;
}
$('#modify_website').submit();
})
</script>
}