-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathIndex.cshtml
More file actions
146 lines (133 loc) · 6.89 KB
/
Index.cshtml
File metadata and controls
146 lines (133 loc) · 6.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
@using cloudscribe.Core.SimpleContent.Integration.ViewModels
@model ContentCloningViewModel
@inject ICoreThemeHelper themeHelper
@inject IStringLocalizer<SimpleContent> sr
@inject IOptions<ContentSettingsUIConfig> uiOptionsAccessor
@{
var uiOptions = uiOptionsAccessor.Value;
var themeSettings = themeHelper.GetThemeSettings();
if (themeSettings.AdminSideNavExpanded) { ViewData["SideNavToggle"] = "show"; }
ViewData["SideNavVisible"] = true;
var submitDisabled = Model.CloneAllowed? "" : "disabled";
}
<div class="row">
<h2>@ViewBag.Title</h2>
</div>
<form method="post" role="form" asp-antiforgery="true" data-submit-once="true">
@* <div asp-validation-summary="All" class="text-danger"></div> *@
<input type="hidden" asp-for="SiteId" />
<input type="hidden" asp-for="AllowCloneToSiteSelection" />
@if(Model.AllowCloneToSiteSelection)
{
<div class="row">
<div class="mb-3">
<label asp-for="CloneToSiteId" class="form-label">@sr["Destination Site"]</label>
<select asp-for="CloneToSiteId"
asp-items="@(new SelectList(Model.CloneToSites, nameof(ContentCloningViewModel.SiteDetails.SiteId), nameof(ContentCloningViewModel.SiteDetails.SiteIdentifier)))"
class="form-select form-select-lg" data-bs-toggle="tooltip" data-bs-placement="top"
title='@sr["Choose a site that you wish to clone the content from"]'
onchange="this.form.submit();">
<option value="">@sr["Please select one"]</option>
</select>
<span asp-validation-for="CloneToSiteId" class="text-danger"></span>
</div>
</div>
}
else
{
<div class="row">
<div class="mb-3">
<input type="hidden" asp-for="CloneToSiteId" />
<label for="CloneToSiteIdDisplayOnly" class="form-label">@sr["Destination Site"]</label>
<input type="text" id="CloneToSiteIdDisplayOnly" class="form-control" value="@Model.CloneToSiteName" disabled readonly aria-readonly="true">
</div>
</div>
}
<div class="row">
<div class="mb-3">
<label asp-for="CloneFromSiteId" class="form-label">@sr["Source Site"]</label>
<select asp-for="CloneFromSiteId"
asp-items="@(new SelectList(Model.CloneFromSites, nameof(ContentCloningViewModel.SiteDetails.SiteId), nameof(ContentCloningViewModel.SiteDetails.SiteIdentifier)))"
class="form-select form-select-lg" data-bs-toggle="tooltip" data-bs-placement="top"
title='@sr["Choose a site that you wish to clone the content from"]'
onchange="this.form.submit();">
<option value="">@sr["Please select one"]</option>
</select>
<span asp-validation-for="CloneFromSiteId" class="text-danger"></span>
</div>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["If checked will clone all Content Settings"]'>
<input asp-for="CloneContentSettings" class="form-check-input" onchange="this.form.submit();" />
<label asp-for="CloneContentSettings" class="form-check-label">@sr["Clone Content Settings"]</label>
</div>
</div>
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["If checked will clone all content pages"]'>
<input asp-for="ClonePages" class="form-check-input" onchange="this.form.submit();" />
<label asp-for="ClonePages" class="form-check-label">@sr["Clone Content Pages"]</label>
</div>
</div>
@if (uiOptions.ShowBlogSettings)
{
<div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["If checked will clone the Blog posts"]'>
<input asp-for="CloneBlogPosts" class="form-check-input" onchange="this.form.submit();" />
<label asp-for="CloneBlogPosts" class="form-check-label">@sr["Clone Blog Posts"]</label>
</div>
</div>
}
@* <div class="mb-3">
<div class="form-check" data-bs-toggle="tooltip" data-placement="left" title='@sr["If checked will rewrite any URLs that are embedded in the content that still reference the source site"]'>
<input asp-for="RewriteContentUrls" class="form-check-input" onchange="this.form.submit();" />
<label asp-for="RewriteContentUrls" class="form-check-label">@sr["Rewrite Content Urls"]</label>
</div>
</div> *@
<hr>
<div class="mb-3">
<button id="btnSave" type="button" class="btn btn-primary" @submitDisabled
data-disabled-text='@sr["Working..."]' data-enabled-text='@sr["Clone"]'
data-bs-toggle="modal" data-bs-target="#confirmCloneModal">@sr["Clone"]
</button>
</div>
<div class="modal fade" id="confirmCloneModal" tabindex="-1" role="dialog" aria-labelledby="confirmCloneHeading">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="confirmCloneHeading">@sr["Confirm Cloning"]</h4>
<button type="button" data-bs-dismiss="modal" class="btn-close" aria-label='@sr["Close"]'></button>
</div>
<div class="modal-body">
@sr["You are about to clone content between the following two sites:"]
<br /><br />
<table class="table table-bordered">
<tr><td>@sr["Source Site"]:</td><td><b>@Model.CloneFromSiteName</b></td></tr>
<tr><td>@sr["Destination Site"]:</td><td><b>@Model.CloneToSiteName</b></td></tr>
</table>
<br />
@sr["Are you sure you want to do this? This operation can not be undone."]
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">@sr["Cancel"]</button>
<button type="submit" name="Command" value="clone" class="btn btn-danger btn-ok" @submitDisabled
data-disabled-text='@sr["Working..."]' data-enabled-text='@sr["Clone"]'>@sr["Clone"]
</button>
</div>
</div>
</div>
</div>
</form>
@section SideNav {
<partial name="AdminSideNav" />
}
@section Toolbar{
<partial name="AdminSideNavToggle" />
}
@section Scripts {
<partial name="AdminSideNavScripts" />
<script src="~/cr/js/jquery.validate.min.js"></script>
<script src="~/cr/js/jquery.validate.unobtrusive.min.js"></script>
<script src="~/cr/js/jquery.validate.hooks.min.js"></script>
<script src="~/cr/js/jqueryvaildation.submitonce-unobtrusive.min.js"></script>
<script src="~/cr/js/bootstrap-tooltip-toggle.js"></script>
}