JXMovies/CMS/JXCMS.CMS.Movie/Admin/Views/Collection/WebSiteDialog.cshtml

56 lines
2.1 KiB
Plaintext
Raw Normal View History

2020-02-09 19:10:05 +08:00
@{
Layout = "_DialogLayout";
}
2020-02-09 22:43:16 +08:00
@using JXCMS.CMS.Movie.Entity
2020-02-09 19:10:05 +08:00
@model JXCMS.CMS.Movie.Entity.WebSiteEntity
<form id="modify_website" action="@Url.Action("AddWebSite")" method="post">
2020-02-09 22:43:16 +08:00
<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>
2020-02-09 19:10:05 +08:00
<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>
2020-02-09 22:43:16 +08:00
<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>
2020-02-09 19:10:05 +08:00
</div>
</form>
@section dialogScript
{
2020-02-09 22:43:16 +08:00
<script type="text/javascript">
2020-02-09 19:10:05 +08:00
$('#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>
2020-02-09 22:43:16 +08:00
}