Implemented portal settings page including saving
This commit is contained in:
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><record_update table="sp_widget">
|
||||
<sp_widget action="INSERT_OR_UPDATE">
|
||||
<category>custom</category>
|
||||
<client_script><![CDATA[api.controller=function($timeout, faSettings) {
|
||||
/* widget controller */
|
||||
var c = this;
|
||||
var schema, submission;
|
||||
console.log("c", c)
|
||||
if(c.data.schema) schema = JSON.parse(c.data.schema);
|
||||
if(c.data.submission) submission = JSON.parse(c.data.submission);
|
||||
|
||||
var submitEndpoint = {
|
||||
script_include: "x_355681_fa.CoreClientUtils",
|
||||
function: "saveProperty",
|
||||
keys: []
|
||||
}
|
||||
|
||||
faSettings.prepare();
|
||||
faSettings.setupForm('formio', schema, submission, submitEndpoint);
|
||||
|
||||
};]]></client_script>
|
||||
<controller_as>c</controller_as>
|
||||
<css/>
|
||||
<data_table>sp_instance</data_table>
|
||||
<demo_data/>
|
||||
<description/>
|
||||
<docs/>
|
||||
<field_list/>
|
||||
<has_preview>false</has_preview>
|
||||
<id>fa_settings</id>
|
||||
<internal>false</internal>
|
||||
<link><![CDATA[function link(scope, element, attrs, controller) {
|
||||
|
||||
}]]></link>
|
||||
<name>FA Settings</name>
|
||||
<option_schema/>
|
||||
<public>false</public>
|
||||
<roles/>
|
||||
<script><![CDATA[(function() {
|
||||
/* populate the 'data' object */
|
||||
/* e.g., data.table = $sp.getValue('table'); */
|
||||
data.schema = gs.getProperty("x_355681_fa.form.admin.settings.schema", {});
|
||||
data.submission = gs.getProperty("x_355681_fa.form.admin.settings", {});
|
||||
})();]]></script>
|
||||
<servicenow>false</servicenow>
|
||||
<sys_class_name>sp_widget</sys_class_name>
|
||||
<sys_created_by>admin</sys_created_by>
|
||||
<sys_created_on>2023-01-28 14:16:41</sys_created_on>
|
||||
<sys_id>6647f5eb976021105838bfb3f153af64</sys_id>
|
||||
<sys_name>FA Settings</sys_name>
|
||||
<sys_package display_value="Fulfilment Automater" source="x_355681_fa">c04afa629713111093a8337e6253af6d</sys_package>
|
||||
<sys_policy/>
|
||||
<sys_scope display_value="Fulfilment Automater">c04afa629713111093a8337e6253af6d</sys_scope>
|
||||
<sys_update_name>sp_widget_6647f5eb976021105838bfb3f153af64</sys_update_name>
|
||||
<template><![CDATA[<div>
|
||||
<div id="formio"></div>
|
||||
</div>]]></template>
|
||||
</sp_widget>
|
||||
</record_update>
|
||||
Reference in New Issue
Block a user