Skip to content

Commit 91b5ca2

Browse files
authored
Merge pull request #8946 from ProcessMaker/FOUR-32412
Four 32412
2 parents 1b9bc4b + 927dcea commit 91b5ca2

161 files changed

Lines changed: 3938 additions & 2362 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ProcessMaker/Http/Controllers/Process/ScreenBuilderController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function edit(ScreenBuilderManager $manager, Screen $screen, $processId =
4343

4444
return view('processes.screen-builder.screen', [
4545
'screen' => $screen,
46+
'type' => strtoupper($screen->type ?? 'FORM'),
4647
'manager' => $manager,
4748
'autoSaveDelay' => config('versions.delay.process', 5000),
4849
'isVersionsInstalled' => PackageHelper::isPmPackageVersionsInstalled(),

ProcessMaker/Http/Controllers/RequestController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ public function screenPreview(ProcessRequest $request, ProcessRequestToken $task
269269
$manager = app(ScreenBuilderManager::class);
270270
event(new ScreenBuilderStarting($manager, ($request->summary_screen) ? $request->summary_screen->type : 'FORM'));
271271

272-
return view('requests.preview', compact('request', 'screen', 'manager', 'data'));
272+
$type = strtoupper($screen->type ?? 'FORM');
273+
274+
return view('requests.preview', compact('request', 'screen', 'manager', 'data', 'type'));
273275
}
274276

275277
/**
Lines changed: 110 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,113 @@
11
import Vue from "vue";
2-
import AuthClientsListing from "./components/AuthClientsListing";
2+
import AuthClientsListing from "./components/AuthClientsListing.vue";
33

44
Vue.component("AuthClientsListing", AuthClientsListing);
5+
6+
new Vue({
7+
el: "#authClients",
8+
data: {
9+
authClient: {
10+
id: null,
11+
name: "",
12+
types: [],
13+
redirect: "",
14+
secret: "",
15+
},
16+
filter: "",
17+
errors: null,
18+
disabled: false,
19+
title: "",
20+
secretTitle: "",
21+
customModalButtons: [],
22+
secret: "",
23+
},
24+
beforeMount() {
25+
this.initCustomModalButtons();
26+
this.resetValues();
27+
},
28+
methods: {
29+
onClose() {
30+
this.resetValues();
31+
},
32+
onSave() {
33+
if (this.disabled) {
34+
return;
35+
}
36+
this.disabled = true;
37+
38+
this.loading = true;
39+
let method = "POST";
40+
let url = "/oauth/clients";
41+
let verb = "created";
42+
if (this.authClient.id) {
43+
method = "PUT";
44+
url = `${url}/${this.authClient.id}`;
45+
verb = "saved";
46+
}
47+
ProcessMaker.apiClient({
48+
method,
49+
url,
50+
baseURL: "/",
51+
data: this.authClient,
52+
}).then((response) => {
53+
this.$refs.createEditAuthClient.hide();
54+
this.loading = false;
55+
if (response.data.secret) {
56+
this.secret = response.data.secret;
57+
this.$refs.secretModal.show();
58+
} else {
59+
this.$refs.authClientList.fetch();
60+
}
61+
ProcessMaker.alert(`${this.$t("The auth client was ")}${verb}.`, this.$t("success"));
62+
}).catch((error) => {
63+
this.disabled = false;
64+
this.errors = error.response.data.errors;
65+
});
66+
},
67+
resetValues() {
68+
this.title = this.$t("Create Auth-Client");
69+
this.secretTitle = this.$t("Copy Secret To Clipboard");
70+
this.authClient = {
71+
id: null,
72+
name: "",
73+
types: [],
74+
redirect: "",
75+
secret: "",
76+
};
77+
this.errors = {
78+
name: null,
79+
redirect: null,
80+
types: null,
81+
};
82+
this.disabled = false;
83+
this.initCustomModalButtons();
84+
},
85+
edit(item) {
86+
this.title = this.$t("Edit Auth Client");
87+
this.authClient = item;
88+
this.$refs.createEditAuthClient.show();
89+
},
90+
initCustomModalButtons() {
91+
this.customModalButtons = [
92+
{
93+
content: "Close",
94+
action: "close",
95+
variant: "secondary",
96+
disabled: false,
97+
hidden: false,
98+
},
99+
];
100+
},
101+
hideSecretModal() {
102+
this.$refs.secretModal.hide();
103+
this.$refs.authClientList.fetch();
104+
},
105+
copySecret(secret) {
106+
navigator.clipboard.writeText(secret).then(() => {
107+
ProcessMaker.alert(this.$t("Secret copied to clipboard."), "success");
108+
}, () => {
109+
ProcessMaker.alert(this.$t("Secret not copied to clipboard."), "danger");
110+
});
111+
},
112+
},
113+
});
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import Vue from "vue";
2+
import "bootstrap-vue/dist/bootstrap-vue.css";
3+
import { BootstrapVue, BootstrapVueIcons } from "bootstrap-vue";
24
import VuePassword from "vue-password";
35
import AvatarImage from "../../../components/AvatarImage.vue";
46

7+
Vue.use(BootstrapVue);
8+
Vue.use(BootstrapVueIcons);
9+
510
Vue.component("AvatarImage", AvatarImage);
611
Vue.component("VuePassword", VuePassword);

resources/js/admin/cssOverride/components/ColorPicker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
1111
import {Sketch} from 'vue-color';
1212
import { createUniqIdsMixin } from "vue-uniq-ids";
13+
import tinycolor from 'tinycolor2';
1314
const uniqIdsMixin = createUniqIdsMixin();
14-
const tinycolor = require("tinycolor2");
1515
1616
export default {
1717
components: {

resources/js/admin/cssOverride/components/SiteDesign.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@
193193

194194
<script>
195195
import AddToBundle from '../../../components/shared/AddToBundle.vue';
196+
// Content iframe CSS must be inlined; parent-page CSS imports do not apply inside the editor iframe.
197+
import oxideContentCss from 'tinymce/skins/ui/oxide/content.min.css?raw';
198+
import defaultContentCss from 'tinymce/skins/content/default/content.min.css?raw';
196199
197200
export default {
198201
components: {
@@ -204,16 +207,17 @@ export default {
204207
altText: '',
205208
loginFooter: '',
206209
editorSettings: {
210+
// Toolbar skin is imported in edit.js. Iframe body styles go via content_style / content_css.
207211
content_css: '/css/app.css',
208-
content_style: "body {padding: 10px}",
212+
content_style: `${oxideContentCss}\n${defaultContentCss}\nbody { padding: 10px; }`,
209213
menubar: false,
210214
plugins: [ 'link', 'lists', 'code' ],
211215
toolbar: 'code | undo redo | link | styleselect fontsizeselect | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent',
212216
skin: false,
213217
relative_urls: false,
214218
remove_script_host: false,
215219
},
216-
config: config,
220+
config: window.config,
217221
key: 'css-override',
218222
fileLogin: {
219223
file: null,
@@ -394,8 +398,8 @@ export default {
394398
}
395399
});
396400
397-
this.loginFooter = _.get(loginFooterSetting, 'config.html', '');
398-
this.altText = altTextSetting;
401+
this.loginFooter = _.get(window.loginFooterSetting, 'config.html', '');
402+
this.altText = window.altTextSetting;
399403
},
400404
methods: {
401405
placeholder(object, string) {
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import Vue from "vue";
22
import Editor from "@tinymce/tinymce-vue";
3-
import SiteDesign from "./components/SiteDesign";
4-
import ColorPicker from "./components/ColorPicker";
3+
import SiteDesign from "./components/SiteDesign.vue";
4+
import ColorPicker from "./components/ColorPicker.vue";
5+
import "tinymce/tinymce";
56
import "tinymce/themes/silver";
7+
import "tinymce/icons/default";
68
import "tinymce/plugins/link";
79
import "tinymce/plugins/lists";
810
import "tinymce/plugins/code";
11+
// skin: false skips TinyMCE's default skin fetch; Vite does not expose node_modules CSS URLs.
12+
import "tinymce/skins/ui/oxide/skin.min.css";
913

1014
Vue.component("SiteDesign", SiteDesign);
1115
Vue.component("ColorPicker", ColorPicker);
12-
Vue.component("Editor", Editor);
16+
Vue.component("Editor", Editor);

resources/js/admin/groups/index.js

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,71 @@
11
import Vue from "vue";
2-
import GroupsListing from "./components/GroupsListing";
2+
3+
import GroupsListing from "./components/GroupsListing.vue";
34

45
Vue.component("GroupsListing", GroupsListing);
6+
7+
new Vue({
8+
el: "#listGroups",
9+
data() {
10+
return {
11+
filter: "",
12+
formData: {},
13+
errors: {
14+
name: null,
15+
description: null,
16+
status: null,
17+
},
18+
disabled: false,
19+
};
20+
},
21+
mounted() {
22+
this.resetFormData();
23+
this.resetErrors();
24+
},
25+
methods: {
26+
reload() {
27+
this.$refs.groupList.dataManager([
28+
{
29+
field: "updated_at",
30+
direction: "desc",
31+
},
32+
]);
33+
},
34+
onClose() {
35+
this.resetFormData();
36+
this.resetErrors();
37+
},
38+
resetFormData() {
39+
this.formData = Object.assign({}, {
40+
name: null,
41+
description: null,
42+
status: "ACTIVE",
43+
});
44+
},
45+
resetErrors() {
46+
this.errors = Object.assign({}, {
47+
name: null,
48+
description: null,
49+
status: null,
50+
});
51+
},
52+
onSubmit() {
53+
this.resetErrors();
54+
if (this.disabled) {
55+
return;
56+
}
57+
this.disabled = true;
58+
ProcessMaker.apiClient.post("groups", this.formData)
59+
.then((response) => {
60+
ProcessMaker.alert(this.$t("The group was created."), "success");
61+
window.location = `/admin/groups/${response.data.id}/edit`;
62+
})
63+
.catch((error) => {
64+
if (error.response.status && error.response.status === 422) {
65+
this.errors = error.response.data.errors;
66+
}
67+
this.disabled = false;
68+
});
69+
},
70+
},
71+
});

resources/js/admin/settings/components/SettingDriverAuthorization.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
</template>
101101
<script>
102102
// eslint-disable-next-line import/no-unresolved
103-
import { FormErrorsMixin, Required } from "SharedComponents";
103+
import FormErrorsMixin from "../../../components/shared/FormErrorsMixin";
104+
import Required from "../../../components/shared/Required";
104105
import settingMixin from "../mixins/setting";
105106
import AdditionalDriverConnectionProperties from "./AdditionalDriverConnectionProperties.vue";
106107
import OauthConnectionProperties from "./cdata/OauthConnectionProperties.vue";

resources/js/admin/settings/components/SettingsListing.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
</template>
194194

195195
<script>
196-
import { BasicSearch } from "SharedComponents";
196+
import BasicSearch from "../../../components/shared/BasicSearch.vue";
197197
import isPMQL from "../../../modules/isPMQL";
198198
import dataLoadingMixin from "../../../components/common/mixins/apiDataLoading";
199199
import PmqlInput from "../../../components/shared/PmqlInput";

0 commit comments

Comments
 (0)