@raketa-cloud/admin 0.0.88 → 0.0.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jest.config.js +22 -0
- package/package.json +2 -2
- package/src/cloud/ArticleRevisions.js +33 -5
- package/src/cloud/Articles.js +34 -4
- package/src/cloud/EventRevisions.js +33 -5
- package/src/cloud/Events.js +35 -5
- package/src/cloud/PageRevisions.js +31 -3
- package/src/cloud/Pages.js +34 -4
- package/src/cloud/documents/articlesDocuments.js +44 -3
- package/src/cloud/documents/eventsDocuments.js +43 -2
- package/src/cloud/documents/pagesDocuments.js +43 -2
- package/src/handlers/articles/TranslationsHandler.js +81 -15
- package/src/handlers/events/TranslationsHandler.js +80 -14
- package/src/handlers/pages/TranslationsHandler.js +84 -18
- package/src/helpers/AuthHelper.js +2 -2
- package/src/tests/handlers/TagsHandler.test/create.test.js +96 -0
- package/src/tests/handlers/TagsHandler.test/create_form.test.js +25 -0
- package/src/tests/handlers/TagsHandler.test/destroy.test.js +51 -0
- package/src/tests/handlers/TagsHandler.test/edit_form.test.js +60 -0
- package/src/tests/handlers/TagsHandler.test/index.test.js +37 -0
- package/src/tests/handlers/TagsHandler.test/update.test.js +105 -0
- package/src/tests/handlers/articles/TranslationHandler.test/create.test.js +85 -79
- package/src/tests/handlers/events/TranslationHandler.test/create.test.js +84 -78
- package/src/tests/handlers/pages/TranslationHandler.test/create.test.js +83 -72
- package/src/tests/helpers/AuthHelper.test.js +169 -0
- package/src/tests/helpers/FormBuildert.test.js +357 -0
- package/src/tests/helpers/Inflector.test.js +75 -0
- package/src/views/articles/_shared/_revision_toolbar.ejs +9 -9
- package/src/views/articles/translations/create_form.ejs +2 -0
- package/src/views/events/_shared/_revision_toolbar.ejs +9 -9
- package/src/views/events/translations/create_form.ejs +2 -0
- package/src/views/pages/_shared/_revision_toolbar.ejs +9 -9
- package/src/views/pages/translations/create_form.ejs +3 -1
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import FormBuilder from "../../helpers/FormBuilder";
|
|
2
|
+
|
|
3
|
+
describe("FormBuilder", () => {
|
|
4
|
+
function normalizeHTML(html) {
|
|
5
|
+
return html.replace(/>\s+</g, "><").replace(/\s+/g, " ").trim();
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
describe("field", () => {
|
|
9
|
+
test("renders a text input group", () => {
|
|
10
|
+
const form = new FormBuilder({
|
|
11
|
+
resource: {
|
|
12
|
+
title: "Test content",
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const result = form.field("resource.title");
|
|
17
|
+
|
|
18
|
+
expect(normalizeHTML(result)).toEqual(
|
|
19
|
+
normalizeHTML(`
|
|
20
|
+
<div class="mb-4">
|
|
21
|
+
<label for="f_resource_title">Title</label>
|
|
22
|
+
<input type="text" name="resource[title]" value="Test content" id="f_resource_title" />
|
|
23
|
+
</div>`)
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test("renders a text input group with errors", () => {
|
|
28
|
+
const form = new FormBuilder(
|
|
29
|
+
{
|
|
30
|
+
resource: {
|
|
31
|
+
title: "Test content",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
resource: {
|
|
36
|
+
title: "Can't be blank",
|
|
37
|
+
},
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
const result = form.field("resource.title");
|
|
42
|
+
|
|
43
|
+
expect(normalizeHTML(result)).toEqual(
|
|
44
|
+
normalizeHTML(`
|
|
45
|
+
<div class="mb-4 has-error">
|
|
46
|
+
<label for="f_resource_title">Title</label>
|
|
47
|
+
<input type="text" name="resource[title]" value="Test content" id="f_resource_title" />
|
|
48
|
+
<span class="text-red-600">Can't be blank</span>
|
|
49
|
+
</div>`)
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test("renders an email input group", () => {
|
|
54
|
+
const form = new FormBuilder({
|
|
55
|
+
resource: {
|
|
56
|
+
email: "john@example.com",
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const result = form.field("resource.email", { label: "Electronic mail" });
|
|
61
|
+
|
|
62
|
+
expect(normalizeHTML(result)).toEqual(
|
|
63
|
+
normalizeHTML(
|
|
64
|
+
`<div class="mb-4">
|
|
65
|
+
<label for="f_resource_email">Electronic mail</label>
|
|
66
|
+
<input type="text" name="resource[email]" value="john@example.com" id="f_resource_email" />
|
|
67
|
+
</div>`
|
|
68
|
+
)
|
|
69
|
+
);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
test("renders a textarea group", () => {
|
|
73
|
+
const form = new FormBuilder({
|
|
74
|
+
resource: {
|
|
75
|
+
description: "Lorem ipsum dolor...",
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const result = form.field("resource.description", { as: "textarea" });
|
|
80
|
+
|
|
81
|
+
expect(normalizeHTML(result)).toEqual(
|
|
82
|
+
normalizeHTML(
|
|
83
|
+
`<div class="mb-4">
|
|
84
|
+
<label for="f_resource_description">Description</label>
|
|
85
|
+
<textarea name="resource[description]" id="f_resource_description">Lorem ipsum dolor...</textarea>
|
|
86
|
+
</div>`
|
|
87
|
+
)
|
|
88
|
+
);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test("renders a single checkbox group with default value", () => {
|
|
92
|
+
const form = new FormBuilder({
|
|
93
|
+
resource: {
|
|
94
|
+
active: "yes",
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
const result = form.field("resource.description", {
|
|
99
|
+
as: "checkbox",
|
|
100
|
+
value: "yes",
|
|
101
|
+
default_value: "no",
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
expect(normalizeHTML(result)).toEqual(
|
|
105
|
+
normalizeHTML(
|
|
106
|
+
`<div class="mb-4">
|
|
107
|
+
<div class="checkbox-wrapper">
|
|
108
|
+
<input type="hidden" name="resource[description]" value="no" />
|
|
109
|
+
<input type="checkbox" value="yes" id="f_resource_description" name="resource[description]" />
|
|
110
|
+
<label for="f_resource_description">Description</label>
|
|
111
|
+
</div>
|
|
112
|
+
</div>`
|
|
113
|
+
)
|
|
114
|
+
);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
test("renders a single checkbox group without default value", () => {
|
|
118
|
+
const form = new FormBuilder({
|
|
119
|
+
resource: {
|
|
120
|
+
active: "yes",
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
const result = form.field("resource.active", {
|
|
125
|
+
as: "checkbox",
|
|
126
|
+
value: "yes",
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
expect(normalizeHTML(result)).toEqual(
|
|
130
|
+
normalizeHTML(
|
|
131
|
+
`<div class="mb-4">
|
|
132
|
+
<div class="checkbox-wrapper">
|
|
133
|
+
<input type="checkbox" value="yes" id="f_resource_active" name="resource[active]" checked="checked" />
|
|
134
|
+
<label for="f_resource_active">Active</label>
|
|
135
|
+
</div>
|
|
136
|
+
</div>`
|
|
137
|
+
)
|
|
138
|
+
);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
test("renders a select group", () => {
|
|
142
|
+
const form = new FormBuilder({
|
|
143
|
+
resource: {
|
|
144
|
+
layout: "default",
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
const result = form.field("resource.layout", {
|
|
149
|
+
as: "select",
|
|
150
|
+
options: [
|
|
151
|
+
["default", "Default"],
|
|
152
|
+
["headless", "Headless"],
|
|
153
|
+
],
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
expect(normalizeHTML(result)).toEqual(
|
|
157
|
+
normalizeHTML(
|
|
158
|
+
`<div class="mb-4">
|
|
159
|
+
<label for="f_resource_layout">Layout</label>
|
|
160
|
+
<select name="resource[layout]" id="f_resource_layout">
|
|
161
|
+
<option value="">Please select...</option>
|
|
162
|
+
<option value="default" selected="selected">Default</option>
|
|
163
|
+
<option value="headless">Headless</option>
|
|
164
|
+
</select>
|
|
165
|
+
</div>`
|
|
166
|
+
)
|
|
167
|
+
);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
test("renders a readio group", () => {
|
|
171
|
+
const form = new FormBuilder({
|
|
172
|
+
resource: {
|
|
173
|
+
color: "red",
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
const result = form.field("resource.color", {
|
|
178
|
+
as: "radio_group",
|
|
179
|
+
options: [
|
|
180
|
+
["red", "Red"],
|
|
181
|
+
["blue", "Blue"],
|
|
182
|
+
["green", "Green"],
|
|
183
|
+
],
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
expect(normalizeHTML(result)).toEqual(
|
|
187
|
+
normalizeHTML(
|
|
188
|
+
`<div class="mb-4">
|
|
189
|
+
<label for="f_resource_color">Color</label>
|
|
190
|
+
<div id="f_resource_color" name="resource[color]" class="radio-group">
|
|
191
|
+
<label ><input type="radio" name="resource[color]" value="red" checked="checked" /> Red</label>
|
|
192
|
+
<label ><input type="radio" name="resource[color]" value="blue" /> Blue</label>
|
|
193
|
+
<label ><input type="radio" name="resource[color]" value="green" /> Green</label>
|
|
194
|
+
</div>
|
|
195
|
+
</div>`
|
|
196
|
+
)
|
|
197
|
+
);
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
test("renders a checkbox group", () => {
|
|
201
|
+
const form = new FormBuilder({
|
|
202
|
+
resource: {
|
|
203
|
+
color: "red",
|
|
204
|
+
},
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
const result = form.field("resource.color", {
|
|
208
|
+
as: "checkbox_group",
|
|
209
|
+
options: [
|
|
210
|
+
["red", "Red"],
|
|
211
|
+
["blue", "Blue"],
|
|
212
|
+
["green", "Green"],
|
|
213
|
+
],
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
expect(normalizeHTML(result)).toEqual(
|
|
217
|
+
normalizeHTML(
|
|
218
|
+
`<div class="mb-4">
|
|
219
|
+
<label for="f_resource_color">Color</label>
|
|
220
|
+
<div id="f_resource_color" class="checkbox-group">
|
|
221
|
+
<label ><input type="checkbox" name="resource[color][]" value="red" checked="checked" /> Red</label>
|
|
222
|
+
<label ><input type="checkbox" name="resource[color][]" value="blue" /> Blue</label>
|
|
223
|
+
<label ><input type="checkbox" name="resource[color][]" value="green" /> Green</label>
|
|
224
|
+
<input type="hidden" name="resource[color][]" value="" />
|
|
225
|
+
</div>
|
|
226
|
+
</div>`
|
|
227
|
+
)
|
|
228
|
+
);
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
test("renders a button input group", () => {
|
|
232
|
+
const form = new FormBuilder({
|
|
233
|
+
resource: {
|
|
234
|
+
cta: {
|
|
235
|
+
label: "CTA!",
|
|
236
|
+
link: "#",
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
const result = form.field("resource.cta", {
|
|
242
|
+
as: "button",
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
expect(normalizeHTML(result)).toEqual(
|
|
246
|
+
normalizeHTML(`
|
|
247
|
+
<fieldset class="button-group">
|
|
248
|
+
<legend >Cta</legend>
|
|
249
|
+
<div class="mb-4">
|
|
250
|
+
<label for="f_resource_cta_label">Label</label>
|
|
251
|
+
<input type="text" name="resource[cta][label]" value="CTA!" id="f_resource_cta_label" class="no-margin" />
|
|
252
|
+
</div>
|
|
253
|
+
<div class="mb-4">
|
|
254
|
+
<label for="f_resource_cta_link">Link</label>
|
|
255
|
+
<input type="text" name="resource[cta][link]" value="#" id="f_resource_cta_link" class="no-margin" />
|
|
256
|
+
</div>
|
|
257
|
+
<div class="mb-4">
|
|
258
|
+
<label for="f_resource_cta_id">ID</label>
|
|
259
|
+
<input type="text" name="resource[cta][id]" value="" id="f_resource_cta_id" class="no-margin" />
|
|
260
|
+
</div>
|
|
261
|
+
<div class="mb-4">
|
|
262
|
+
<label for="f_resource_cta_type">Type</label>
|
|
263
|
+
<select name="resource[cta][type]" id="f_resource_cta_type" class="no-margin">
|
|
264
|
+
<option value="">Please select...</option>
|
|
265
|
+
<option value="primary">Primary</option>
|
|
266
|
+
<option value="secondary">Secondary</option>
|
|
267
|
+
<option value="text">Text</option>
|
|
268
|
+
</select>
|
|
269
|
+
</div>
|
|
270
|
+
<div class="mb-4">
|
|
271
|
+
<label for="f_resource_cta_target">Target</label>
|
|
272
|
+
<select name="resource[cta][target]" id="f_resource_cta_target" class="no-margin">
|
|
273
|
+
<option value="">Please select...</option>
|
|
274
|
+
<option value="_self">Self</option>
|
|
275
|
+
<option value="_blank">New Tab</option>
|
|
276
|
+
</select>
|
|
277
|
+
</div>
|
|
278
|
+
<div class="mb-4">
|
|
279
|
+
<label for="f_resource_cta_rel">Follow Link</label>
|
|
280
|
+
<select name="resource[cta][rel]" id="f_resource_cta_rel" class="no-margin">
|
|
281
|
+
<option value="">Please select...</option>
|
|
282
|
+
<option value="follow">Follow</option>
|
|
283
|
+
<option value="nofollow">No Follow</option>
|
|
284
|
+
</select>
|
|
285
|
+
</div>
|
|
286
|
+
</fieldset>`)
|
|
287
|
+
);
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
test("renders a link input group", () => {
|
|
291
|
+
const form = new FormBuilder({
|
|
292
|
+
resource: {
|
|
293
|
+
cta: {
|
|
294
|
+
label: "CTA!",
|
|
295
|
+
link: "#",
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
const result = form.field("resource.cta", {
|
|
301
|
+
as: "link",
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
expect(normalizeHTML(result)).toEqual(
|
|
305
|
+
normalizeHTML(
|
|
306
|
+
`
|
|
307
|
+
<fieldset class="link-group">
|
|
308
|
+
<legend >Cta</legend>
|
|
309
|
+
<div class="mb-4">
|
|
310
|
+
<label for="f_resource_cta_label">Label</label>
|
|
311
|
+
<input type="text" name="resource[cta][label]" value="CTA!" id="f_resource_cta_label" class="no-margin" />
|
|
312
|
+
</div>
|
|
313
|
+
<div class="mb-4">
|
|
314
|
+
<label for="f_resource_cta_link">Link</label>
|
|
315
|
+
<input type="text" name="resource[cta][link]" value="#" id="f_resource_cta_link" class="no-margin" />
|
|
316
|
+
</div>
|
|
317
|
+
<div class="mb-4">
|
|
318
|
+
<label for="f_resource_cta_id">ID</label>
|
|
319
|
+
<input type="text" name="resource[cta][id]" value="" id="f_resource_cta_id" class="no-margin" />
|
|
320
|
+
</div>
|
|
321
|
+
<div class="mb-4">
|
|
322
|
+
<label for="f_resource_cta_className">CSS Class</label>
|
|
323
|
+
<input type="text" name="resource[cta][className]" value="" id="f_resource_cta_className" class="no-margin" />
|
|
324
|
+
</div>
|
|
325
|
+
<div class="mb-4">
|
|
326
|
+
<label for="f_resource_cta_target">Target</label>
|
|
327
|
+
<select name="resource[cta][target]" id="f_resource_cta_target" class="no-margin">
|
|
328
|
+
<option value="">Please select...</option>
|
|
329
|
+
<option value="_self">Self</option>
|
|
330
|
+
<option value="_blank">New Tab</option>
|
|
331
|
+
</select>
|
|
332
|
+
</div>
|
|
333
|
+
<div class="mb-4">
|
|
334
|
+
<label for="f_resource_cta_rel">Follow Link</label>
|
|
335
|
+
<select name="resource[cta][rel]" id="f_resource_cta_rel" class="no-margin">
|
|
336
|
+
<option value="">Please select...</option>
|
|
337
|
+
<option value="follow">Follow</option>
|
|
338
|
+
<option value="nofollow">No Follow</option>
|
|
339
|
+
</select>
|
|
340
|
+
</div>
|
|
341
|
+
</fieldset>`
|
|
342
|
+
)
|
|
343
|
+
);
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
describe("submit", () => {
|
|
348
|
+
test("renders submit button with custom class", () => {
|
|
349
|
+
const form = new FormBuilder();
|
|
350
|
+
const result = form.submit("Save", { class: "btn-primary" });
|
|
351
|
+
|
|
352
|
+
expect(normalizeHTML(result)).toEqual(
|
|
353
|
+
'<button type="submit" class="btn-primary">Save</button>'
|
|
354
|
+
);
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import Inflector from "../../helpers/Inflector";
|
|
2
|
+
|
|
3
|
+
describe("Inflector", () => {
|
|
4
|
+
describe("capitalize", () => {
|
|
5
|
+
test("capitalizes first letter", () => {
|
|
6
|
+
expect(Inflector.capitalize("hello")).toBe("Hello");
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
test("keeps rest of string unchanged", () => {
|
|
10
|
+
expect(Inflector.capitalize("hELLo")).toBe("HELLo");
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test("works with single letter", () => {
|
|
14
|
+
expect(Inflector.capitalize("h")).toBe("H");
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test("handles already capitalized strings", () => {
|
|
18
|
+
expect(Inflector.capitalize("Hello")).toBe("Hello");
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
describe("downcase", () => {
|
|
23
|
+
test("converts string to lowercase", () => {
|
|
24
|
+
expect(Inflector.downcase("HELLO")).toBe("hello");
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test("keeps lowercase strings unchanged", () => {
|
|
28
|
+
expect(Inflector.downcase("hello")).toBe("hello");
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test("handles mixed case", () => {
|
|
32
|
+
expect(Inflector.downcase("HeLLo")).toBe("hello");
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test("works with single letter", () => {
|
|
36
|
+
expect(Inflector.downcase("H")).toBe("h");
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
describe("humanize", () => {
|
|
41
|
+
test("replaces underscores with spaces", () => {
|
|
42
|
+
expect(Inflector.humanize("hello_world")).toBe("hello world");
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test("replaces multiple underscores with single space", () => {
|
|
46
|
+
expect(Inflector.humanize("hello__world")).toBe("hello world");
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test("replaces dashes with spaces", () => {
|
|
50
|
+
expect(Inflector.humanize("hello-world")).toBe("hello world");
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test("replaces multiple dashes with single space", () => {
|
|
54
|
+
expect(Inflector.humanize("hello--world")).toBe("hello world");
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test("handles mixed dashes and underscores", () => {
|
|
58
|
+
expect(Inflector.humanize("hello_beautiful-world")).toBe(
|
|
59
|
+
"hello beautiful world"
|
|
60
|
+
);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test("handles string with no replacements needed", () => {
|
|
64
|
+
expect(Inflector.humanize("hello world")).toBe("hello world");
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
test("handles empty string", () => {
|
|
68
|
+
expect(Inflector.humanize("")).toBe("");
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
test("handles string with only separators", () => {
|
|
72
|
+
expect(Inflector.humanize("___---___")).toBe(" ");
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
});
|
|
@@ -6,6 +6,15 @@
|
|
|
6
6
|
Edit content
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.articleType}_revisions/${revision.id}/general/edit` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
11
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z" />
|
|
12
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
13
|
+
</svg>
|
|
14
|
+
|
|
15
|
+
Edit settings
|
|
16
|
+
</a>
|
|
17
|
+
|
|
9
18
|
<a href="<%= `/${_context.locale}/${_context.resourceConfig.articleType}_revisions/${revision.id}/publishes/new` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
10
19
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
11
20
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" />
|
|
@@ -22,15 +31,6 @@
|
|
|
22
31
|
</summary>
|
|
23
32
|
|
|
24
33
|
<div class="absolute border bg-raketa-background p-4 right-4 z-20 mt-2 flex flex-col gap-4 shadow-md rounded dark:border-neutral-500">
|
|
25
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.articleType}_revisions/${revision.id}/general/edit` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
26
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
27
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z" />
|
|
28
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
29
|
-
</svg>
|
|
30
|
-
|
|
31
|
-
Edit settings
|
|
32
|
-
</a>
|
|
33
|
-
|
|
34
34
|
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.articleType %>-revisions/<%= revision.id %>/preview" target="_blank" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
35
35
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
36
36
|
<path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
|
|
@@ -32,9 +32,11 @@
|
|
|
32
32
|
|
|
33
33
|
<% if (errors?.resource && targetLocale) { %>
|
|
34
34
|
<div>
|
|
35
|
+
<% if (targetLocale !== _context.locale) { %>
|
|
35
36
|
<p class="text-sm text-red-600 font-medium mb-1">
|
|
36
37
|
Failed to create <%= _context.locales[targetLocale].name %> translation.
|
|
37
38
|
</p>
|
|
39
|
+
<% } %>
|
|
38
40
|
<% Object.entries(errors.resource).forEach(([errorKey, error]) => { %>
|
|
39
41
|
<p class="text-sm text-red-600 font-medium mb-3"> Reason is <%= errorKey %>: <%= error %></p>
|
|
40
42
|
<% }) %>
|
|
@@ -6,6 +6,15 @@
|
|
|
6
6
|
Edit content
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.eventType}_revisions/${revision.id}/general/edit` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
11
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z" />
|
|
12
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
13
|
+
</svg>
|
|
14
|
+
|
|
15
|
+
Edit settings
|
|
16
|
+
</a>
|
|
17
|
+
|
|
9
18
|
<a href="<%= `/${_context.locale}/${_context.resourceConfig.eventType}_revisions/${revision.id}/publishes/new` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
10
19
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
11
20
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" />
|
|
@@ -22,15 +31,6 @@
|
|
|
22
31
|
</summary>
|
|
23
32
|
|
|
24
33
|
<div class="absolute border bg-raketa-background p-4 right-4 z-20 mt-2 flex flex-col gap-4 shadow-md rounded dark:border-neutral-500">
|
|
25
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.eventType}_revisions/${revision.id}/general/edit` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
26
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
27
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z" />
|
|
28
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
29
|
-
</svg>
|
|
30
|
-
|
|
31
|
-
Edit settings
|
|
32
|
-
</a>
|
|
33
|
-
|
|
34
34
|
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.eventType %>-revisions/<%= revision.id %>/preview" target="_blank" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
35
35
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
36
36
|
<path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
|
|
@@ -32,9 +32,11 @@
|
|
|
32
32
|
|
|
33
33
|
<% if (errors?.resource && targetLocale) { %>
|
|
34
34
|
<div>
|
|
35
|
+
<% if (targetLocale !== _context.locale) { %>
|
|
35
36
|
<p class="text-sm text-red-600 font-medium mb-1">
|
|
36
37
|
Failed to create <%= _context.locales[targetLocale].name %> translation.
|
|
37
38
|
</p>
|
|
39
|
+
<% } %>
|
|
38
40
|
<% Object.entries(errors.resource).forEach(([errorKey, error]) => { %>
|
|
39
41
|
<p class="text-sm text-red-600 font-medium mb-3"> Reason is <%= errorKey %>: <%= error %></p>
|
|
40
42
|
<% }) %>
|
|
@@ -6,6 +6,15 @@
|
|
|
6
6
|
Edit content
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
|
+
<a href="<%= `/${_context.locale}/${_context.resourceConfig.pageType}_revisions/${revision.id}/general/edit` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
11
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z" />
|
|
12
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
13
|
+
</svg>
|
|
14
|
+
|
|
15
|
+
Edit settings
|
|
16
|
+
</a>
|
|
17
|
+
|
|
9
18
|
<a href="<%= `/${_context.locale}/${_context.resourceConfig.pageType}_revisions/${revision.id}/publishes/new` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
10
19
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
11
20
|
<path stroke-linecap="round" stroke-linejoin="round" d="M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z" />
|
|
@@ -22,15 +31,6 @@
|
|
|
22
31
|
</summary>
|
|
23
32
|
|
|
24
33
|
<div class="absolute border bg-raketa-background p-4 right-4 z-20 mt-2 flex flex-col gap-4 shadow-md rounded dark:border-neutral-500">
|
|
25
|
-
<a href="<%= `/${_context.locale}/${_context.resourceConfig.pageType}_revisions/${revision.id}/general/edit` %>" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
26
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
27
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z" />
|
|
28
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
29
|
-
</svg>
|
|
30
|
-
|
|
31
|
-
Edit settings
|
|
32
|
-
</a>
|
|
33
|
-
|
|
34
34
|
<a href="/remote/login?redirect_to=/<%= _context.locale %>/admin/<%= _context.resourceConfig.pageType %>-revisions/<%= revision.id %>/preview" target="_blank" class="btn-text has-icon <%= revision.meta && revision.meta.locked ? 'cursor-not-allowed text-gray-400 pointer-events-none' : '' %>">
|
|
35
35
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4">
|
|
36
36
|
<path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
|
|
@@ -32,9 +32,11 @@
|
|
|
32
32
|
|
|
33
33
|
<% if (errors?.resource && targetLocale) { %>
|
|
34
34
|
<div>
|
|
35
|
+
<% if (targetLocale !== _context.locale) { %>
|
|
35
36
|
<p class="text-sm text-red-600 font-medium mb-1">
|
|
36
37
|
Failed to create <%= _context.locales[targetLocale].name %> translation.
|
|
37
38
|
</p>
|
|
39
|
+
<% } %>
|
|
38
40
|
<% Object.entries(errors.resource).forEach(([errorKey, error]) => { %>
|
|
39
41
|
<p class="text-sm text-red-600 font-medium mb-3"> Reason is <%= errorKey %>: <%= error %></p>
|
|
40
42
|
<% }) %>
|
|
@@ -70,4 +72,4 @@
|
|
|
70
72
|
</div>
|
|
71
73
|
</div>
|
|
72
74
|
</div>
|
|
73
|
-
</div>
|
|
75
|
+
</div>
|