UNPKG

jsharmony-cms

Version:
47 lines 2.89 kB
{ "Branch_Upload": { "layout":"form", "title":"Upload Revision Backup", "table":"", "menu":"Revisions", "breadcrumbs":"#CMS_SITE_BREADCRUMBS", "oninit": "jsh.System.RequireSite(xmodel);", "onecolumn":true, "actions":"BU", "roles": {"PUBLISHER": "BU"}, "hide_system_buttons":["print","save"], "sqlselect":[ "select ", "'USER' new_branch_type,", "'' new_branch_name" ], "nokey": true, "fields": [ {"name":"branch_id","type":"bigint","control":"hidden","key":true}, {"control":"html","value":[ "<div class='jsHarmonyCms_info_tip'>", "Create a new revision from an existing Revision Backup file.<br/>", "You can download a Revision Backup for an existing Revision from its Details page.", "</div>", ]}, {"name":"source_site_name","control":"label","caption":"New Revision Name","controlstyle":"margin-right:0px;"}, {"name":"new_site_id","type":"bigint","control":"hidden","default":"js:jsh.globalparams.site_id"}, {"name":"new_site_name","control":"label","controlstyle":"margin-right:4px;","readonly":true,"caption":"","caption_ext":"Site","validate":["Required"],"nl":false,"default":"js:jsh.globalparams.site_name"}, {"control":"html","value":"/&nbsp;","nl":false}, {"name":"new_branch_type","actions":"BU","type":"varchar","control":"dropdown","caption":"","nl":false, "controlstyle":"margin-right:0px;","validate":["Required"],"caption_ext":"Revision Location", "lov":{ "sql": "select 'PUBLIC' code_val, 'Release' code_txt where ({schema}.my_user_is_publisher({schema}.my_current_site_id()) = 1) union all select 'USER' code_val, (select concat(sys_user_fname,' ',sys_user_lname) from jsharmony.sys_user where jsharmony.sys_user.sys_user_id=jsharmony.my_sys_user_id()) code_txt" } }, {"control":"html","value":"&nbsp;/&nbsp;","nl":false}, {"name":"new_branch_name","actions":"BU","type":"varchar","control":"textbox","caption":"","nl":false,"validate":["Required"],"caption_ext":"New Revision Name","focus":true,"controlparams":{"placeholder":"New Revision Name"}}, {"name":"branch_content","type":"file","actions":"BU","nl":true, "control":"file_upload","caption":"Upload Backup File","controlparams": { "download_button": "", "upload_button": "Select Zip", "delete_button": "Delete", "data_folder":"branch_upload" }, "validate": ["Extension:['.ZIP']","Required"]}, {"control":"button","value":"Upload","actions":"U","controlstyle": "padding:3px 8px;margin-top:6px;","onclick": "if(!xmodel.controller.form.Data.Commit()) return; jsh.System.UploadBranch(xmodel.get('new_site_id'),xmodel.get('new_branch_type'),xmodel.get('new_branch_name'),xmodel.get('branch_content'));"} ] } }