File Editor
Directories:
.. (Back)
Files:
dashboard.asset.php
dashboard.js
dashboard.scss-rtl.css
dashboard.scss.asset.php
dashboard.scss.css
dashboard.scss.js
displayFrame.asset.php
displayFrame.js
form-block.asset.php
form-block.js
nf-behavioral.asset.php
nf-behavioral.js
sub-table-block.asset.php
sub-table-block.js
sub-table-render.asset.php
sub-table-render.js
submissions.asset.php
submissions.js
submissions.scss-rtl.css
submissions.scss.asset.php
submissions.scss.css
submissions.scss.js
Create New File
Create
Edit File: dashboard.js
(()=>{"use strict";var e={n:a=>{var n=a&&a.__esModule?()=>a.default:()=>a;return e.d(n,{a:n}),n},d:(a,n)=>{for(var t in n)e.o(n,t)&&!e.o(a,t)&&Object.defineProperty(a,t,{enumerable:!0,get:n[t]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a)};const a=window.wp.domReady;var n=e.n(a);const t=window.wp.element,s=window.React,r=window.wp.i18n,o=window.wp.components,i=()=>{const e="undefined"!=typeof ninja_forms_admin_dashboard_data&&void 0!==ninja_forms_admin_dashboard_data.pluginDir?ninja_forms_admin_dashboard_data.pluginDir.concat("ninja-forms/assets/img/promotions/dashboard-user-management.png"):"";return(0,s.createElement)(o.Card,{className:"widget"},(0,s.createElement)(o.CardHeader,null,(0,s.createElement)("h2",null,(0,r.__)("User Access allow you to manage who can see and edit form submissions from an easy to use control panel.","ninja-forms"))),(0,s.createElement)(o.CardBody,null,(0,s.createElement)("h3",null,(0,r.__)("Grant or restrict access for :","ninja-forms")),(0,s.createElement)("ul",{className:"nf-dashboard-user-access-ul-a"},(0,s.createElement)("li",{key:"nf-dashboard-user-access-li-a1"},(0,s.createElement)("h4",null,(0,r.__)("Viewing submissions","ninja-forms"))),(0,s.createElement)("li",{key:"nf-dashboard-user-access-li-a2"},(0,s.createElement)("h4",null,(0,r.__)("Editing submissions","ninja-forms"))),(0,s.createElement)("li",{key:"nf-dashboard-user-access-li-a3"},(0,s.createElement)("h4",null,(0,r.__)("Set permissions by user role","ninja-forms"))),(0,s.createElement)("li",{key:"nf-dashboard-user-access-li-a4"},(0,s.createElement)("h4",null,(0,r.__)("Let users edit their submissions","ninja-forms"))),(0,s.createElement)("li",{key:"nf-dashboard-user-access-li-a5"},(0,s.createElement)("h4",null,(0,r.__)("Delegate submission management","ninja-forms")))),(0,s.createElement)("h3",null,(0,r.__)("User Access controls are just one of the many things you can do with the User Management add-on!","ninja-forms")),(0,s.createElement)("div",{className:"nf-dashboard-user-access-button"},(0,s.createElement)(o.Button,{className:"nf-button primary",text:(0,r.__)("Get User Management","ninja-forms"),href:"https://ninjaforms.com/extensions/user-management/?utm_source=Ninja+Forms+Plugin&utm_medium=User+Access+Tab&utm_campaign=User+Access+User+Management",target:"_blank",icon:"admin-collapse",iconPosition:"right"}))),(0,s.createElement)(o.CardFooter,null,(0,s.createElement)(o.CardMedia,null,(0,s.createElement)("figure",null,(0,s.createElement)("figcaption",null,(0,r.__)("User Access Control Panel","ninja-forms")),(0,s.createElement)("img",{className:"nf-user-access-dasboard-screenshot",src:e,alt:(0,r.__)("Ninja Forms User Management Submissions Access settings screenshot","ninja-forms")})))))},l=()=>(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"widget widget-plan-notice"},(0,s.createElement)("p",{className:"widget-title"},(0,r.__)("Having a tough time choosing just a few?","ninja-forms"),(0,s.createElement)("br",null),(0,r.__)("Bundle and save big with a membership!","ninja-forms")),(0,s.createElement)("p",null,(0,r.__)("Our membership plans have been designed to bring commonly needed features into one affordable package. Whether you're building forms for yourself, your clients, or your company, there's a plan that will fit your needs... and your budget.","ninja-forms")),(0,s.createElement)("a",{className:"nf-button primary feature-list-link",href:"https://ninjaforms.com/pricing/?utm_source=Ninja+Forms+Plugin&utm_medium=Add-ons&utm_campaign=Add-ons+Memberships&utm_content=Dashboard+Membership",target:"_blank",rel:"noopener"},(0,r.__)("View Memberships","ninja-forms")," ",(0,s.createElement)("i",{className:"fa fa-chevron-circle-right","aria-hidden":"true"})))),d=e=>{const{groups:a,setGroup:n,currentGroup:t}=e,r=Object.entries(a);return(0,s.createElement)(o.ButtonGroup,{className:"nf-addons-button-group"},(()=>{let e=[(0,s.createElement)(o.Button,{key:"all",variant:"primary",onClick:()=>n("all"),text:"List all sections",size:"small",label:"List all sections",showTooltip:!1,className:"all"===t?"nf-button listed-button primary":"nf-button listed-button"})];return r.forEach((a=>{e.push((0,s.createElement)(o.Button,{key:a[0],variant:"primary",onClick:()=>n(a[0]),text:a[1].title,size:"small",label:a[1].title,showTooltip:!1,className:t===a[0]?"nf-button listed-button primary":"nf-button listed-button"}))})),e})())},m=e=>{const{currentGroup:a,groups:n}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"wrap apps-container"},(()=>{const e=Object.entries(n);let t=[];return"all"===a?e.forEach((e=>{t.push((0,s.createElement)(u,{key:e[0],group:n[e[0]],slug:e[0]}))})):t.push((0,s.createElement)(u,{key:a,group:n[a],slug:a})),t})()))},c=e=>{const{element:a}=e,n=void 0!==a[1]?a[1]:[],t="undefined"!=typeof ninja_forms_admin_dashboard_data&&void 0!==ninja_forms_admin_dashboard_data.pluginURL&&void 0!==n.image?ninja_forms_admin_dashboard_data.pluginURL+n.image:"";return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{className:"nf-extend nf-box"},(0,s.createElement)("div",{className:"nf-box-inside"},(0,s.createElement)("img",{src:t,alt:n.title}),(0,s.createElement)("h2",null,n.title),(0,s.createElement)("div",{className:"nf-extend-content"},(0,s.createElement)("p",null,n.content),(0,s.createElement)("div",{className:"nf-extend-buttons"},n.docs?(0,s.createElement)("a",{target:"_blank",href:n.docs,className:"nf-button secondary nf-doc-button"},(0,r.__)("Docs","ninja-forms")):(0,s.createElement)("p",null,(0,s.createElement)("a",null," ",(0,r.__)("Documentation coming soon.","ninja-forms")," ")),"active"===n.status?(0,s.createElement)("span",{className:"secondary nf-button"},(0,r.__)("Active","ninja-forms")):"installed"===n.status?(0,s.createElement)("span",{className:"secondary nf-button"},(0,r.__)("Installed","ninja-forms")):(0,s.createElement)("a",{target:"_blank",href:n.link,title:n.title,className:"primary nf-button"},(0,r.__)("Learn More","ninja-forms")))))))},u=e=>{const{group:a,slug:n}=e;return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("h3",{id:n},a.title),(0,s.createElement)("div",{className:"apps-container"},(()=>{let e=[];const n=Object.entries(a.items);return n.sort(((e,a)=>e[1].title.toUpperCase()<a[1].title.toUpperCase()?-1:e[1].title.toUpperCase()>a[1].title.toUpperCase()?1:0)),n.forEach((a=>{e.push((0,s.createElement)(c,{key:a[0],element:a}))})),e})()))},_=e=>{const{element:a}=e,[n,o]=(0,t.useState)(!1),i=(0,t.useCallback)((()=>ninja_forms_sendwp_remote_install())),l=f(a.description);return(0,s.createElement)("div",{className:"nf-extend nf-box"},(0,s.createElement)("div",{className:"nf-box-inside",style:{padding:"10 20"}},(0,s.createElement)("h2",null,a.name),(0,s.createElement)("div",{className:"nf-extend-content"},l,(0,s.createElement)("div",{className:"nf-extend-buttons"},(0,s.createElement)("a",{className:"nf-button secondary",href:a.learnMore,target:"_blank",style:{float:"left"}},(0,r.__)("Learn More","ninja-forms")),a.installPath&&(0,s.createElement)("button",{onClick:()=>{o(!n),i()},className:"nf-button primary",style:{float:"right"}},n?(0,s.createElement)("span",{class:"dashicons dashicons-update dashicons-update-spin"}):(0,r.__)("Register","ninja-forms"))))))},f=e=>{const a=e.indexOf("With SendWP, say"),n=e.indexOf("Codeable’s Ninja Forms"),t=e.indexOf("Choose what to translate,"),r=e.indexOf("Compatible with the Omnisend"),o=e.indexOf("With HostArmada, enjoy"),i=-1!==a?a:-1!==n?n:-1!==t?t:-1!==r?r:-1!==o?o:null;return i&&(e=[e.substr(0,i),e.substr(i)]),e.map((e=>(0,s.createElement)("p",null,e)))},h=()=>{const e="undefined"!=typeof ninja_forms_admin_dashboard_data&&void 0!==ninja_forms_admin_dashboard_data.addonsData&&void 0!==ninja_forms_admin_dashboard_data.addonsData.groups?ninja_forms_admin_dashboard_data.addonsData.groups:[],a="undefined"!=typeof ninja_forms_admin_dashboard_data&&void 0!==ninja_forms_admin_dashboard_data.addonsData&&void 0!==ninja_forms_admin_dashboard_data.addonsData.items?ninja_forms_admin_dashboard_data.addonsData.items:[],n="undefined"!=typeof ninja_forms_admin_dashboard_data&&void 0!==ninja_forms_admin_dashboard_data.addonsData&&void 0!==ninja_forms_admin_dashboard_data.addonsData.notices?ninja_forms_admin_dashboard_data.addonsData.notices:[],[r,o]=(0,t.useState)("all");return(0,s.createElement)(s.Fragment,null,(0,s.createElement)(l,null),(0,s.createElement)(d,{groups:e,setGroup:e=>{o(e)},currentGroup:r}),(0,s.createElement)(m,{groups:e,currentGroup:r,items:a,notices:n}))},p=()=>{const e="undefined"!=typeof ninja_forms_admin_dashboard_data&&void 0!==ninja_forms_admin_dashboard_data.servicesData?ninja_forms_admin_dashboard_data.servicesData:[];return(0,s.createElement)(s.Fragment,null,(0,s.createElement)("div",{class:"services"},(0,s.createElement)("div",{class:"wrap apps-container"},(()=>{let a=[];return Object.values(e).forEach((e=>{a.push((0,s.createElement)(_,{element:e}))})),a})())))},b=e=>{jQuery("nav.sections a.active").removeClass("active"),jQuery("nav.sections ."+e+" a").addClass("active"),window.location.hash!=="#"+e&&(window.location.hash=e),jQuery("#ninja-forms-dashboard > div > .content > div")[0].innerHTML='<div id="nf-'+e+'-settings-anchor"></div>'};addEventListener("hashchange",(e=>{if(e.oldURL!==e.newURL){const e=window.location.hash.substring(1);g(e)}})),n()((()=>{jQuery(document).on("ajaxComplete",((e,a)=>{if(void 0!==a.responseJSON.data){const e=window.location.hash.substring(1);g(e)}}))}));const g=e=>{"user-access"===e&&(b(e),ninja_forms_admin_dashboard_data.load_user_management&&(()=>{const e=(0,t.createElement)(i),a=document.getElementById("nf-user-access-settings-anchor");t.createRoot?(0,t.createRoot)(a).render(e):(0,t.render)(e,a)})()),e&&"add-ons"===e&&(b(e),(()=>{const e=(0,t.createElement)(h),a=document.getElementById("nf-add-ons-settings-anchor");t.createRoot?(0,t.createRoot)(a).render(e):(0,t.render)(e,a)})()),e&&"services"===e&&(b(e),(()=>{const e=(0,t.createElement)(p),a=document.getElementById("nf-services-settings-anchor");t.createRoot?(0,t.createRoot)(a).render(e):(0,t.render)(e,a)})())}})();
Save Changes
Rename File
Rename