UPDATE core_assets SET VALUE = '{"form": [[{"id": "language", "cols": 6, "list": "/api/v1/misc/codelists/jc_languages", "name": "language", "type": "dropdown", "label": "self_profile_language", "mandatory": true}, {"id": "meta.profile.logo", "cols": 4, "name": "meta[profile][logo]", "type": "file", "label": "Logo", "folder": "settings", "filename": "company-logo.png", "onchange": "jivaCoreFunc.onChange.fileUpload(this);", "mandatory": false}, {"id": "meta.profile.pic", "cols": 4, "name": "meta[profile][pic]", "type": "file", "label": "Picture", "onchange": "jivaCoreFunc.onChange.fileUpload(this);", "mandatory": false}, {"id": "", "cols": 4, "name": "", "type": "toggle-list", "label": "Select", "elements": [{"id": "userStatusSwitch", "name": "userStatusSwitch", "label": "Status"}], "mandatory": false}], [{"id": "meta.profile.business_name", "cols": 3, "name": "meta[profile][business_name]", "type": "text", "label": "business_name", "mandatory": false}, {"id": "meta.profile.tax_number", "cols": 3, "name": "meta[profile][tax_number]", "type": "text", "label": "tax_number", "mandatory": false}, {"id": "meta.profile.vat_id", "cols": 3, "name": "meta[profile][vat_id]", "type": "text", "label": "vat_id", "mandatory": false}, {"id": "meta.profile.registry_authority", "cols": 3, "name": "meta[profile][registry_authority]", "type": "text", "label": "registry_authority", "mandatory": false}], [{"id": "meta.profile.street_address", "cols": 3, "name": "meta[profile][street_address]", "type": "text", "label": "street_address", "mandatory": false}, {"id": "meta.profile.city", "cols": 3, "name": "meta[profile][city]", "type": "text", "label": "city", "mandatory": false}, {"id": "meta.profile.country", "cols": 3, "name": "meta[profile][country]", "type": "text", "label": "country", "mandatory": false}, {"id": "meta.profile.reg_num", "cols": 3, "name": "meta[profile][reg_num]", "type": "text", "label": "reg_num", "mandatory": false}], [{"id": "meta.profile.bank_name", "cols": 3, "name": "meta[profile][bank_name]", "type": "text", "label": "bank_name", "mandatory": false}, {"id": "meta.profile.iban", "cols": 3, "name": "meta[profile][iban]", "type": "text", "label": "iban", "mandatory": false}, {"id": "meta.profile.swift_code", "cols": 3, "name": "meta[profile][swift_code]", "type": "text", "label": "swift_code", "mandatory": false}, {"id": "meta.profile.nominal_capital", "cols": 3, "name": "meta[profile][nominal_capital]", "type": "text", "label": "nominal_capital", "mandatory": false}], [{"id": "meta.profile.siteUrl", "cols": 3, "name": "meta[profile][siteUrl]", "type": "text", "label": "siteUrl", "mandatory": false}, {"id": "meta.profile.mail", "cols": 3, "name": "meta[profile][mail]", "type": "text", "label": "mail", "mandatory": false}, {"id": "meta.profile.phone_num", "cols": 3, "name": "meta[profile][phone_num]", "type": "text", "label": "phone_num", "mandatory": false}, {"id": "meta.profile.secondary_reg_num", "cols": 3, "name": "meta[profile][secondary_reg_num]", "type": "text", "label": "secondary_reg_num", "mandatory": false, "helperTooltip": "sadfj ahsdlkf hasd"}]]}' WHERE asset_type = 'form' AND asset_name = 'self_profile_view_form';

INSERT INTO core_assets (asset_type,asset_name,description,custom,asset_innerhtml,asset_parameters,asset_code,before_trigger,after_trigger,failure_rollback,exec_order,meta,role_id) VALUES
	 ('form','self_password_view_form','form to create self password',false,NULL,'{"form": [[{"id": "email", "cols": 4, "name": "email", "type": "text", "label": "self_profile_email", "onchange": "jivaCoreOptions.unsavedData=true;", "mandatory": true, "relatedHidden": "id"}, {"id": "password", "cols": 4, "name": "password", "type": "password", "label": "self_profile_password", "mandatory": false, "shouldMatch": "confirm_password", "autocomplete": "off"}, {"id": "confirm_password", "cols": 4, "name": "confirm_password", "type": "password", "label": "self_profile_confirm_password", "mandatory": false, "shouldMatch": "password"}]]}',NULL,NULL,NULL,NULL,NULL,NULL,NULL);

INSERT INTO public.core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('PPASSWD','self_password_view','MSELF','getObjects','','self/password','self','Permission to view self password page','PAG','fa-solid fa-key',1,false,false,NULL),
	 ('BSPWSAV','self_password_view_save','PPASSWD','','','self/password','self','Permission to password save button','BUT','fas fa-save',1,false,false,NULL);

INSERT INTO core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XSFPFPR','self_password_reset','SDSMGLS','userPasswordReset','','self/profile','self','passwordReset function','EXE','',1,false,true,NULL);

INSERT INTO core_permissions (code,permission_name,parent,permission_function,default_child,permission_namespace,"module",permission_description,permission_type,icon,ord,hidden,guest,meta) VALUES
	 ('XSFPFPC','self_password_reset_confirm','SDSMGLS','userSetNewPassword','','self/profile','self','userSetNewPassword function','EXE','',1,false,true,NULL);
