Version Description
Please note this version requires WordPress 3.3. Please update your WordPress install before upgrading to Visual Form Builder 2.1.
Download this release
Release Info
Developer | mmuro |
Plugin | Visual Form Builder |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0 to 2.1
- css/nav-menu.css +1 -1
- css/visual-form-builder-admin.css +1 -1
- css/visual-form-builder.css +50 -2
- js/jquery.metadata.js +1 -0
- js/visual-form-builder.js +1 -1
- languages/visual-form-builder-bg_BG.mo +0 -0
- languages/visual-form-builder-bg_BG.po +402 -0
- readme.txt +18 -10
- visual-form-builder.php +326 -100
css/nav-menu.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
html,body{min-width:950px}#nav-menus-frame{margin-left:300px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-left:-300px;clear:both;float:left;padding-top:24px}.no-js #wpbody-content #menu-settings-column{padding-top:31px}#menu-settings-column .inside{clear:both}.metabox-holder-disabled .postbox{opacity:.5;filter:alpha(opacity=50)}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}#menu-management-liquid{float:left;min-width:100%}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%}#menu-management .menu-edit{border:1px solid;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;margin-bottom:20px}#post-body{padding:10px;border-width:1px 0;border-style:solid}#nav-menu-header,#nav-menu-footer{padding:0 10px}#nav-menu-header{border-bottom:1px solid}#nav-menu-footer{border-top:1px solid}#post-body div.updated,#post-body div.error{margin:0}#post-body-content{position:relative}#menu-management .menu-add-new abbr{font-weight:bold}#menu-management .nav-tabs-nav{margin:0 20px}#menu-management .nav-tabs-arrow{width:10px;padding:0 5px 4px;cursor:pointer;position:absolute;top:0;line-height:22px;font-size:18px;text-shadow:0 1px 0 #fff}#menu-management .nav-tabs-arrow-left{left:0}#menu-management .nav-tabs-arrow-right{right:0;text-align:right}#menu-management .nav-tabs-wrapper{width:100%;height:28px;margin-bottom:-1px;overflow:hidden}#menu-management .nav-tabs{padding-left:20px;padding-right:10px}.js #menu-management .nav-tabs{float:left;margin-left:0;margin-right:-400px}#menu-management .nav-tab{margin-bottom:0;font-size:14px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif}#select-nav-menu-container{text-align:right;padding:0 10px 3px 10px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}#wpbody .open-label{display:block;float:left}#wpbody .open-label span{padding-right:10px}.js .input-with-default-title{font-style:italic}#menu-management .inside{padding:0 10px}.postbox .howto input{width:180px;float:right}.customlinkdiv .howto input{width:200px}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:right}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}.meta-sep,.submitdelete,.submitcancel{display:block;float:left;font-size:12px;margin:4px 0;line-height:15px}.meta-sep{padding:0 2px}#cancel-save{text-decoration:underline;font-size:12px;margin-left:20px;margin-top:5px}.list-controls{float:left;margin-top:5px}.add-to-menu{float:right}.postbox img.waiting{display:none;vertical-align:middle}.button-controls{clear:both;margin:10px 0}.show-all,.hide-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px}#manage-menu .inside{padding:0}#available-links dt{display:block}#add-custom-link .howto{font-size:12px}#add-custom-link label span{display:block;float:left;margin-top:5px;padding-right:5px}.menu-item-textbox{width:180px}.howto span{margin-top:4px;display:block;float:left}.quick-search{width:190px}.list-wrap{display:none;clear:both;margin-bottom:10px}.list-container{max-height:200px;overflow-y:auto;padding:10px 10px 5px;border:1px solid;-moz-border-radius:3px}.postbox p.submit{margin-bottom:0}.list li{display:none;margin:0;margin-bottom:5px}.list li .menu-item-title{cursor:pointer;display:block}.list li .menu-item-title input{margin-right:3px;margin-top:-3px}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{padding:1em 0}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative}.menu-item-bar{clear:both;line-height:1.5em;position:relative;margin-top:13px}.menu-item-handle{border:1px solid #dfdfdf;position:relative;padding-left:10px;height:auto;width:400px;line-height:35px;text-shadow:0 1px 0 #fff;overflow:hidden;word-wrap:break-word;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px}#menu-to-edit .menu-item-invalid .menu-item-handle{background-color:#f6c9cc;background-image:-ms-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-moz-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-o-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-webkit-gradient(linear,left bottom,left top,from(#f6c9cc),to(#fdf8ff));background-image:-webkit-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:linear-gradient(bottom,#f6c9cc,#fdf8ff)}.menu-item-edit-active .menu-item-handle{-moz-border-radius:3px 3px 0 0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-khtml-border-bottom-right-radius:0;-khtml-border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}.menu li.deleting .menu-item-handle{background-image:none;text-shadow:0}.menu-item-handle .item-title{font-size:12px;font-weight:bold;padding:7px 0;line-height:20px;display:block;margin-right:13em}li.menu-item.ui-sortable-helper dl{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport dl{margin-top:13px}.menu .sortable-placeholder{height:35px;width:410px;margin-top:13px}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:30px}.menu-item-depth-2{margin-left:60px}.menu-item-depth-3{margin-left:90px}.menu-item-depth-4{margin-left:120px}.menu-item-depth-5{margin-left:150px}.menu-item-depth-6{margin-left:180px}.menu-item-depth-7{margin-left:210px}.menu-item-depth-8{margin-left:240px}.menu-item-depth-9{margin-left:270px}.menu-item-depth-10{margin-left:300px}.menu-item-depth-11{margin-left:330px}.menu-item-depth-0 .menu-item-transport{margin-left:0}.menu-item-depth-1 .menu-item-transport{margin-left:-30px}.menu-item-depth-2 .menu-item-transport{margin-left:-60px}.menu-item-depth-3 .menu-item-transport{margin-left:-90px}.menu-item-depth-4 .menu-item-transport{margin-left:-120px}.menu-item-depth-5 .menu-item-transport{margin-left:-150px}.menu-item-depth-6 .menu-item-transport{margin-left:-180px}.menu-item-depth-7 .menu-item-transport{margin-left:-210px}.menu-item-depth-8 .menu-item-transport{margin-left:-240px}.menu-item-depth-9 .menu-item-transport{margin-left:-270px}.menu-item-depth-10 .menu-item-transport{margin-left:-300px}.menu-item-depth-11 .menu-item-transport{margin-left:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{font-size:12px;padding-right:10px}.item-controls{font-size:12px;position:absolute;right:20px;top:0}.item-controls a{text-decoration:none}.item-controls a:hover{cursor:pointer}.item-controls .item-order{padding-right:10px}.item-controls .item-order a{font-weight:bold}body.js .item-order{display:none}.item-edit{position:absolute;right:-20px;top:0;display:block;width:30px;height:36px;overflow:hidden;text-indent:-999em;border-bottom:1px solid;-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;-khtml-border-bottom-left-radius:3px;border-bottom-left-radius:3px;background:url("arrows.png") no-repeat scroll 8px 10px transparent}.item-edit:hover{background:url("arrows.png") no-repeat scroll 8px 10px transparent}.item-edit.opened{background:url("arrows.png") no-repeat scroll 8px -25px transparent}.item-edit.opened:hover{background:url("arrows.png") no-repeat scroll 8px -149px transparent}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;width:400px;padding:10px 0 10px 10px;border:solid;border-width:0 1px 1px 1px;-moz-border-radius:0 0 3px 3px;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-khtml-border-bottom-right-radius:3px;-khtml-border-bottom-left-radius:3px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em auto;text-align:center}.link-to-original{display:block;margin:0 0 10px;padding:3px 5px 5px;font-size:12px;font-style:italic;border:1px solid;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px}.link-to-original a{padding-left:4px;font-style:normal}.hidden-field{display:none}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-right:10px;float:left}.description-thin{width:190px;height:40px}.description-wide{width:390px}.menu-item-actions{padding-top:15px}#cancel-save{cursor:pointer}.major-publishing-actions{clear:both;padding:3px 0 5px}.major-publishing-actions .publishing-action{text-align:right;float:right;line-height:23px;margin:5px 0 1px}.major-publishing-actions .delete-action{vertical-align:middle;text-align:left;float:left;padding-right:15px;margin-top:5px}.menu-name-label span,.auto-add-pages label{font-size:12px;font-style:normal}.menu-name-label{margin-right:15px}.auto-add-pages input{margin-top:0}.auto-add-pages{margin-top:4px;float:left}.submitbox .submitcancel{border-bottom:1px solid;padding:1px 2px;text-decoration:none}.major-publishing-actions .form-invalid{padding-left:4px;margin-left:-4px;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px}#menu-item-name-wrap:after,#menu-item-url-wrap:after,#menu-name-label:after,#menu-settings-column .inside:after,#nav-menus-frame:after,#post-body-content:after,.button-controls:after,.major-publishing-actions:after,.menu-item-settings:after{clear:both;content:".";display:block;height:0;visibility:hidden}#nav-menus-frame,.button-controls,#menu-item-url-wrap,#menu-item-name-wrap{display:block}.option .widefat{width:345px;margin:0 6px 7px 0}.addOption,.deleteOption,.addEmail,.deleteEmail{background:url('sprite.png') -12px -650px no-repeat transparent;text-indent:-9999px;width:16px;height:16px;display:inline-block}.deleteOption,.deleteEmail{background-position:-12px -677px}.addEmail,.deleteEmail{margin-top:5px}.ui-state-disabled .menu-item-handle{cursor:default}.ui-state-disabled .menu-item-handle{background-image:-moz-linear-gradient(top,#fff 0,#bbb 100%);background-image:-o-linear-gradient(top,#fff 0,#bbb 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(1,#bbb));background-image:linear-gradient(top,#fff 0,#bbb 100%)}
|
1 |
+
html,body{min-width:950px}#nav-menus-frame{margin-left:300px}#wpbody-content #menu-settings-column{display:inline;width:281px;margin-left:-300px;clear:both;float:left;padding-top:24px}.no-js #wpbody-content #menu-settings-column{padding-top:31px}#menu-settings-column .inside{clear:both}.metabox-holder-disabled .postbox{opacity:.5;filter:alpha(opacity=50)}.metabox-holder-disabled .button-controls .select-all{display:none}#wpbody{position:relative}#menu-management-liquid{float:left;min-width:100%}#menu-management{position:relative;margin-right:20px;margin-top:-3px;width:100%}#menu-management .menu-edit{border:1px solid;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;margin-bottom:20px}#post-body{padding:10px;border-width:1px 0;border-style:solid}#nav-menu-header,#nav-menu-footer{padding:0 10px}#nav-menu-header{border-bottom:1px solid}#nav-menu-footer{border-top:1px solid}#post-body div.updated,#post-body div.error{margin:0}#post-body-content{position:relative}#menu-management .menu-add-new abbr{font-weight:bold}#menu-management .nav-tabs-nav{margin:0 20px}#menu-management .nav-tabs-arrow{width:10px;padding:0 5px 4px;cursor:pointer;position:absolute;top:0;line-height:22px;font-size:18px;text-shadow:0 1px 0 #fff}#menu-management .nav-tabs-arrow-left{left:0}#menu-management .nav-tabs-arrow-right{right:0;text-align:right}#menu-management .nav-tabs-wrapper{width:100%;height:28px;margin-bottom:-1px;overflow:hidden}#menu-management .nav-tabs{padding-left:20px;padding-right:10px}.js #menu-management .nav-tabs{float:left;margin-left:0;margin-right:-400px}#menu-management .nav-tab{margin-bottom:0;font-size:14px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif}#select-nav-menu-container{text-align:right;padding:0 10px 3px 10px;margin-bottom:5px}#select-nav-menu{width:100px;display:inline}#menu-name-label{margin-top:-2px}#wpbody .open-label{display:block;float:left}#wpbody .open-label span{padding-right:10px}.js .input-with-default-title{font-style:italic}#menu-management .inside{padding:0 10px}.postbox .howto input{width:180px;float:right}.customlinkdiv .howto input{width:200px}#nav-menu-theme-locations .howto select{width:100%}#nav-menu-theme-locations .button-controls{text-align:right}.add-menu-item-view-all{height:400px}#menu-container .submit{margin:0 0 10px;padding:0}.meta-sep,.submitdelete,.submitcancel{display:block;float:left;font-size:12px;margin:4px 0;line-height:15px}.meta-sep{padding:0 2px}#cancel-save{text-decoration:underline;font-size:12px;margin-left:20px;margin-top:5px}.list-controls{float:left;margin-top:5px}.add-to-menu{float:right}.postbox img.waiting{display:none;vertical-align:middle}.button-controls{clear:both;margin:10px 0}.show-all,.hide-all{cursor:pointer}.hide-all{display:none}#menu-name{width:270px}#manage-menu .inside{padding:0}#available-links dt{display:block}#add-custom-link .howto{font-size:12px}#add-custom-link label span{display:block;float:left;margin-top:5px;padding-right:5px}.menu-item-textbox{width:180px}.howto span{margin-top:4px;display:block;float:left}.quick-search{width:190px}.list-wrap{display:none;clear:both;margin-bottom:10px}.list-container{max-height:200px;overflow-y:auto;padding:10px 10px 5px;border:1px solid;-moz-border-radius:3px}.postbox p.submit{margin-bottom:0}.list li{display:none;margin:0;margin-bottom:5px}.list li .menu-item-title{cursor:pointer;display:block}.list li .menu-item-title input{margin-right:3px;margin-top:-3px}#menu-container .inside{padding-bottom:10px}.menu{padding-top:1em}#menu-to-edit{padding:1em 0}.menu ul{width:100%}.menu li{margin-bottom:0;position:relative;opacity:1.0}.menu-item-bar{clear:both;line-height:1.5em;position:relative;margin-top:13px}.menu-item-handle{border:1px solid #dfdfdf;position:relative;padding-left:10px;height:auto;width:400px;line-height:35px;text-shadow:0 1px 0 #fff;overflow:hidden;word-wrap:break-word;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px}#menu-to-edit .menu-item-invalid .menu-item-handle{background-color:#f6c9cc;background-image:-ms-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-moz-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-o-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:-webkit-gradient(linear,left bottom,left top,from(#f6c9cc),to(#fdf8ff));background-image:-webkit-linear-gradient(bottom,#f6c9cc,#fdf8ff);background-image:linear-gradient(bottom,#f6c9cc,#fdf8ff)}.menu-item-edit-active .menu-item-handle{-moz-border-radius:3px 3px 0 0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-khtml-border-bottom-right-radius:0;-khtml-border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.no-js .menu-item-edit-active .item-edit{display:none}.js .menu-item-handle{cursor:move}.menu li.deleting .menu-item-handle{background-image:none;text-shadow:0}.menu-item-handle .item-title{font-size:12px;font-weight:bold;padding:7px 0;line-height:20px;display:block;margin-right:13em}li.menu-item.ui-sortable-helper dl{margin-top:0}li.menu-item.ui-sortable-helper .menu-item-transport dl{margin-top:13px}.menu .sortable-placeholder{height:35px;width:410px;margin-top:13px}.menu-item-depth-0{margin-left:0}.menu-item-depth-1{margin-left:30px}.menu-item-depth-2{margin-left:60px}.menu-item-depth-3{margin-left:90px}.menu-item-depth-4{margin-left:120px}.menu-item-depth-5{margin-left:150px}.menu-item-depth-6{margin-left:180px}.menu-item-depth-7{margin-left:210px}.menu-item-depth-8{margin-left:240px}.menu-item-depth-9{margin-left:270px}.menu-item-depth-10{margin-left:300px}.menu-item-depth-11{margin-left:330px}.menu-item-depth-0 .menu-item-transport{margin-left:0}.menu-item-depth-1 .menu-item-transport{margin-left:-30px}.menu-item-depth-2 .menu-item-transport{margin-left:-60px}.menu-item-depth-3 .menu-item-transport{margin-left:-90px}.menu-item-depth-4 .menu-item-transport{margin-left:-120px}.menu-item-depth-5 .menu-item-transport{margin-left:-150px}.menu-item-depth-6 .menu-item-transport{margin-left:-180px}.menu-item-depth-7 .menu-item-transport{margin-left:-210px}.menu-item-depth-8 .menu-item-transport{margin-left:-240px}.menu-item-depth-9 .menu-item-transport{margin-left:-270px}.menu-item-depth-10 .menu-item-transport{margin-left:-300px}.menu-item-depth-11 .menu-item-transport{margin-left:-330px}body.menu-max-depth-0{min-width:950px!important}body.menu-max-depth-1{min-width:980px!important}body.menu-max-depth-2{min-width:1010px!important}body.menu-max-depth-3{min-width:1040px!important}body.menu-max-depth-4{min-width:1070px!important}body.menu-max-depth-5{min-width:1100px!important}body.menu-max-depth-6{min-width:1130px!important}body.menu-max-depth-7{min-width:1160px!important}body.menu-max-depth-8{min-width:1190px!important}body.menu-max-depth-9{min-width:1220px!important}body.menu-max-depth-10{min-width:1250px!important}body.menu-max-depth-11{min-width:1280px!important}.item-type{font-size:12px;padding-right:10px}.item-controls{font-size:12px;position:absolute;right:20px;top:0}.item-controls a{text-decoration:none}.item-controls a:hover{cursor:pointer}.item-controls .item-order{padding-right:10px}.item-controls .item-order a{font-weight:bold}body.js .item-order{display:none}.item-edit{position:absolute;right:-20px;top:0;display:block;width:30px;height:36px;overflow:hidden;text-indent:-999em;background:url("arrows.png") no-repeat scroll 8px 10px transparent}.item-edit:hover{background:url("arrows.png") no-repeat scroll 8px 10px transparent}.item-edit.opened{background:url("arrows.png") no-repeat scroll 8px -25px transparent}.item-edit.opened:hover{background:url("arrows.png") no-repeat scroll 8px -149px transparent}.menu-instructions-inactive{display:none}.menu-item-settings{display:block;width:400px;padding:10px 0 10px 10px;border:solid;border-width:0 1px 1px 1px;-moz-border-radius:0 0 3px 3px;-webkit-border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:3px;-khtml-border-bottom-right-radius:3px;-khtml-border-bottom-left-radius:3px}.menu-item-edit-active .menu-item-settings{display:block}.menu-item-edit-inactive .menu-item-settings{display:none}.add-menu-item-pagelinks{margin:.5em auto;text-align:center}.link-to-original{display:block;margin:0 0 10px;padding:3px 5px 5px;font-size:12px;font-style:italic;border:1px solid;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px}.link-to-original a{padding-left:4px;font-style:normal}.hidden-field{display:none}.menu-item-settings .description-thin,.menu-item-settings .description-wide{margin-right:10px;float:left}.description-thin{width:190px;height:40px}.description-wide{width:390px}.menu-item-actions{padding-top:15px}#cancel-save{cursor:pointer}.major-publishing-actions{clear:both;padding:3px 0 5px}.major-publishing-actions .publishing-action{text-align:right;float:right;line-height:23px;margin:5px 0 1px}.major-publishing-actions .delete-action{vertical-align:middle;text-align:left;float:left;padding-right:15px;margin-top:5px}.menu-name-label span,.auto-add-pages label{font-size:12px;font-style:normal}.menu-name-label{margin-right:15px}.auto-add-pages input{margin-top:0}.auto-add-pages{margin-top:4px;float:left}.submitbox .submitcancel{border-bottom:1px solid;padding:1px 2px;text-decoration:none}.major-publishing-actions .form-invalid{padding-left:4px;margin-left:-4px;border-radius:3px;-webkit-border-radius:3px;-moz-border-radius:3px;-khtml-border-radius:3px}#menu-item-name-wrap:after,#menu-item-url-wrap:after,#menu-name-label:after,#menu-settings-column .inside:after,#nav-menus-frame:after,#post-body-content:after,.button-controls:after,.major-publishing-actions:after,.menu-item-settings:after{clear:both;content:".";display:block;height:0;visibility:hidden}#nav-menus-frame,.button-controls,#menu-item-url-wrap,#menu-item-name-wrap{display:block}.option .widefat{width:345px;margin:0 6px 7px 0}.addOption,.deleteOption,.addEmail,.deleteEmail{background:url('sprite.png') -12px -650px no-repeat transparent;text-indent:-9999px;width:16px;height:16px;display:inline-block}.deleteOption,.deleteEmail{background-position:-12px -677px}.addEmail,.deleteEmail{margin-top:5px}.ui-state-disabled .menu-item-handle{cursor:default}.ui-state-disabled .menu-item-handle{background-image:-moz-linear-gradient(top,#fff 0,#bbb 100%);background-image:-o-linear-gradient(top,#fff 0,#bbb 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(1,#bbb));background-image:linear-gradient(top,#fff 0,#bbb 100%)}
|
css/visual-form-builder-admin.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
label.error{color:red;display:block}#visual-form-builder-update input.error,#visual-form-builder-update textarea.error,#visual-form-builder-update select.error{border:1px solid red}.menu-item-handle.fieldset,#form-element-fieldset{background-image:-moz-linear-gradient(top,#e3e3e3 0,#ccc 100%);background-image:-o-linear-gradient(top,#e3e3e3 0,#ccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#e3e3e3),color-stop(1,#ccc));background-image:linear-gradient(top,#e3e3e3 0,#ccc 100%);box-shadow:0 1px 0 #e3e3e3 inset}.sender-labels{width:80px}.is-field-required{color:#bc1212;vertical-align:middle}.visual-form-builder-inline-edit{width:100%}.visual-form-builder-inline-edit-col{padding:0 .5em}.visual-form-builder-inline-edit label{display:block;margin:.2em 0}.visual-form-builder-inline-edit .title{display:block;float:left;width:5em;font-style:italic}.visual-form-builder-inline-edit .input-text-wrap{display:block;margin-left:5em}.visual-form-builder-inline-edit .input-text-wrap input[type="text"]{width:100%;border:#DDD solid 1px;border-radius:3px}.subsubsub{float:none}.nav-tabs-arrow-left{display:none}#form-items input{width:104px;float:left;margin:0 5px 10px 0}#form-element-text{background:url(sprite.png) 0 -89px no-repeat transparent}#form-element-textarea{background:url(sprite.png) 0 -173px no-repeat transparent}#form-element-checkbox{background:url(sprite.png) 0 -259px no-repeat transparent}#form-element-radio{background:url(sprite.png) 0 -51px no-repeat transparent}#form-element-select{background:url(sprite.png) 0 -7px no-repeat transparent}#form-element-address{background:url(sprite.png) 0 -129px no-repeat transparent}#form-element-datepicker{background:url(sprite.png) 0 -215px no-repeat transparent}#form-element-email{background:url(sprite.png) 0 -304px no-repeat transparent}#form-element-url{background:url(sprite.png) 0 -356px no-repeat transparent}#form-element-currency{background:url(sprite.png) 0 -405px no-repeat transparent}#form-element-digits{background:url(sprite.png) 0 -452px no-repeat transparent}#form-element-time{background:url(sprite.png) 0 -489px no-repeat transparent}#form-element-phone{background:url(sprite.png) 0 -529px no-repeat transparent}#form-element-html{background:url(sprite.png) 0 -559px no-repeat transparent}#form-element-file{background:url(sprite.png) 0 -587px no-repeat transparent}#form-element-instructions{background:url(sprite.png) 0 -621px no-repeat transparent}#form-element-section{background:url(sprite.png) 0 -809px no-repeat transparent}#form-details-nav{font-size:1.0em;font-weight:bold;padding-top:10px}#form-details-nav a{padding:5px 10px;text-decoration:none}#form-details-nav a.current{background-color:#777;background-image:-ms-linear-gradient(bottom,#6d6d6d,#808080);background-image:-moz-linear-gradient(bottom,#6d6d6d,#808080);background-image:-o-linear-gradient(bottom,#6d6d6d,#808080);background-image:-webkit-gradient(linear,left bottom,left top,from(#6d6d6d),to(#808080));background-image:-webkit-linear-gradient(bottom,#6d6d6d,#808080);background-image:linear-gradient(bottom,#6d6d6d,#808080);color:white;border-radius:5px;height:40px;text-shadow:0 -1px 0 #333;border-color:#dfdfdf}.form-details,#form-success-message-text,#form-success-message-page,#form-success-message-redirect{display:none}.form-details-current,.active{display:block}#confirmation-message textarea,#notification textarea{font-family:Consolas,Monaco,monospace;width:75%;height:10em;margin-top:10px}#form-success-message-page,#form-success-message-redirect{margin-top:10px}.post-body-plain ol li{list-style:decimal}#promote-vfb li{padding-left:20px}#promote-vfb #twitter{background:url(sprite.png) -10px -746px no-repeat transparent}#promote-vfb #star{background:url(sprite.png) -10px -710px no-repeat transparent}#promote-vfb #paypal{background:url(sprite.png) -10px -777px no-repeat transparent}.menu .ui-nestedSortable-error{background-color:#fbe3e4;border-color:red;color:#8a1f11}ul#menu-to-edit ul{margin:0 0 0 25px;padding:0;list-style-type:none;width:98%}.vfb-details{padding:0 10px;border:1px solid #ccc;margin-bottom:10px;border-radius:3px;width:95%}.vfb-details.section{background-color:#efefef;width:97.55%}.vfb-details .postbox{min-height:60px}#poststuff .vfb-details h2{margin-top:0}#poststuff h3.section-heading{padding-left:0}.vfb-pro-call-to-action a{text-decoration:none}.vfb-pro-call-to-action:hover{border-color:#dbf1ff}.vfb-pro-call-to-action{background-color:#3d93cd;border:5px solid #b0d2e8;border-radius:7px;box-shadow:inset 1px 1px 5px #398cc3,inset -1px -25px 5px #398cc3,0px 0 0 #fff;height:37px;margin:0 auto;padding:5px 30px 10px 30px;text-shadow:0 1px #2b658c;width:115px;line-height:22px}.vfb-pro-call-to-action .cta-sign-up{color:#fff;display:block;font-size:24px;font-weight:bold;text-align:center;text-decoration:none;text-shadow:1px 1px 1px #2b658c;width:100%;line-height:22px}.vfb-pro-call-to-action .cta-price{color:#ace7ff;display:block;font-size:12px;font-weight:normal;line-height:20px;text-align:center;text-decoration:none;width:100%;line-height:20px}.vfb-pro-upgrade{width:350px;float:left;padding:10px;background-color:#d3e7ee;border:1px solid #21759b;border-radius:5px}.vfb-pro-upgrade ul{list-style:outside;margin-left:10px
|
1 |
+
label.error{color:red;display:block}#visual-form-builder-update input.error,#visual-form-builder-update textarea.error,#visual-form-builder-update select.error{border:1px solid red}.menu-item-handle.fieldset,#form-element-fieldset{background-image:-moz-linear-gradient(top,#e3e3e3 0,#ccc 100%);background-image:-o-linear-gradient(top,#e3e3e3 0,#ccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#e3e3e3),color-stop(1,#ccc));background-image:linear-gradient(top,#e3e3e3 0,#ccc 100%);box-shadow:0 1px 0 #e3e3e3 inset}.sender-labels{width:80px}.is-field-required{color:#bc1212;vertical-align:middle}.visual-form-builder-inline-edit{width:100%}.visual-form-builder-inline-edit-col{padding:0 .5em}.visual-form-builder-inline-edit label{display:block;margin:.2em 0}.visual-form-builder-inline-edit .title{display:block;float:left;width:5em;font-style:italic}.visual-form-builder-inline-edit .input-text-wrap{display:block;margin-left:5em}.visual-form-builder-inline-edit .input-text-wrap input[type="text"]{width:100%;border:#DDD solid 1px;border-radius:3px}.subsubsub{float:none}.nav-tabs-arrow-left{display:none}#form-items input{width:104px;float:left;margin:0 5px 10px 0}#form-element-text{background:url(sprite.png) 0 -89px no-repeat transparent}#form-element-textarea{background:url(sprite.png) 0 -173px no-repeat transparent}#form-element-checkbox{background:url(sprite.png) 0 -259px no-repeat transparent}#form-element-radio{background:url(sprite.png) 0 -51px no-repeat transparent}#form-element-select{background:url(sprite.png) 0 -7px no-repeat transparent}#form-element-address{background:url(sprite.png) 0 -129px no-repeat transparent}#form-element-datepicker{background:url(sprite.png) 0 -215px no-repeat transparent}#form-element-email{background:url(sprite.png) 0 -304px no-repeat transparent}#form-element-url{background:url(sprite.png) 0 -356px no-repeat transparent}#form-element-currency{background:url(sprite.png) 0 -405px no-repeat transparent}#form-element-digits{background:url(sprite.png) 0 -452px no-repeat transparent}#form-element-time{background:url(sprite.png) 0 -489px no-repeat transparent}#form-element-phone{background:url(sprite.png) 0 -529px no-repeat transparent}#form-element-html{background:url(sprite.png) 0 -559px no-repeat transparent}#form-element-file{background:url(sprite.png) 0 -587px no-repeat transparent}#form-element-instructions{background:url(sprite.png) 0 -621px no-repeat transparent}#form-element-section{background:url(sprite.png) 0 -809px no-repeat transparent}#form-details-nav{font-size:1.0em;font-weight:bold;padding-top:10px}#form-details-nav a{padding:5px 10px;text-decoration:none}#form-details-nav a.current{background-color:#777;background-image:-ms-linear-gradient(bottom,#6d6d6d,#808080);background-image:-moz-linear-gradient(bottom,#6d6d6d,#808080);background-image:-o-linear-gradient(bottom,#6d6d6d,#808080);background-image:-webkit-gradient(linear,left bottom,left top,from(#6d6d6d),to(#808080));background-image:-webkit-linear-gradient(bottom,#6d6d6d,#808080);background-image:linear-gradient(bottom,#6d6d6d,#808080);color:white;border-radius:5px;height:40px;text-shadow:0 -1px 0 #333;border-color:#dfdfdf}.form-details,#form-success-message-text,#form-success-message-page,#form-success-message-redirect{display:none}.form-details-current,.active{display:block}#confirmation-message textarea,#notification textarea{font-family:Consolas,Monaco,monospace;width:75%;height:10em;margin-top:10px}#form-success-message-page,#form-success-message-redirect{margin-top:10px}.post-body-plain ol li{list-style:decimal}#promote-vfb li{padding-left:20px}#promote-vfb #twitter{background:url(sprite.png) -10px -746px no-repeat transparent}#promote-vfb #star{background:url(sprite.png) -10px -710px no-repeat transparent}#promote-vfb #paypal{background:url(sprite.png) -10px -777px no-repeat transparent}.menu .ui-nestedSortable-error{background-color:#fbe3e4;border-color:red;color:#8a1f11}ul#menu-to-edit ul{margin:0 0 0 25px;padding:0;list-style-type:none;width:98%}.vfb-details{padding:0 10px;border:1px solid #ccc;margin-bottom:10px;border-radius:3px;width:95%}.vfb-details.section{background-color:#efefef;width:97.55%}.vfb-details .postbox{min-height:60px}#poststuff .vfb-details h2{margin-top:0}#poststuff h3.section-heading{padding-left:0}.vfb-pro-call-to-action a{text-decoration:none}.vfb-pro-call-to-action:hover{border-color:#dbf1ff}.vfb-pro-call-to-action{background-color:#3d93cd;border:5px solid #b0d2e8;border-radius:7px;box-shadow:inset 1px 1px 5px #398cc3,inset -1px -25px 5px #398cc3,0px 0 0 #fff;height:37px;margin:0 auto;padding:5px 30px 10px 30px;text-shadow:0 1px #2b658c;width:115px;line-height:22px}.vfb-pro-call-to-action .cta-sign-up{color:#fff;display:block;font-size:24px;font-weight:bold;text-align:center;text-decoration:none;text-shadow:1px 1px 1px #2b658c;width:100%;line-height:22px}.vfb-pro-call-to-action .cta-price{color:#ace7ff;display:block;font-size:12px;font-weight:normal;line-height:20px;text-align:center;text-decoration:none;width:100%;line-height:20px}.vfb-pro-upgrade{width:350px;float:left;padding:10px;background-color:#d3e7ee;border:1px solid #21759b;border-radius:5px}.vfb-pro-upgrade ul{list-style:outside;margin-left:10px}.post-body-plain{width:430px;float:left}#menu-instructions.post-body-plain{width:auto;float:none}
|
css/visual-form-builder.css
CHANGED
@@ -10,6 +10,7 @@ form.visual-form-builder li{width:auto !important;}
|
|
10 |
font-size:12px;
|
11 |
}
|
12 |
.visual-form-builder li{
|
|
|
13 |
clear:both;
|
14 |
margin:0;
|
15 |
padding:6px 1% 9px;
|
@@ -52,6 +53,16 @@ form.visual-form-builder li{width:auto !important;}
|
|
52 |
padding-bottom:3px;
|
53 |
color:#000;
|
54 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
label.desc{font-weight:bold;}
|
56 |
.visual-form-builder label.choice{
|
57 |
font-size:100%;
|
@@ -70,8 +81,10 @@ input.text, textarea.textarea, select.select{
|
|
70 |
margin:0;
|
71 |
padding:2px 0;
|
72 |
}
|
|
|
73 |
input.medium, select.medium{width:50%;}
|
74 |
input.large, select.large, textarea.textarea{width:100%;}
|
|
|
75 |
textarea.medium{height:10em;}
|
76 |
textarea.large{height:20em;}
|
77 |
.submit{font-size:1.1em;}
|
@@ -82,6 +95,28 @@ input.checkbox, input.radio{
|
|
82 |
width:13px;
|
83 |
margin:4px 0 0;
|
84 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
label.error{
|
86 |
color:red;
|
87 |
font-weight:bold;
|
@@ -92,7 +127,10 @@ p#form_success{
|
|
92 |
color:green;
|
93 |
font-weight:bold;
|
94 |
}
|
95 |
-
#ui-datepicker-div {
|
|
|
|
|
|
|
96 |
.ed_button{
|
97 |
font-family:Arial,"Bitstream Vera Sans",Helvetica,Verdana,sans-serif;
|
98 |
font-size:12px;
|
@@ -123,5 +161,15 @@ p#form_success{
|
|
123 |
border-radius:3px;
|
124 |
padding:10px;
|
125 |
margin:10px 0;
|
|
|
|
|
126 |
}
|
127 |
-
.section-div h4{font-size:16px;border-bottom:1px solid #BABABA;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
font-size:12px;
|
11 |
}
|
12 |
.visual-form-builder li{
|
13 |
+
list-style:none;
|
14 |
clear:both;
|
15 |
margin:0;
|
16 |
padding:6px 1% 9px;
|
53 |
padding-bottom:3px;
|
54 |
color:#000;
|
55 |
}
|
56 |
+
.visual-form-builder.left-label .desc, .visual-form-builder.right-label .desc{
|
57 |
+
float:left;
|
58 |
+
margin:0 15px 0 0;
|
59 |
+
/*width:31%;*/
|
60 |
+
width:20%;
|
61 |
+
}
|
62 |
+
.visual-form-builder.right-label .desc{
|
63 |
+
padding-top:2px;
|
64 |
+
text-align:right;
|
65 |
+
}
|
66 |
label.desc{font-weight:bold;}
|
67 |
.visual-form-builder label.choice{
|
68 |
font-size:100%;
|
81 |
margin:0;
|
82 |
padding:2px 0;
|
83 |
}
|
84 |
+
input.small, select.small{width:25%;}
|
85 |
input.medium, select.medium{width:50%;}
|
86 |
input.large, select.large, textarea.textarea{width:100%;}
|
87 |
+
textarea.medium{height:5.5em;}
|
88 |
textarea.medium{height:10em;}
|
89 |
textarea.large{height:20em;}
|
90 |
.submit{font-size:1.1em;}
|
95 |
width:13px;
|
96 |
margin:4px 0 0;
|
97 |
}
|
98 |
+
.visual-form-builder li.two-column div span, .visual-form-builder li.three-column div span, .visual-form-builder li.auto-column div span{
|
99 |
+
margin:0 5px 0 0;
|
100 |
+
width:48%;
|
101 |
+
}
|
102 |
+
.visual-form-builder li.three-column div span{width:30%;}
|
103 |
+
.visual-form-builder li.auto-column div span{width:auto;}
|
104 |
+
.visual-form-builder li.left-half, .visual-form-builder li.left-third, .visual-form-builder li.left-two-thirds{clear:left;float:left;}
|
105 |
+
.visual-form-builder li.right-half, .visual-form-builder li.right-third, .visual-form-builder li.right-two-thirds{clear:none;float:right;}
|
106 |
+
.visual-form-builder li.middle-third{clear:none;float:left;margin-left:2%;}
|
107 |
+
|
108 |
+
.visual-form-builder li.left-half, .visual-form-builder li.right-half{width:47% !important;}
|
109 |
+
.visual-form-builder li.left-third, .visual-form-builder li.middle-third, .visual-form-builder li.right-third{width:30% !important;}
|
110 |
+
.visual-form-builder li.left-two-thirds, .visual-form-builder li.right-two-thirds{width:64% !important;}
|
111 |
+
|
112 |
+
li.left-half .small, li.left-half .medium, li.left-half .large,
|
113 |
+
li.right-half .small, li.right-half .medium, li.right-half .large,
|
114 |
+
li.left-third .small, li.left-third .medium, li.left-third .large,
|
115 |
+
li.middle-third .small, li.middle-third .medium, li.middle-third .large,
|
116 |
+
li.right-third .small, li.right-third .medium, li.right-third .large,
|
117 |
+
.visual-form-builder li.left-two-thirds .small, .visual-form-builder li.left-two-thirds .medium, .visual-form-builder li.left-two-thirds .large,
|
118 |
+
.visual-form-builder li.right-two-thirds .small, .visual-form-builder li.right-two-thirds .medium, .visual-form-builder li.right-two-thirds .large{width:100%;}
|
119 |
+
|
120 |
label.error{
|
121 |
color:red;
|
122 |
font-weight:bold;
|
127 |
color:green;
|
128 |
font-weight:bold;
|
129 |
}
|
130 |
+
#ui-datepicker-div {
|
131 |
+
display: none;
|
132 |
+
font-size:12px;
|
133 |
+
}
|
134 |
.ed_button{
|
135 |
font-family:Arial,"Bitstream Vera Sans",Helvetica,Verdana,sans-serif;
|
136 |
font-size:12px;
|
161 |
border-radius:3px;
|
162 |
padding:10px;
|
163 |
margin:10px 0;
|
164 |
+
float:left;
|
165 |
+
width:97%;
|
166 |
}
|
167 |
+
.section-div h4{font-size:16px;border-bottom:1px solid #BABABA;}
|
168 |
+
.vfb-clear{
|
169 |
+
clear:both;
|
170 |
+
display:block;
|
171 |
+
height:0;
|
172 |
+
width:0;
|
173 |
+
overflow:hidden;
|
174 |
+
visibility:hidden;
|
175 |
+
}
|
js/jquery.metadata.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function($){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(type,name){this.defaults.type=type;this.defaults.name=name},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length){settings.single="metadata"}var data=$.data(elem,settings.single);if(data){return data}data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m){data=m[1]}}else{if(settings.type=="elem"){if(!elem.getElementsByTagName){return undefined}var e=elem.getElementsByTagName(settings.name);if(e.length){data=$.trim(e[0].innerHTML)}}else{if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr){data=attr}}}}if(data.indexOf("{")<0){data="{"+data+"}"}data=eval("("+data+")");$.data(elem,settings.single,data);return data}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts)}})(jQuery);
|
js/visual-form-builder.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(
|
1 |
+
jQuery(document).ready(function(f){f(document).on("click","a.addOption",function(v){v.preventDefault();var q=f(this).parent().parent().find(".clonedOption").length;var u=q+1;var w=f(this).closest("div").attr("id");var t=f(this).closest("div").children("label").attr("for");var p=t.replace(new RegExp(/(\d+)$/g),"");var s=w.replace(new RegExp(/(\d+)$/g),"");var r=f("#"+w).clone().attr("id",s+u);r.children("label").attr("for",p+u);r.find("input").attr("id",p+u);f("#"+s+q).after(r)});f(document).on("click","a.deleteOption",function(q){q.preventDefault();var p=f(this).parent().parent().find(".clonedOption").length;if(p-1==0){alert("You must have at least one option.")}else{f(this).closest("div").remove()}});f(document).on("click","a.addEmail",function(v){v.preventDefault();var q=f(this).parent().parent().find(".clonedOption").length;var u=q+1;var w=f(this).closest("div").attr("id");var t=f(this).closest("div").children("label").attr("for");var p=t.replace(new RegExp(/(\d+)$/g),"");var s=w.replace(new RegExp(/(\d+)$/g),"");var r=f("#"+w).clone().attr("id",s+u);r.children("label").attr("for",p+u);r.find("input").attr("id",p+u);f("#"+s+q).after(r)});f(document).on("click","a.deleteEmail",function(q){q.preventDefault();var p=f(this).parent().parent().find(".clonedOption").length;if(p-1==0){alert("You must have at least one option.")}else{f(this).closest("div").remove()}});f(".menu-delete, .entry-delete").click(function(q){q.preventDefault();var p=(f(this).hasClass("entry-delete"))?"entry":"form";var r=confirm("You are about to permanently delete this "+p+" and all of its data.\n'Cancel' to stop, 'OK' to delete.");if(r){return}});f(document).on("click","a.item-edit",function(p){p.preventDefault();f(p.target).closest("li").children(".menu-item-settings").slideToggle("fast");f(this).toggleClass("opened")});f("#form-copy-to-clipboard").focus(function(){this.select()});var e=f(".nav-tabs-wrapper"),i=e.children(".nav-tabs"),d=i.children(".nav-tab-active"),k=i.children(".nav-tab"),b=0,m,c,h={},j,a="margin-left",o="margin-right",l=2;k.each(function(){b+=f(this).outerWidth(true)});h.padding=0;h[o]=(-1*b)+"px";i.css(h);g();function g(){if(e.length){var r=e.width(),q=0,p={};c=e.offset().left;m=c+r;d.makeTabVisible(c,m,i,a,l);if(k.last().isTabVisible(c,m)){q=e.width()-b;q=q>0?0:q;p[a]=q+"px";i.animate(p,100,"linear")}if(r>b){f(".nav-tabs-arrow-right, .nav-tabs-arrow-left").hide()}else{f(".nav-tabs-arrow-right, .nav-tabs-arrow-left").show()}}}f(window).resize(function(){if(j){clearTimeout(j)}j=setTimeout(g,200)});f(".nav-tabs-arrow-right").mousedown(function(){var r=Math.abs(parseInt(i.css(a))),p=r,q={};p=Math.abs(b-e.width())-r;if(!p){return}q[a]="-="+p+"px";i.animate(q,p*l,"linear")}).mouseup(function(){i.stop(true)});f(".nav-tabs-arrow-left").mousedown(function(){var r=Math.abs(parseInt(i.css(a))),p=r,q={};if(!p){return}q[a]="+="+p+"px";i.animate(q,p*l,"linear")}).mouseup(function(){i.stop(true)});f("#menu-to-edit").nestedSortable({listType:"ul",maxLevels:3,handle:".menu-item-handle",placeholder:"sortable-placeholder",tolerance:"pointer",toleranceElement:"> dl",items:"li:not(.ui-state-disabled)",create:function(p,q){f(this).css("min-height",f(this).height())},start:function(p,q){q.placeholder.height(q.item.height())},stop:function(p,q){opts={url:ajaxurl,type:"POST",async:true,cache:false,dataType:"json",data:{action:"visual_form_builder_process_sort",order:f(this).nestedSortable("toArray")},success:function(r){f("#loading-animation").hide();return}};f.ajax(opts)}});f('#form-items input[type="submit"]').click(function(){f(this).closest("form").data("submit_value",f(this))});f(document).on("submit","#form-items",function(q){q.preventDefault();var r=f(this).serializeArray(),p=f(this).data("submit_value").attr("value");f("img.waiting").show();f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,dataType:"html",data:{action:"visual_form_builder_create_field",data:r,field_type:p,page:pagenow,nonce:f("#_wpnonce").val()},success:function(s){f("img.waiting").hide();f(s).hide().insertBefore("#menu-to-edit li.ui-state-disabled:first").fadeIn();return},error:function(t,u,s){alert(t+" "+u+" "+s);return}})});f(document).on("click","a.item-delete",function(w){w.preventDefault();var u=childs=new Array(),A=0,q=f(this).attr("href"),p=q.split("&");for(var v=0;v<p.length;v++){var y=p[v].indexOf("=");var x=p[v].substring(0,y);var z=p[v].substring(y+1);u[x]=z}var r=f(this).closest(".form-item").find("ul").children();var s=r.parent().html();r.each(function(t){childs[t]=f(this).attr("id").match(new RegExp(/(\d+)$/g))[0]});var B=f(this).closest("li.form-item").parents("li.form-item");if(B.length){A=B.attr("id").match(new RegExp(/(\d+)$/g))[0]}f.ajax({url:ajaxurl,type:"POST",async:true,cache:false,dataType:"html",data:{action:"visual_form_builder_delete_field",form:u.form,field:u.field,child_ids:childs,parent_id:A,page:pagenow,nonce:u._wpnonce},success:function(t){f("#form_item_"+u.field).addClass("deleting").animate({opacity:0,height:0},350,function(){f(this).before(s).remove()});return},error:function(C,D,t){alert("There was an error loading the content");return}})});var n=f(".form-success-type:checked").val();f("#form-success-message-"+n).show();f(".form-success-type").change(function(){var p=f(this).val();if("text"==p){f("#form-success-message-text").show();f("#form-success-message-page, #form-success-message-redirect").hide()}else{if("page"==p){f("#form-success-message-page").show();f("#form-success-message-text, #form-success-message-redirect").hide()}else{if("redirect"==p){f("#form-success-message-redirect").show();f("#form-success-message-text, #form-success-message-page").hide()}}}});f(".vfb-field-types").click(function(q){q.preventDefault();f("#vfb-field-tabs li").removeClass("tabs");f(this).parent().addClass("tabs");f(".tabs-panel-active").removeClass("tabs-panel-active").addClass("tabs-panel-inactive");var p=this.hash;f(p).removeClass("tabs-panel-inactive").addClass("tabs-panel-active")});f("#visual-form-builder-update").validate({rules:{"form_email_to[]":{email:true},form_email_from:{email:true},form_success_message_redirect:{url:true},form_notification_email_name:{required:function(p){return f("#form-notification-setting").is(":checked")}},form_notification_email_from:{required:function(p){return f("#form-notification-setting").is(":checked")},email:true},form_notification_email:{required:function(p){return f("#form-notification-setting").is(":checked")}}},errorPlacement:function(p,q){p.insertAfter(q.parent())}});f("#form_email_from_name_override").change(function(){if(f("#form_email_from_name_override").val()==""){f("#form-email-sender-name").attr("readonly",false)}else{f("#form-email-sender-name").attr("readonly","readonly")}});f("#form_email_from_override").change(function(){if(f("#form_email_from_override").val()==""){f("#form-email-sender").attr("readonly",false)}else{f("#form-email-sender").attr("readonly","readonly")}});if(f("#form-notification-setting").is(":checked")){f("#notification-email").show()}else{f("#notification-email").hide()}f("#form-notification-setting").change(function(){var p=f(this).is(":checked");if(p){f("#notification-email").show();f("#form-notification-email-name, #form-notification-email-from, #form-notification-email, #form-notification-subject, #form-notification-message, #form-notification-entry").attr("disabled",false)}else{f("#notification-email").hide();f("#form-notification-email-name, #form-notification-email-from, #form-notification-email, #form-notification-subject, #form-notification-message, #form-notification-entry").attr("disabled","disabled")}});f.validator.addMethod("multiemail",function(r,q){if(this.optional(q)){return true}var s=r.split(new RegExp("\\s*[,|;]\\s*","gi"));valid=true;for(var p in s){r=s[p];valid=valid&&jQuery.validator.methods.email.call(this,r,q)}return valid},"One or more email addresses are invalid")});jQuery.fn.extend({makeTabVisible:function(d,h,f,b,g){var j=this.eq(0),c,i,e={},a=0;if(!j.length){return this}c=j.offset().left;i=c+j.outerWidth();if(i>h){a=h-i}else{if(c<d){a=d-c}}if(!a){return this}e[b]="+="+1*a+"px";f.animate(e,Math.abs(a)*g,"linear");return this},isTabVisible:function(e,d){var b=this.eq(0),c=b.offset().left,a=c+b.outerWidth();return(a<=d&&c>=e)?true:false}});
|
languages/visual-form-builder-bg_BG.mo
ADDED
Binary file
|
languages/visual-form-builder-bg_BG.po
ADDED
@@ -0,0 +1,402 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Visual Form Builder bulgarian\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2011-10-06 13:57-0600\n"
|
6 |
+
"PO-Revision-Date: 2012-02-20 00:30+0200\n"
|
7 |
+
"Last-Translator: Димитър Дачкинов <da4kinov@abv.bg>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-Language: Bulgarian\n"
|
15 |
+
"X-Poedit-Country: BULGARIA\n"
|
16 |
+
"X-Poedit-SearchPath-0: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder\n"
|
17 |
+
|
18 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:40
|
19 |
+
msgid "Details"
|
20 |
+
msgstr "Детайли"
|
21 |
+
|
22 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:46
|
23 |
+
msgid "Form Title"
|
24 |
+
msgstr "Заглавие на формата"
|
25 |
+
|
26 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:49
|
27 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:98
|
28 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:222
|
29 |
+
msgid "Date Submitted"
|
30 |
+
msgstr "Дата на получаване"
|
31 |
+
|
32 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:52
|
33 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:97
|
34 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:226
|
35 |
+
msgid "IP Address"
|
36 |
+
msgstr "IP Адрес"
|
37 |
+
|
38 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:55
|
39 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:93
|
40 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:230
|
41 |
+
msgid "Email Subject"
|
42 |
+
msgstr "Тема"
|
43 |
+
|
44 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:58
|
45 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:94
|
46 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:234
|
47 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:817
|
48 |
+
msgid "Sender Name"
|
49 |
+
msgstr "Име на изпращача"
|
50 |
+
|
51 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:61
|
52 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:95
|
53 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:238
|
54 |
+
msgid "Sender Email"
|
55 |
+
msgstr "Email На изпращача"
|
56 |
+
|
57 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:64
|
58 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:96
|
59 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:242
|
60 |
+
msgid "Emailed To"
|
61 |
+
msgstr "Изпрати до"
|
62 |
+
|
63 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-detail.php:84
|
64 |
+
msgid "Entry"
|
65 |
+
msgstr "Запис"
|
66 |
+
|
67 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:67
|
68 |
+
msgid "Cancel"
|
69 |
+
msgstr "Откажи"
|
70 |
+
|
71 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:92
|
72 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:218
|
73 |
+
msgid "Form"
|
74 |
+
msgstr "Форма"
|
75 |
+
|
76 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:168
|
77 |
+
msgid "Delete"
|
78 |
+
msgstr "Изтрий"
|
79 |
+
|
80 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:169
|
81 |
+
msgid "Export All"
|
82 |
+
msgstr "Експортирай всички"
|
83 |
+
|
84 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:170
|
85 |
+
msgid "Export Selected"
|
86 |
+
msgstr "Експортирай избраните"
|
87 |
+
|
88 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:214
|
89 |
+
msgid "Entries ID"
|
90 |
+
msgstr "ID на записа"
|
91 |
+
|
92 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:369
|
93 |
+
msgid "View all forms"
|
94 |
+
msgstr "покажи всички форми"
|
95 |
+
|
96 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/class-entries-list.php:376
|
97 |
+
msgid "Filter"
|
98 |
+
msgstr "филтър"
|
99 |
+
|
100 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:340
|
101 |
+
msgid "Settings"
|
102 |
+
msgstr "Настройки"
|
103 |
+
|
104 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:353
|
105 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:643
|
106 |
+
msgid "Visual Form Builder"
|
107 |
+
msgstr "Програма за формуляри"
|
108 |
+
|
109 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:383
|
110 |
+
#, php-format
|
111 |
+
msgid "<div id=\"message\" class=\"updated\"><p>The <strong>%s</strong> form has been created.</p></div>"
|
112 |
+
msgstr "Фопмата беше създадена"
|
113 |
+
|
114 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:499
|
115 |
+
#, php-format
|
116 |
+
msgid "<div id=\"message\" class=\"updated\"><p>The <strong>%s</strong> form has been updated.</p></div>"
|
117 |
+
msgstr "формата беше обновена"
|
118 |
+
|
119 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:645
|
120 |
+
msgid "Forms"
|
121 |
+
msgstr "Форми"
|
122 |
+
|
123 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:646
|
124 |
+
msgid "Entries"
|
125 |
+
msgstr "Записи"
|
126 |
+
|
127 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:685
|
128 |
+
msgid "Form Items"
|
129 |
+
msgstr "Елементи на формата"
|
130 |
+
|
131 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:688
|
132 |
+
msgid "Click"
|
133 |
+
msgstr "Клик"
|
134 |
+
|
135 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:688
|
136 |
+
msgid "to Add a Field"
|
137 |
+
msgstr "за да добавите поле"
|
138 |
+
|
139 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:712
|
140 |
+
msgid "Form Output"
|
141 |
+
msgstr "изходен файл от форма"
|
142 |
+
|
143 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:715
|
144 |
+
msgid "Copy this shortcode and paste into any Post or Page."
|
145 |
+
msgstr "Копирайте кода и го сложете на някоя страница"
|
146 |
+
|
147 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:794
|
148 |
+
msgid "Form Name"
|
149 |
+
msgstr "Име на формата"
|
150 |
+
|
151 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:804
|
152 |
+
msgid "Customize Email Details"
|
153 |
+
msgstr "Настройте Email-а"
|
154 |
+
|
155 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:804
|
156 |
+
msgid "Email Details"
|
157 |
+
msgstr "Детайли за Email"
|
158 |
+
|
159 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:805
|
160 |
+
msgid "Customize Confirmation Message"
|
161 |
+
msgstr "Променете съобщението за потвърждение"
|
162 |
+
|
163 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:805
|
164 |
+
msgid "Confirmation"
|
165 |
+
msgstr "Потвърждение"
|
166 |
+
|
167 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:806
|
168 |
+
msgid "Customize Notification Email"
|
169 |
+
msgstr "Настойте Email за известяване"
|
170 |
+
|
171 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:806
|
172 |
+
msgid "Notification"
|
173 |
+
msgstr "Известяване"
|
174 |
+
|
175 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:810
|
176 |
+
msgid "The forms you build here will send information to one or more email addresses when submitted by a user on your site. Use the fields below to customize the details of that email."
|
177 |
+
msgstr "Формата ще изпрати 1 или повече Имейли, когато бъде потвърдена."
|
178 |
+
|
179 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:812
|
180 |
+
msgid "E-mail Subject"
|
181 |
+
msgstr "Тема на Имейла"
|
182 |
+
|
183 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:822
|
184 |
+
msgid "Select a required text field"
|
185 |
+
msgstr "Изберете задължително поле"
|
186 |
+
|
187 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:831
|
188 |
+
msgid "Sender E-mail"
|
189 |
+
msgstr "Имейл на изпращача"
|
190 |
+
|
191 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:834
|
192 |
+
msgid "OR"
|
193 |
+
msgstr "или"
|
194 |
+
|
195 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:836
|
196 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:899
|
197 |
+
msgid "Select a required text field with email validation"
|
198 |
+
msgstr "Избереге задължително поле при проверка на Имейл"
|
199 |
+
|
200 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:845
|
201 |
+
msgid "E-mail(s) To"
|
202 |
+
msgstr "Изпрати до"
|
203 |
+
|
204 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:848
|
205 |
+
msgid "(multiple emails separated by commas)"
|
206 |
+
msgstr "(допълнителните Имейли, раздели със запетаи)"
|
207 |
+
|
208 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:852
|
209 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:888
|
210 |
+
msgid "After someone submits a form, you can control what is displayed. By default, it's a message but you can send them to another WordPress Page or a custom URL."
|
211 |
+
msgstr "След като някой попълни формата, ти избираш какво да се паказва"
|
212 |
+
|
213 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:855
|
214 |
+
msgid "Text"
|
215 |
+
msgstr "текст"
|
216 |
+
|
217 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:859
|
218 |
+
msgid "Page"
|
219 |
+
msgstr "Страница"
|
220 |
+
|
221 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:863
|
222 |
+
msgid "Redirect"
|
223 |
+
msgstr "Препратка"
|
224 |
+
|
225 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:870
|
226 |
+
msgid "Your form was successfully submitted. Thank you for contacting us."
|
227 |
+
msgstr "Вашата форма беше приета успешно. Благодарим за вашето запитване."
|
228 |
+
|
229 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:879
|
230 |
+
msgid "Select a Page"
|
231 |
+
msgstr "Изберете страница"
|
232 |
+
|
233 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:891
|
234 |
+
msgid "Send Confirmation Email to User"
|
235 |
+
msgstr "Изпрати потвърдителен Имейл до потребителя"
|
236 |
+
|
237 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:896
|
238 |
+
msgid "Send To"
|
239 |
+
msgstr "Изпрати до"
|
240 |
+
|
241 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:908
|
242 |
+
msgid "Subject"
|
243 |
+
msgstr "Тема"
|
244 |
+
|
245 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:912
|
246 |
+
msgid "Message"
|
247 |
+
msgstr "Съобщение"
|
248 |
+
|
249 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:918
|
250 |
+
msgid "Include a Copy of the User's Entry"
|
251 |
+
msgstr "Изпращай копие на потребителя"
|
252 |
+
|
253 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:925
|
254 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1072
|
255 |
+
msgid "Create Form"
|
256 |
+
msgstr "Създай форма"
|
257 |
+
|
258 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:925
|
259 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1072
|
260 |
+
msgid "Save Form"
|
261 |
+
msgstr "Запази формата"
|
262 |
+
|
263 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:929
|
264 |
+
msgid "Delete Form"
|
265 |
+
msgstr "Изтрий формата"
|
266 |
+
|
267 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:939
|
268 |
+
msgid "To create a custom form, give it a name above and click Create Form. Then choose form elements from the left column to add to this form."
|
269 |
+
msgstr "За да създадете форма, дайте й име, и натиснете на Създай форма. След, което добавете елементи."
|
270 |
+
|
271 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:940
|
272 |
+
msgid "After you have added your items, drag and drop to put them in the order you want. You can also click each item to reveal additional configuration options."
|
273 |
+
msgstr "Чрез влачене може да ги пренареждате и да отворите допълнителните им настройки, като кликнете върху тях"
|
274 |
+
|
275 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:941
|
276 |
+
msgid "When you have finished building your custom form, make sure you click the Save Form button."
|
277 |
+
msgstr "Когато сте готови натиснете Запази"
|
278 |
+
|
279 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:942
|
280 |
+
msgid "For more help, click on the Help tab at the top of this page."
|
281 |
+
msgstr "За повече помощ отидете в болница (сори, така пише :D)"
|
282 |
+
|
283 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:948
|
284 |
+
msgid "Select form inputs from the box at left to begin building your custom form. An initial fieldset has been automatically added to get you started."
|
285 |
+
msgstr "Това няма да го превеждам, защото просто се вижда какво трябва да се направи."
|
286 |
+
|
287 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:964
|
288 |
+
msgid "Edit Field Item"
|
289 |
+
msgstr "Редактиране на полето"
|
290 |
+
|
291 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:979
|
292 |
+
msgid "Name"
|
293 |
+
msgstr "Име"
|
294 |
+
|
295 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:985
|
296 |
+
msgid "Description"
|
297 |
+
msgstr "Описание"
|
298 |
+
|
299 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1003
|
300 |
+
msgid "Options (separated by commas)"
|
301 |
+
msgstr "Опции, разделени със запетаи"
|
302 |
+
|
303 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1018
|
304 |
+
msgid "12 Hour Format"
|
305 |
+
msgstr "12 часов формат"
|
306 |
+
|
307 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1019
|
308 |
+
msgid "24 Hour Format"
|
309 |
+
msgstr "24 часов формат"
|
310 |
+
|
311 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1021
|
312 |
+
msgid "None"
|
313 |
+
msgstr "Нищо"
|
314 |
+
|
315 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1022
|
316 |
+
msgid "Email"
|
317 |
+
msgstr "Имейл"
|
318 |
+
|
319 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1023
|
320 |
+
msgid "URL"
|
321 |
+
msgstr "Адрес"
|
322 |
+
|
323 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1024
|
324 |
+
msgid "Date"
|
325 |
+
msgstr "Дата"
|
326 |
+
|
327 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1025
|
328 |
+
msgid "Number"
|
329 |
+
msgstr "Число"
|
330 |
+
|
331 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1026
|
332 |
+
msgid "Digits"
|
333 |
+
msgstr "Цифра"
|
334 |
+
|
335 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1027
|
336 |
+
msgid "Phone"
|
337 |
+
msgstr "Телефон"
|
338 |
+
|
339 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1034
|
340 |
+
msgid "Required"
|
341 |
+
msgstr "Задължително"
|
342 |
+
|
343 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1036
|
344 |
+
msgid "No"
|
345 |
+
msgstr "Не"
|
346 |
+
|
347 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1037
|
348 |
+
msgid "Yes"
|
349 |
+
msgstr "Да"
|
350 |
+
|
351 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1045
|
352 |
+
msgid "Size"
|
353 |
+
msgstr "Големина"
|
354 |
+
|
355 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1047
|
356 |
+
msgid "Medium"
|
357 |
+
msgstr "Средна"
|
358 |
+
|
359 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1048
|
360 |
+
msgid "Large"
|
361 |
+
msgstr "Голяма"
|
362 |
+
|
363 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1055
|
364 |
+
msgid "Remove"
|
365 |
+
msgstr "Премахни"
|
366 |
+
|
367 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1383
|
368 |
+
msgid "Verification"
|
369 |
+
msgstr "Потвърждение"
|
370 |
+
|
371 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1387
|
372 |
+
msgid "Please enter any two digits with"
|
373 |
+
msgstr "Моля въведете 2 произволни цифри"
|
374 |
+
|
375 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1387
|
376 |
+
msgid "no"
|
377 |
+
msgstr "не"
|
378 |
+
|
379 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1387
|
380 |
+
msgid "spaces (Example: 12)"
|
381 |
+
msgstr "(Пример 12)"
|
382 |
+
|
383 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1394
|
384 |
+
msgid "This box is for spam protection"
|
385 |
+
msgstr "Полето е за анти-спам"
|
386 |
+
|
387 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1394
|
388 |
+
msgid "please leave it blank"
|
389 |
+
msgstr "Моля, оставете това поле празно"
|
390 |
+
|
391 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1401
|
392 |
+
msgid "Submit"
|
393 |
+
msgstr "Потвърди"
|
394 |
+
|
395 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1427
|
396 |
+
msgid "Security check"
|
397 |
+
msgstr "Проверка"
|
398 |
+
|
399 |
+
#: /Applications/MAMP/htdocs/wp3/wp-content/plugins/visual-form-builder/visual-form-builder.php:1589
|
400 |
+
msgid "Ooops! Looks like you have failed the security validation for this form. Please go back and try again."
|
401 |
+
msgstr "Изглежда, че не сте се справили успешно, върнете се и опитайте отново"
|
402 |
+
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: mmuro
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=G87A9UN9CLPH4&lc=US&item_name=Visual%20Form%20Builder¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
|
4 |
Tags: form, forms, contact form, form to email, email form, email, input, validation, jquery, shortcode
|
5 |
-
Requires at least: 3.
|
6 |
Tested up to: 3.3.1
|
7 |
-
Stable tag: 2.
|
8 |
|
9 |
Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
|
10 |
|
@@ -31,6 +31,7 @@ Dynamically build forms using a simple interface. Forms include jQuery validatio
|
|
31 |
* Embed Multiple Forms on a Post/Page
|
32 |
* One-click form duplication. Copy a form you've already built to save time
|
33 |
* Use your own CSS (if you want)
|
|
|
34 |
|
35 |
= Field Types =
|
36 |
|
@@ -131,14 +132,7 @@ If you want to customize the jQuery date picker CSS, follow these steps:
|
|
131 |
|
132 |
The jQuery UI Date Picker is a complex and highly configurable plugin. By default, Visual Form Builder's date field will use the default options and configuration.
|
133 |
|
134 |
-
To use the more complex features of the Date Picker plugin,
|
135 |
-
|
136 |
-
1. Add a text field using Visual Form Builder
|
137 |
-
1. Save the form and use the shortcode to add it to a page
|
138 |
-
1. Use your browser to view the HTML source code
|
139 |
-
1. Find the text field you want to use and copy the ID (ex: start-date)
|
140 |
-
1. Using the above example ID, paste the following into your javascript file: `$( '#start-date' ).datepicker();`
|
141 |
-
1. Add and customize the [jQuery UI Date Picker configuration options](http://jqueryui.com/demos/datepicker)
|
142 |
|
143 |
= How do I translate the field validation text to my language? =
|
144 |
|
@@ -173,6 +167,17 @@ To Export Selected:
|
|
173 |
|
174 |
== Changelog ==
|
175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
**Version 2.0**
|
177 |
|
178 |
* Fix bug for misspelled languages folder
|
@@ -278,6 +283,9 @@ To Export Selected:
|
|
278 |
|
279 |
== Upgrade Notice ==
|
280 |
|
|
|
|
|
|
|
281 |
= 2.0 =
|
282 |
Bug fix misaligned rows in CSV export, misspelled languages folder, and slashes appearing in emails and admin. Other minor improvements.
|
283 |
|
2 |
Contributors: mmuro
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=G87A9UN9CLPH4&lc=US&item_name=Visual%20Form%20Builder¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
|
4 |
Tags: form, forms, contact form, form to email, email form, email, input, validation, jquery, shortcode
|
5 |
+
Requires at least: 3.3
|
6 |
Tested up to: 3.3.1
|
7 |
+
Stable tag: 2.1
|
8 |
|
9 |
Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
|
10 |
|
31 |
* Embed Multiple Forms on a Post/Page
|
32 |
* One-click form duplication. Copy a form you've already built to save time
|
33 |
* Use your own CSS (if you want)
|
34 |
+
* Multiple field layout options. Arrange your fields in two, three, or a mixture of columns.
|
35 |
|
36 |
= Field Types =
|
37 |
|
132 |
|
133 |
The jQuery UI Date Picker is a complex and highly configurable plugin. By default, Visual Form Builder's date field will use the default options and configuration.
|
134 |
|
135 |
+
To use the more complex features of the Date Picker plugin, [follow this tutorial](http://matthewmuro.com/2012/02/23/how-to-customize-the-date-picker/).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
= How do I translate the field validation text to my language? =
|
138 |
|
167 |
|
168 |
== Changelog ==
|
169 |
|
170 |
+
**Version 2.1**
|
171 |
+
|
172 |
+
* Add Accepts option to File Upload field
|
173 |
+
* Add Small size to field options
|
174 |
+
* Add Options Layout to Radio and Checkbox fields
|
175 |
+
* Add Field Layout to field options
|
176 |
+
* Add Bulgarian translation
|
177 |
+
* Update jQuery in admin
|
178 |
+
* Verification fields now customizable
|
179 |
+
* Verification field now can be set to not required
|
180 |
+
|
181 |
**Version 2.0**
|
182 |
|
183 |
* Fix bug for misspelled languages folder
|
283 |
|
284 |
== Upgrade Notice ==
|
285 |
|
286 |
+
= 2.1 =
|
287 |
+
Please note this version requires WordPress 3.3. Please update your WordPress install before upgrading to Visual Form Builder 2.1.
|
288 |
+
|
289 |
= 2.0 =
|
290 |
Bug fix misaligned rows in CSV export, misspelled languages folder, and slashes appearing in emails and admin. Other minor improvements.
|
291 |
|
visual-form-builder.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Visual Form Builder
|
|
4 |
Description: Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
|
5 |
Author: Matthew Muro
|
6 |
Author URI: http://matthewmuro.com
|
7 |
-
Version: 2.
|
8 |
*/
|
9 |
|
10 |
/*
|
@@ -28,7 +28,7 @@ $visual_form_builder = new Visual_Form_Builder();
|
|
28 |
/* Restrict Categories class */
|
29 |
class Visual_Form_Builder{
|
30 |
|
31 |
-
protected $vfb_db_version = '2.
|
32 |
|
33 |
public function __construct(){
|
34 |
global $wpdb;
|
@@ -48,7 +48,7 @@ class Visual_Form_Builder{
|
|
48 |
add_action( 'wp_ajax_visual_form_builder_create_field', array( &$this, 'create_field_callback' ) );
|
49 |
add_action( 'wp_ajax_visual_form_builder_delete_field', array( &$this, 'delete_field_callback' ) );
|
50 |
|
51 |
-
add_action( '
|
52 |
add_action( 'admin_init', array( &$this, 'export_entries' ) );
|
53 |
|
54 |
/* Load i18n */
|
@@ -136,17 +136,25 @@ class Visual_Form_Builder{
|
|
136 |
*
|
137 |
* @since 1.0
|
138 |
*/
|
139 |
-
public function
|
140 |
-
$
|
141 |
-
|
|
|
|
|
|
|
|
|
142 |
<li>Click on the + tab, give your form a name and click Create Form.</li>
|
143 |
<li>Select form fields from the box on the left and click a field to add it to your form.</li>
|
144 |
<li>Edit the information for each form field by clicking on the down arrow.</li>
|
145 |
<li>Drag and drop the elements to put them in order.</li>
|
146 |
<li>Click Save Form to save your changes.</li>
|
147 |
-
</ul>
|
148 |
-
|
149 |
-
|
|
|
|
|
|
|
|
|
150 |
<li><em>Name</em> will change the display name of your form input.</li>
|
151 |
<li><em>Description</em> will be displayed below the associated input.</li>
|
152 |
<li><em>Validation</em> allows you to select from several of jQuery's Form Validation methods for text inputs. For more about the types of validation, read the <em>Validation</em> section below.</li>
|
@@ -154,10 +162,15 @@ class Visual_Form_Builder{
|
|
154 |
<li><em>Options</em> will only be active for Radio and Checkboxes. This field contols how many options are available for the associated input.</li>
|
155 |
<li><em>Size</em> controls the width of Text, Textarea, Select, and Date Picker input fields. The default is set to Medium but if you need a longer text input, select Large.</li>
|
156 |
<li><em>CSS Classes</em> allow you to add custom CSS to a field. This option allows you to fine tune the look of the form.</li>
|
157 |
-
</ul>
|
158 |
-
|
|
|
|
|
|
|
|
|
|
|
159 |
<ul>
|
160 |
-
|
161 |
<li><em>Email</em>: makes the element require a valid email.</li>
|
162 |
<li><em>URL</em>: makes the element require a valid url.</li>
|
163 |
<li><em>Date</em>: makes the element require a date. <a href='http://docs.jquery.com/Plugins/Validation/Methods/date'>Refer to documentation for various accepted formats</a>.
|
@@ -165,33 +178,44 @@ class Visual_Form_Builder{
|
|
165 |
<li><em>Digits</em>: makes the element require digits only.</li>
|
166 |
<li><em>Phone</em>: makes the element require a US or International phone number. Most formats are accepted.</li>
|
167 |
<li><em>Time</em>: choose either 12- or 24-hour time format (NOTE: only available with the Time field).</li>
|
168 |
-
</ul>
|
169 |
-
|
|
|
|
|
|
|
|
|
|
|
170 |
<ul>
|
171 |
-
<li>Each form allows you to customize the confirmation by selecing either a Text Message, a WordPress Page, or to Redirect to a URL.</li>
|
172 |
<li><em>Text</em> allows you to enter a custom formatted message that will be displayed on the page after your form is submitted. HTML is allowed here.</li>
|
173 |
<li><em>Page</em> displays a dropdown of all WordPress Pages you have created. Select one to redirect the user to that page after your form is submitted.</li>
|
174 |
<li><em>Redirect</em> will only accept URLs and can be used to send the user to a different site completely, if you choose.</li>
|
175 |
-
</ul>
|
176 |
-
|
|
|
|
|
|
|
|
|
|
|
177 |
<ul>
|
178 |
-
<li>Send a customized notification email to the user when the form has been successfully submitted.</li>
|
179 |
<li><em>Sender Name</em>: the name that will be displayed on the email.</li>
|
180 |
<li><em>Sender Email</em>: the email that will be used as the Reply To email.</li>
|
181 |
<li><em>Send To</em>: the email where the notification will be sent. This must be a required text field with email validation.</li>
|
182 |
<li><em>Subject</em>: the subject of the email.</li>
|
183 |
<li><em>Message</em>: additional text that can be displayed in the body of the email. HTML tags are allowed.</li>
|
184 |
<li><em>Include a Copy of the User's Entry</em>: appends a copy of the user's submitted entry to the notification email.</li>
|
185 |
-
</ul>
|
186 |
-
|
187 |
-
|
|
|
|
|
|
|
|
|
188 |
<li>Fieldsets, a way to group form fields, are an essential piece of this plugin's HTML. As such, at least one fieldset is required and must be first in the order. Subsequent fieldsets may be placed wherever you would like to start your next grouping of fields.</li>
|
189 |
<li>Security verification is automatically included on very form. It's a simple logic question and should keep out most, if not all, spam bots.</li>
|
190 |
<li>There is a hidden spam field, known as a honey pot, that should also help deter potential abusers of your form.</li>
|
191 |
<li>Nesting is allowed underneath fieldsets and sections. Sections can be nested underneath fieldsets. Nesting is not required, however, it does make reorganizing easier.</li>
|
192 |
-
</ul>"
|
193 |
-
|
194 |
-
add_contextual_help( 'settings_page_visual-form-builder', $text );
|
195 |
}
|
196 |
|
197 |
/**
|
@@ -284,13 +308,14 @@ class Visual_Form_Builder{
|
|
284 |
field_type VARCHAR(25) NOT NULL,
|
285 |
field_options TEXT,
|
286 |
field_description TEXT,
|
287 |
-
field_name
|
288 |
field_sequence BIGINT(20) DEFAULT '0',
|
289 |
field_parent BIGINT(20) DEFAULT '0',
|
290 |
field_validation VARCHAR(25),
|
291 |
field_required VARCHAR(25),
|
292 |
field_size VARCHAR(25) DEFAULT 'medium',
|
293 |
field_css VARCHAR(255),
|
|
|
294 |
UNIQUE KEY (field_id)
|
295 |
) DEFAULT CHARACTER SET $charset COLLATE $collate;";
|
296 |
|
@@ -299,7 +324,7 @@ class Visual_Form_Builder{
|
|
299 |
form_key TINYTEXT NOT NULL,
|
300 |
form_title TEXT NOT NULL,
|
301 |
form_email_subject TEXT,
|
302 |
-
form_email_to
|
303 |
form_email_from VARCHAR(255),
|
304 |
form_email_from_name VARCHAR(255),
|
305 |
form_email_from_override VARCHAR(255),
|
@@ -323,7 +348,7 @@ class Visual_Form_Builder{
|
|
323 |
subject TEXT,
|
324 |
sender_name VARCHAR(255),
|
325 |
sender_email VARCHAR(25),
|
326 |
-
emails_to
|
327 |
date_submitted DATETIME,
|
328 |
ip_address VARCHAR(25),
|
329 |
UNIQUE KEY (entries_id)
|
@@ -332,7 +357,7 @@ class Visual_Form_Builder{
|
|
332 |
/* Create or Update database tables */
|
333 |
dbDelta( $field_sql );
|
334 |
dbDelta( $form_sql );
|
335 |
-
dbDelta( $entries_sql );
|
336 |
}
|
337 |
|
338 |
/**
|
@@ -367,6 +392,7 @@ class Visual_Form_Builder{
|
|
367 |
wp_enqueue_script( 'jquery-ui-core ', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js', array( 'jquery' ), '', true );
|
368 |
wp_enqueue_script( 'visual-form-builder-validation', plugins_url( 'visual-form-builder' ) . '/js/visual-form-builder-validate.js' , array( 'jquery', 'jquery-form-validation' ), '', true );
|
369 |
wp_enqueue_script( 'visual-form-builder-quicktags', plugins_url( 'visual-form-builder' ) . '/js/js_quicktags.js' );
|
|
|
370 |
}
|
371 |
|
372 |
/**
|
@@ -450,13 +476,42 @@ class Visual_Form_Builder{
|
|
450 |
/* Add the first fieldset to get things started */
|
451 |
$wpdb->insert( $this->field_table_name, $initial_fieldset );
|
452 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
453 |
/* Make the submit last in the sequence */
|
454 |
$submit = array(
|
455 |
'form_id' => $new_form_selected,
|
456 |
'field_key' => 'submit',
|
457 |
'field_type' => 'submit',
|
458 |
'field_name' => 'Submit',
|
459 |
-
'
|
|
|
460 |
);
|
461 |
|
462 |
/* Insert the submit field */
|
@@ -537,13 +592,14 @@ class Visual_Form_Builder{
|
|
537 |
if ( !empty( $_REQUEST['field_id'] ) ) {
|
538 |
foreach ( $_REQUEST['field_id'] as $id ) {
|
539 |
$field_name = ( isset( $_REQUEST['field_name-' . $id] ) ) ? esc_html( $_REQUEST['field_name-' . $id] ) : '';
|
540 |
-
$field_key = sanitize_title( $field_name );
|
541 |
$field_desc = ( isset( $_REQUEST['field_description-' . $id] ) ) ? esc_html( $_REQUEST['field_description-' . $id] ) : '';
|
542 |
$field_options = ( isset( $_REQUEST['field_options-' . $id] ) ) ? serialize( array_map( 'esc_html', $_REQUEST['field_options-' . $id] ) ) : '';
|
543 |
$field_validation = ( isset( $_REQUEST['field_validation-' . $id] ) ) ? esc_html( $_REQUEST['field_validation-' . $id] ) : '';
|
544 |
$field_required = ( isset( $_REQUEST['field_required-' . $id] ) ) ? esc_html( $_REQUEST['field_required-' . $id] ) : '';
|
545 |
$field_size = ( isset( $_REQUEST['field_size-' . $id] ) ) ? esc_html( $_REQUEST['field_size-' . $id] ) : '';
|
546 |
$field_css = ( isset( $_REQUEST['field_css-' . $id] ) ) ? esc_html( $_REQUEST['field_css-' . $id] ) : '';
|
|
|
547 |
|
548 |
$field_data = array(
|
549 |
'field_key' => $field_key,
|
@@ -554,6 +610,7 @@ class Visual_Form_Builder{
|
|
554 |
'field_required' => $field_required,
|
555 |
'field_size' => $field_size,
|
556 |
'field_css' => $field_css,
|
|
|
557 |
'field_sequence' => $field_sequence
|
558 |
);
|
559 |
|
@@ -569,32 +626,73 @@ class Visual_Form_Builder{
|
|
569 |
}
|
570 |
|
571 |
/* Check if a submit field type exists for backwards compatibility upgrades */
|
572 |
-
$
|
|
|
|
|
573 |
|
574 |
-
/*
|
575 |
$field_sequence--;
|
576 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
577 |
/* If this form doesn't have a submit field, add one */
|
578 |
if ( $is_submit == NULL ) {
|
|
|
579 |
/* Make the submit last in the sequence */
|
580 |
$submit = array(
|
581 |
'form_id' => $form_id,
|
582 |
'field_key' => 'submit',
|
583 |
'field_type' => 'submit',
|
584 |
'field_name' => 'Submit',
|
585 |
-
'
|
|
|
586 |
);
|
587 |
|
588 |
/* Insert the submit field */
|
589 |
$wpdb->insert( $this->field_table_name, $submit );
|
590 |
}
|
591 |
else {
|
592 |
-
|
593 |
-
|
594 |
-
);
|
595 |
-
|
596 |
$where = array(
|
597 |
-
'form_id' => $
|
598 |
'field_id' => $is_submit
|
599 |
);
|
600 |
|
@@ -677,6 +775,7 @@ class Visual_Form_Builder{
|
|
677 |
'field_required' => $field->field_required,
|
678 |
'field_size' => $field->field_size,
|
679 |
'field_css' => $field->field_css,
|
|
|
680 |
'field_parent' => $field->field_parent
|
681 |
);
|
682 |
|
@@ -739,6 +838,7 @@ class Visual_Form_Builder{
|
|
739 |
global $wpdb;
|
740 |
|
741 |
$data = array();
|
|
|
742 |
|
743 |
foreach ( $_REQUEST['data'] as $k ) {
|
744 |
$data[ $k['name'] ] = $k['value'];
|
@@ -766,41 +866,46 @@ class Visual_Form_Builder{
|
|
766 |
case 'time' :
|
767 |
$field_validation = 'time-12';
|
768 |
break;
|
|
|
|
|
|
|
769 |
}
|
770 |
|
771 |
check_ajax_referer( 'create-field-' . $data['form_id'], 'nonce' );
|
772 |
|
773 |
-
/* Get the last row's sequence that isn't a
|
774 |
-
$sequence_last_row = $wpdb->get_row( "SELECT field_sequence FROM $this->field_table_name WHERE form_id = $form_id AND field_type
|
775 |
|
776 |
/* If it's not the first for this form, add 1 */
|
777 |
-
$field_sequence = ( !empty( $sequence_last_row ) ) ? $sequence_last_row->field_sequence
|
778 |
-
|
779 |
$newdata = array(
|
780 |
'form_id' => absint( $data['form_id'] ),
|
781 |
'field_key' => $field_key,
|
782 |
'field_name' => $field_name,
|
783 |
'field_type' => $field_type,
|
|
|
784 |
'field_sequence' => $field_sequence,
|
785 |
'field_validation' => $field_validation
|
786 |
);
|
787 |
|
788 |
/* Create the field */
|
789 |
$wpdb->insert( $this->field_table_name, $newdata );
|
|
|
|
|
790 |
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
|
|
|
|
|
|
|
|
|
|
795 |
|
796 |
-
$submit_where = array(
|
797 |
-
'form_id' => $newdata[ 'form_id' ],
|
798 |
-
'field_type' => 'submit'
|
799 |
-
);
|
800 |
-
|
801 |
-
$wpdb->update( $this->field_table_name, $submit_data, $submit_where );
|
802 |
|
803 |
-
echo $this->field_output( $data['form_id'], $
|
804 |
}
|
805 |
|
806 |
die(1);
|
@@ -886,7 +991,7 @@ class Visual_Form_Builder{
|
|
886 |
$last = $field->field_id;
|
887 |
$parent = $field->field_parent;
|
888 |
?>
|
889 |
-
<li id="form_item_<?php echo $field->field_id; ?>" class="form-item<?php echo ( $field->field_type
|
890 |
<dl class="menu-item-bar">
|
891 |
<dt class="menu-item-handle<?php echo ( $field->field_type == 'fieldset' ) ? ' fieldset' : ''; ?>">
|
892 |
<span class="item-title"><?php echo stripslashes( htmlspecialchars_decode( $field->field_name ) ); ?><?php echo ( $field->field_required == 'yes' ) ? ' <span class="is-field-required">*</span>' : ''; ?></span>
|
@@ -898,16 +1003,22 @@ class Visual_Form_Builder{
|
|
898 |
</dl>
|
899 |
|
900 |
<div id="form-item-settings-<?php echo $field->field_id; ?>" class="menu-item-settings field-type-<?php echo $field->field_type; ?>" style="display: none;">
|
901 |
-
<?php if ( $field->field_type
|
902 |
|
903 |
<p class="description description-wide">
|
904 |
-
<label for="edit-form-item-name-<?php echo $field->field_id; ?>"><?php echo ( $field->field_type
|
905 |
<input type="text" value="<?php echo stripslashes( $field->field_name ); ?>" name="field_name-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-name-<?php echo $field->field_id; ?>" />
|
906 |
</label>
|
907 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
908 |
|
909 |
<?php elseif( $field->field_type == 'instructions' ) : ?>
|
910 |
-
|
911 |
<p class="description description-wide">
|
912 |
<label for="edit-form-item-name-<?php echo $field->field_id; ?>">
|
913 |
<?php _e( 'Name' , 'visual-form-builder'); ?><br />
|
@@ -983,12 +1094,41 @@ class Visual_Form_Builder{
|
|
983 |
unset( $opts_vals );
|
984 |
endif;
|
985 |
?>
|
986 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
987 |
<!-- Validation -->
|
988 |
<p class="description description-thin">
|
989 |
<label for="edit-form-item-validation">
|
990 |
-
Validation
|
991 |
-
<select name="field_validation-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-validation-<?php echo $field->field_id; ?>"<?php echo ( in_array( $field->field_type, array( 'radio', 'select', 'checkbox', 'address', 'date', 'textarea', 'html', 'file-upload' ) ) ) ? ' disabled="disabled"' : ''; ?>>
|
992 |
<?php if ( $field->field_type == 'time' ) : ?>
|
993 |
<option value="time-12" <?php selected( $field->field_validation, 'time-12' ); ?>><?php _e( '12 Hour Format' , 'visual-form-builder'); ?></option>
|
994 |
<option value="time-24" <?php selected( $field->field_validation, 'time-24' ); ?>><?php _e( '24 Hour Format' , 'visual-form-builder'); ?></option>
|
@@ -1018,28 +1158,66 @@ class Visual_Form_Builder{
|
|
1018 |
|
1019 |
<?php if ( !in_array( $field->field_type, array( 'radio', 'checkbox', 'time' ) ) ) : ?>
|
1020 |
<!-- Size -->
|
1021 |
-
<p class="description description-
|
1022 |
<label for="edit-form-item-size">
|
1023 |
<?php _e( 'Size' , 'visual-form-builder'); ?><br />
|
1024 |
<select name="field_size-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-size-<?php echo $field->field_id; ?>">
|
|
|
1025 |
<option value="medium" <?php selected( $field->field_size, 'medium' ); ?>><?php _e( 'Medium' , 'visual-form-builder'); ?></option>
|
1026 |
<option value="large" <?php selected( $field->field_size, 'large' ); ?>><?php _e( 'Large' , 'visual-form-builder'); ?></option>
|
1027 |
</select>
|
1028 |
</label>
|
1029 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1030 |
<?php endif; ?>
|
1031 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1032 |
<p class="description description-wide">
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
</p>
|
1038 |
-
|
1039 |
<?php endif; ?>
|
1040 |
<?php endif; ?>
|
1041 |
|
1042 |
-
<?php if ( $field->field_type
|
1043 |
<div class="menu-item-actions description-wide submitbox">
|
1044 |
<a href="<?php echo esc_url( wp_nonce_url( admin_url('options-general.php?page=visual-form-builder&action=delete_field&form=' . $form_nav_selected_id . '&field=' . $field->field_id ), 'delete-field-' . $form_nav_selected_id ) ); ?>" class="item-delete submitdelete deletion"><?php _e( 'Remove' , 'visual-form-builder'); ?></a>
|
1045 |
</div>
|
@@ -1596,6 +1774,8 @@ class Visual_Form_Builder{
|
|
1596 |
|
1597 |
/* Setup count for fieldset and ul/section class names */
|
1598 |
$count = 1;
|
|
|
|
|
1599 |
|
1600 |
foreach ( $forms as $form ) :
|
1601 |
|
@@ -1604,12 +1784,18 @@ class Visual_Form_Builder{
|
|
1604 |
$output .= wp_nonce_field( 'visual-form-builder-nonce', '_wpnonce', false, false );
|
1605 |
|
1606 |
foreach ( $fields as $field ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
1607 |
|
1608 |
/* Close each section */
|
1609 |
if ( $open_section == true ) {
|
1610 |
/* If this field's parent does NOT equal our section ID */
|
1611 |
if ( $sec_id && $sec_id !== $field->field_parent ) {
|
1612 |
-
$output .= '</div>';
|
1613 |
$open_section = false;
|
1614 |
}
|
1615 |
}
|
@@ -1619,7 +1805,7 @@ class Visual_Form_Builder{
|
|
1619 |
if ( $open_fieldset == true )
|
1620 |
$output .= '</ul><br /></fieldset>';
|
1621 |
|
1622 |
-
$output .= '<fieldset class="fieldset ' . $field->field_key . '"><div class="legend"><h3>' . stripslashes( $field->field_name ) . '</h3></div><ul class="section section-' . $count . '">';
|
1623 |
$open_fieldset = true;
|
1624 |
$count++;
|
1625 |
}
|
@@ -1630,13 +1816,46 @@ class Visual_Form_Builder{
|
|
1630 |
$sec_id = $field->field_id;
|
1631 |
$open_section = true;
|
1632 |
}
|
1633 |
-
elseif ( $field->field_type
|
1634 |
-
|
1635 |
-
$
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1640 |
}
|
1641 |
|
1642 |
|
@@ -1665,7 +1884,7 @@ class Visual_Form_Builder{
|
|
1665 |
|
1666 |
break;
|
1667 |
|
1668 |
-
case 'select':
|
1669 |
if ( !empty( $field->field_description ) )
|
1670 |
$output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
1671 |
|
@@ -1675,14 +1894,14 @@ class Visual_Form_Builder{
|
|
1675 |
|
1676 |
/* Loop through each option and output */
|
1677 |
foreach ( $options as $option => $value ) {
|
1678 |
-
$output .= '<option value="' . $value . '">'. $value. '</option>';
|
1679 |
}
|
1680 |
|
1681 |
$output .= '</select>';
|
1682 |
|
1683 |
break;
|
1684 |
|
1685 |
-
case 'radio':
|
1686 |
|
1687 |
if ( !empty( $field->field_description ) )
|
1688 |
$output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
@@ -1694,8 +1913,8 @@ class Visual_Form_Builder{
|
|
1694 |
/* Loop through each option and output */
|
1695 |
foreach ( $options as $option => $value ) {
|
1696 |
$output .= '<span>
|
1697 |
-
<input type="radio" name="vfb-'. $field->field_key . '-' . $field->field_id . '" id="vfb-'. $field->field_key . '-' . $field->field_id . '-' . $option . '" value="'. stripslashes( $value ) . '" class="radio' . $required . $css . '" />'.
|
1698 |
-
' <label for="vfb-' . $field->field_key . '-' . $field->field_id . '-' . $option . '" class="choice">' . stripslashes( $value ) . '</label>' .
|
1699 |
'</span>';
|
1700 |
}
|
1701 |
|
@@ -1703,7 +1922,7 @@ class Visual_Form_Builder{
|
|
1703 |
|
1704 |
break;
|
1705 |
|
1706 |
-
case 'checkbox':
|
1707 |
|
1708 |
if ( !empty( $field->field_description ) )
|
1709 |
$output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
@@ -1723,7 +1942,7 @@ class Visual_Form_Builder{
|
|
1723 |
|
1724 |
break;
|
1725 |
|
1726 |
-
case 'address':
|
1727 |
|
1728 |
if ( !empty( $field->field_description ) )
|
1729 |
$output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
@@ -1768,7 +1987,7 @@ class Visual_Form_Builder{
|
|
1768 |
|
1769 |
break;
|
1770 |
|
1771 |
-
case 'date':
|
1772 |
|
1773 |
if ( !empty( $field->field_description ) )
|
1774 |
$output .= '<span><input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text vfb-date-picker ' . $field->field_size . $required . $css . '" /><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
@@ -1823,10 +2042,13 @@ class Visual_Form_Builder{
|
|
1823 |
|
1824 |
case 'file-upload' :
|
1825 |
|
|
|
|
|
|
|
1826 |
if ( !empty( $field->field_description ) )
|
1827 |
-
$output .= '<span><input type="file" size="35" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text ' . $field->field_size . $required . $validation . $css . '" /><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
1828 |
else
|
1829 |
-
$output .= '<input type="file" size="35" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text ' . $field->field_size . $required . $validation . $css . '" />';
|
1830 |
|
1831 |
|
1832 |
break;
|
@@ -1848,14 +2070,15 @@ class Visual_Form_Builder{
|
|
1848 |
}
|
1849 |
|
1850 |
/* Closing </li> */
|
1851 |
-
$output .= ( !in_array( $field->field_type , array( 'submit', 'fieldset', 'section' ) ) ) ? '</li>' : '';
|
1852 |
}
|
1853 |
|
1854 |
/* Close user-added fields */
|
1855 |
$output .= '</ul><br /></fieldset>';
|
1856 |
|
1857 |
-
/*
|
1858 |
-
$
|
|
|
1859 |
<div class="legend">
|
1860 |
<h3>' . __( 'Verification' , 'visual-form-builder') . '</h3>
|
1861 |
</div>
|
@@ -1865,22 +2088,23 @@ class Visual_Form_Builder{
|
|
1865 |
<div>
|
1866 |
<input type="text" name="vfb-secret" id="vfb-secret" class="text medium" />
|
1867 |
</div>
|
1868 |
-
</li>
|
1869 |
-
|
1870 |
-
|
|
|
|
|
1871 |
<label for="vfb-spam">' . __( 'This box is for spam protection' , 'visual-form-builder') . ' - <strong>' . __( 'please leave it blank' , 'visual-form-builder') . '</strong>:</label>
|
1872 |
<div>
|
1873 |
<input name="vfb-spam" id="vfb-spam" />
|
1874 |
</div>
|
1875 |
</li>
|
1876 |
-
|
1877 |
<li class="item item-submit">
|
1878 |
-
<input type="submit" name="visual-form-builder-submit" value="' . $submit . '" class="submit" id="sendmail" />
|
1879 |
</li>
|
1880 |
</ul>
|
1881 |
</fieldset></form>';
|
1882 |
-
|
1883 |
-
|
1884 |
endforeach;
|
1885 |
}
|
1886 |
|
@@ -1897,7 +2121,8 @@ class Visual_Form_Builder{
|
|
1897 |
global $wpdb, $post;
|
1898 |
|
1899 |
/* Security check before moving any further */
|
1900 |
-
if ( isset( $_REQUEST['visual-form-builder-submit'] ) && $_REQUEST['vfb-spam'] == '' && is_numeric( $_REQUEST['vfb-secret'] ) && strlen( $_REQUEST['vfb-secret'] ) == 2 ) :
|
|
|
1901 |
$nonce = $_REQUEST['_wpnonce'];
|
1902 |
|
1903 |
/* Security check to verify the nonce */
|
@@ -2066,7 +2291,8 @@ class Visual_Form_Builder{
|
|
2066 |
else
|
2067 |
$value = html_entity_decode( stripslashes( esc_html( $value ) ), ENT_QUOTES, 'UTF-8' );
|
2068 |
|
2069 |
-
if ( $field->field_type !== 'submit' ) {
|
|
|
2070 |
if ( $field->field_type == 'fieldset' )
|
2071 |
$message .= '<tr style="background-color:#393E40;color:white;font-size:14px;"><td colspan="2">' . stripslashes( $field->field_name ) . '</td></tr>';
|
2072 |
elseif ( $field->field_type == 'section' )
|
@@ -2103,7 +2329,7 @@ class Visual_Form_Builder{
|
|
2103 |
$wpdb->insert( $this->entries_table_name, $entry );
|
2104 |
|
2105 |
/* Close out the content */
|
2106 |
-
$message .= '</table></body></html>';
|
2107 |
|
2108 |
/* Initialize header filter vars */
|
2109 |
$this->header_from_name = stripslashes( $form_from_name );
|
4 |
Description: Dynamically build forms using a simple interface. Forms include jQuery validation, a basic logic-based verification system, and entry tracking.
|
5 |
Author: Matthew Muro
|
6 |
Author URI: http://matthewmuro.com
|
7 |
+
Version: 2.1
|
8 |
*/
|
9 |
|
10 |
/*
|
28 |
/* Restrict Categories class */
|
29 |
class Visual_Form_Builder{
|
30 |
|
31 |
+
protected $vfb_db_version = '2.1';
|
32 |
|
33 |
public function __construct(){
|
34 |
global $wpdb;
|
48 |
add_action( 'wp_ajax_visual_form_builder_create_field', array( &$this, 'create_field_callback' ) );
|
49 |
add_action( 'wp_ajax_visual_form_builder_delete_field', array( &$this, 'delete_field_callback' ) );
|
50 |
|
51 |
+
add_action( 'load-settings_page_visual-form-builder', array( &$this, 'add_contextual_help' ) );
|
52 |
add_action( 'admin_init', array( &$this, 'export_entries' ) );
|
53 |
|
54 |
/* Load i18n */
|
136 |
*
|
137 |
* @since 1.0
|
138 |
*/
|
139 |
+
public function add_contextual_help(){
|
140 |
+
$screen = get_current_screen();
|
141 |
+
|
142 |
+
$screen->add_help_tab( array(
|
143 |
+
'id' => 'vfb-help-tab-getting-started',
|
144 |
+
'title' => 'Getting Started',
|
145 |
+
'content' => '<ul>
|
146 |
<li>Click on the + tab, give your form a name and click Create Form.</li>
|
147 |
<li>Select form fields from the box on the left and click a field to add it to your form.</li>
|
148 |
<li>Edit the information for each form field by clicking on the down arrow.</li>
|
149 |
<li>Drag and drop the elements to put them in order.</li>
|
150 |
<li>Click Save Form to save your changes.</li>
|
151 |
+
</ul>'
|
152 |
+
) );
|
153 |
+
|
154 |
+
$screen->add_help_tab( array(
|
155 |
+
'id' => 'vfb-help-tab-item-config',
|
156 |
+
'title' => 'Form Item Configuration',
|
157 |
+
'content' => "<ul>
|
158 |
<li><em>Name</em> will change the display name of your form input.</li>
|
159 |
<li><em>Description</em> will be displayed below the associated input.</li>
|
160 |
<li><em>Validation</em> allows you to select from several of jQuery's Form Validation methods for text inputs. For more about the types of validation, read the <em>Validation</em> section below.</li>
|
162 |
<li><em>Options</em> will only be active for Radio and Checkboxes. This field contols how many options are available for the associated input.</li>
|
163 |
<li><em>Size</em> controls the width of Text, Textarea, Select, and Date Picker input fields. The default is set to Medium but if you need a longer text input, select Large.</li>
|
164 |
<li><em>CSS Classes</em> allow you to add custom CSS to a field. This option allows you to fine tune the look of the form.</li>
|
165 |
+
</ul>"
|
166 |
+
) );
|
167 |
+
|
168 |
+
$screen->add_help_tab( array(
|
169 |
+
'id' => 'vfb-help-tab-validation',
|
170 |
+
'title' => 'Validation',
|
171 |
+
'content' => "<p>Visual Form Builder uses the <a href='http://docs.jquery.com/Plugins/Validation/Validator'>jQuery Form Validation plugin</a> to perform clientside form validation.</p>
|
172 |
<ul>
|
173 |
+
|
174 |
<li><em>Email</em>: makes the element require a valid email.</li>
|
175 |
<li><em>URL</em>: makes the element require a valid url.</li>
|
176 |
<li><em>Date</em>: makes the element require a date. <a href='http://docs.jquery.com/Plugins/Validation/Methods/date'>Refer to documentation for various accepted formats</a>.
|
178 |
<li><em>Digits</em>: makes the element require digits only.</li>
|
179 |
<li><em>Phone</em>: makes the element require a US or International phone number. Most formats are accepted.</li>
|
180 |
<li><em>Time</em>: choose either 12- or 24-hour time format (NOTE: only available with the Time field).</li>
|
181 |
+
</ul>"
|
182 |
+
) );
|
183 |
+
|
184 |
+
$screen->add_help_tab( array(
|
185 |
+
'id' => 'vfb-help-tab-confirmation',
|
186 |
+
'title' => 'Confirmation',
|
187 |
+
'content' => "<p>Each form allows you to customize the confirmation by selecing either a Text Message, a WordPress Page, or to Redirect to a URL.</p>
|
188 |
<ul>
|
|
|
189 |
<li><em>Text</em> allows you to enter a custom formatted message that will be displayed on the page after your form is submitted. HTML is allowed here.</li>
|
190 |
<li><em>Page</em> displays a dropdown of all WordPress Pages you have created. Select one to redirect the user to that page after your form is submitted.</li>
|
191 |
<li><em>Redirect</em> will only accept URLs and can be used to send the user to a different site completely, if you choose.</li>
|
192 |
+
</ul>"
|
193 |
+
) );
|
194 |
+
|
195 |
+
$screen->add_help_tab( array(
|
196 |
+
'id' => 'vfb-help-tab-notification',
|
197 |
+
'title' => 'Notification',
|
198 |
+
'content' => "<p>Send a customized notification email to the user when the form has been successfully submitted.</p>
|
199 |
<ul>
|
|
|
200 |
<li><em>Sender Name</em>: the name that will be displayed on the email.</li>
|
201 |
<li><em>Sender Email</em>: the email that will be used as the Reply To email.</li>
|
202 |
<li><em>Send To</em>: the email where the notification will be sent. This must be a required text field with email validation.</li>
|
203 |
<li><em>Subject</em>: the subject of the email.</li>
|
204 |
<li><em>Message</em>: additional text that can be displayed in the body of the email. HTML tags are allowed.</li>
|
205 |
<li><em>Include a Copy of the User's Entry</em>: appends a copy of the user's submitted entry to the notification email.</li>
|
206 |
+
</ul>"
|
207 |
+
) );
|
208 |
+
|
209 |
+
$screen->add_help_tab( array(
|
210 |
+
'id' => 'vfb-help-tab-tips',
|
211 |
+
'title' => 'Tips',
|
212 |
+
'content' => "<ul>
|
213 |
<li>Fieldsets, a way to group form fields, are an essential piece of this plugin's HTML. As such, at least one fieldset is required and must be first in the order. Subsequent fieldsets may be placed wherever you would like to start your next grouping of fields.</li>
|
214 |
<li>Security verification is automatically included on very form. It's a simple logic question and should keep out most, if not all, spam bots.</li>
|
215 |
<li>There is a hidden spam field, known as a honey pot, that should also help deter potential abusers of your form.</li>
|
216 |
<li>Nesting is allowed underneath fieldsets and sections. Sections can be nested underneath fieldsets. Nesting is not required, however, it does make reorganizing easier.</li>
|
217 |
+
</ul>"
|
218 |
+
) );
|
|
|
219 |
}
|
220 |
|
221 |
/**
|
308 |
field_type VARCHAR(25) NOT NULL,
|
309 |
field_options TEXT,
|
310 |
field_description TEXT,
|
311 |
+
field_name TEXT NOT NULL,
|
312 |
field_sequence BIGINT(20) DEFAULT '0',
|
313 |
field_parent BIGINT(20) DEFAULT '0',
|
314 |
field_validation VARCHAR(25),
|
315 |
field_required VARCHAR(25),
|
316 |
field_size VARCHAR(25) DEFAULT 'medium',
|
317 |
field_css VARCHAR(255),
|
318 |
+
field_layout VARCHAR(255),
|
319 |
UNIQUE KEY (field_id)
|
320 |
) DEFAULT CHARACTER SET $charset COLLATE $collate;";
|
321 |
|
324 |
form_key TINYTEXT NOT NULL,
|
325 |
form_title TEXT NOT NULL,
|
326 |
form_email_subject TEXT,
|
327 |
+
form_email_to TEXT,
|
328 |
form_email_from VARCHAR(255),
|
329 |
form_email_from_name VARCHAR(255),
|
330 |
form_email_from_override VARCHAR(255),
|
348 |
subject TEXT,
|
349 |
sender_name VARCHAR(255),
|
350 |
sender_email VARCHAR(25),
|
351 |
+
emails_to TEXT,
|
352 |
date_submitted DATETIME,
|
353 |
ip_address VARCHAR(25),
|
354 |
UNIQUE KEY (entries_id)
|
357 |
/* Create or Update database tables */
|
358 |
dbDelta( $field_sql );
|
359 |
dbDelta( $form_sql );
|
360 |
+
dbDelta( $entries_sql );
|
361 |
}
|
362 |
|
363 |
/**
|
392 |
wp_enqueue_script( 'jquery-ui-core ', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js', array( 'jquery' ), '', true );
|
393 |
wp_enqueue_script( 'visual-form-builder-validation', plugins_url( 'visual-form-builder' ) . '/js/visual-form-builder-validate.js' , array( 'jquery', 'jquery-form-validation' ), '', true );
|
394 |
wp_enqueue_script( 'visual-form-builder-quicktags', plugins_url( 'visual-form-builder' ) . '/js/js_quicktags.js' );
|
395 |
+
wp_enqueue_script( 'visual-form-builder-metadata', plugins_url( 'visual-form-builder' ) . '/js/jquery.metadata.js' , array( 'jquery', 'jquery-form-validation' ), '', true );
|
396 |
}
|
397 |
|
398 |
/**
|
476 |
/* Add the first fieldset to get things started */
|
477 |
$wpdb->insert( $this->field_table_name, $initial_fieldset );
|
478 |
|
479 |
+
$verification_fieldset = array(
|
480 |
+
'form_id' => $new_form_selected,
|
481 |
+
'field_key' => 'verification',
|
482 |
+
'field_type' => 'verification',
|
483 |
+
'field_name' => 'Verification',
|
484 |
+
'field_description' => '(This is for preventing spam)',
|
485 |
+
'field_sequence' => 1
|
486 |
+
);
|
487 |
+
|
488 |
+
/* Insert the submit field */
|
489 |
+
$wpdb->insert( $this->field_table_name, $verification_fieldset );
|
490 |
+
|
491 |
+
$verify_fieldset_parent_id = $wpdb->insert_id;
|
492 |
+
|
493 |
+
$secret = array(
|
494 |
+
'form_id' => $new_form_selected,
|
495 |
+
'field_key' => 'secret',
|
496 |
+
'field_type' => 'secret',
|
497 |
+
'field_name' => 'Please enter any two digits with no spaces (Example: 12)',
|
498 |
+
'field_size' => 'medium',
|
499 |
+
'field_required' => 'yes',
|
500 |
+
'field_parent' => $verify_fieldset_parent_id,
|
501 |
+
'field_sequence' => 2
|
502 |
+
);
|
503 |
+
|
504 |
+
/* Insert the submit field */
|
505 |
+
$wpdb->insert( $this->field_table_name, $secret );
|
506 |
+
|
507 |
/* Make the submit last in the sequence */
|
508 |
$submit = array(
|
509 |
'form_id' => $new_form_selected,
|
510 |
'field_key' => 'submit',
|
511 |
'field_type' => 'submit',
|
512 |
'field_name' => 'Submit',
|
513 |
+
'field_parent' => $verify_fieldset_parent_id,
|
514 |
+
'field_sequence' => 3
|
515 |
);
|
516 |
|
517 |
/* Insert the submit field */
|
592 |
if ( !empty( $_REQUEST['field_id'] ) ) {
|
593 |
foreach ( $_REQUEST['field_id'] as $id ) {
|
594 |
$field_name = ( isset( $_REQUEST['field_name-' . $id] ) ) ? esc_html( $_REQUEST['field_name-' . $id] ) : '';
|
595 |
+
$field_key = sanitize_title( $field_name, $id );
|
596 |
$field_desc = ( isset( $_REQUEST['field_description-' . $id] ) ) ? esc_html( $_REQUEST['field_description-' . $id] ) : '';
|
597 |
$field_options = ( isset( $_REQUEST['field_options-' . $id] ) ) ? serialize( array_map( 'esc_html', $_REQUEST['field_options-' . $id] ) ) : '';
|
598 |
$field_validation = ( isset( $_REQUEST['field_validation-' . $id] ) ) ? esc_html( $_REQUEST['field_validation-' . $id] ) : '';
|
599 |
$field_required = ( isset( $_REQUEST['field_required-' . $id] ) ) ? esc_html( $_REQUEST['field_required-' . $id] ) : '';
|
600 |
$field_size = ( isset( $_REQUEST['field_size-' . $id] ) ) ? esc_html( $_REQUEST['field_size-' . $id] ) : '';
|
601 |
$field_css = ( isset( $_REQUEST['field_css-' . $id] ) ) ? esc_html( $_REQUEST['field_css-' . $id] ) : '';
|
602 |
+
$field_layout = ( isset( $_REQUEST['field_layout-' . $id] ) ) ? esc_html( $_REQUEST['field_layout-' . $id] ) : '';
|
603 |
|
604 |
$field_data = array(
|
605 |
'field_key' => $field_key,
|
610 |
'field_required' => $field_required,
|
611 |
'field_size' => $field_size,
|
612 |
'field_css' => $field_css,
|
613 |
+
'field_layout' => $field_layout,
|
614 |
'field_sequence' => $field_sequence
|
615 |
);
|
616 |
|
626 |
}
|
627 |
|
628 |
/* Check if a submit field type exists for backwards compatibility upgrades */
|
629 |
+
$is_verification = $wpdb->get_var( "SELECT field_id FROM $this->field_table_name WHERE field_type = 'verification' AND form_id = $form_id" );
|
630 |
+
$is_secret = $wpdb->get_var( "SELECT field_id FROM $this->field_table_name WHERE field_type = 'secret' AND form_id = $form_id" );
|
631 |
+
$is_submit = $wpdb->get_var( "SELECT field_id FROM $this->field_table_name WHERE field_type = 'submit' AND form_id = $form_id" );
|
632 |
|
633 |
+
/* Decrement sequence */
|
634 |
$field_sequence--;
|
635 |
|
636 |
+
/* If this form doesn't have a verification field, add one */
|
637 |
+
if ( $is_verification == NULL ) {
|
638 |
+
/* Adjust the sequence */
|
639 |
+
$verification_fieldset = array(
|
640 |
+
'form_id' => $form_id,
|
641 |
+
'field_key' => 'verification',
|
642 |
+
'field_type' => 'verification',
|
643 |
+
'field_name' => 'Verification',
|
644 |
+
'field_sequence' => $field_sequence
|
645 |
+
);
|
646 |
+
|
647 |
+
/* Insert the verification fieldset */
|
648 |
+
$wpdb->insert( $this->field_table_name, $verification_fieldset );
|
649 |
+
|
650 |
+
$verification_id = $wpdb->insert_id;
|
651 |
+
}
|
652 |
+
|
653 |
+
/* If the verification field was inserted, use that ID as a parent otherwise set no parent */
|
654 |
+
$verify_fieldset_parent_id = ( $verification_id !== false ) ? $verification_id : 0;
|
655 |
+
|
656 |
+
/* If this form doesn't have a secret field, add one */
|
657 |
+
if ( $is_secret == NULL ) {
|
658 |
+
|
659 |
+
/* Adjust the sequence */
|
660 |
+
$secret = array(
|
661 |
+
'form_id' => $form_id,
|
662 |
+
'field_key' => 'secret',
|
663 |
+
'field_type' => 'secret',
|
664 |
+
'field_name' => 'Please enter any two digits with no spaces (Example: 12)',
|
665 |
+
'field_size' => 'medium',
|
666 |
+
'field_required' => 'yes',
|
667 |
+
'field_parent' => $verify_fieldset_parent_id,
|
668 |
+
'field_sequence' => ++$field_sequence
|
669 |
+
);
|
670 |
+
|
671 |
+
/* Insert the submit field */
|
672 |
+
$wpdb->insert( $this->field_table_name, $secret );
|
673 |
+
}
|
674 |
+
|
675 |
/* If this form doesn't have a submit field, add one */
|
676 |
if ( $is_submit == NULL ) {
|
677 |
+
|
678 |
/* Make the submit last in the sequence */
|
679 |
$submit = array(
|
680 |
'form_id' => $form_id,
|
681 |
'field_key' => 'submit',
|
682 |
'field_type' => 'submit',
|
683 |
'field_name' => 'Submit',
|
684 |
+
'field_parent' => $verify_fieldset_parent_id,
|
685 |
+
'field_sequence' => ++$field_sequence
|
686 |
);
|
687 |
|
688 |
/* Insert the submit field */
|
689 |
$wpdb->insert( $this->field_table_name, $submit );
|
690 |
}
|
691 |
else {
|
692 |
+
/* Only update the Submit's parent ID if the Verification field is new */
|
693 |
+
$data = ( $is_verification == NULL ) ? array( 'field_parent' => $verify_fieldset_parent_id, 'field_sequence' => ++$field_sequence ) : array( 'field_sequence' => $field_sequence );
|
|
|
|
|
694 |
$where = array(
|
695 |
+
'form_id' => $form_id,
|
696 |
'field_id' => $is_submit
|
697 |
);
|
698 |
|
775 |
'field_required' => $field->field_required,
|
776 |
'field_size' => $field->field_size,
|
777 |
'field_css' => $field->field_css,
|
778 |
+
'field_layout' => $field->field_layout,
|
779 |
'field_parent' => $field->field_parent
|
780 |
);
|
781 |
|
838 |
global $wpdb;
|
839 |
|
840 |
$data = array();
|
841 |
+
$field_options = '';
|
842 |
|
843 |
foreach ( $_REQUEST['data'] as $k ) {
|
844 |
$data[ $k['name'] ] = $k['value'];
|
866 |
case 'time' :
|
867 |
$field_validation = 'time-12';
|
868 |
break;
|
869 |
+
case 'file-upload' :
|
870 |
+
$field_options = serialize( array( 'png|jpe?g|gif' ) );
|
871 |
+
break;
|
872 |
}
|
873 |
|
874 |
check_ajax_referer( 'create-field-' . $data['form_id'], 'nonce' );
|
875 |
|
876 |
+
/* Get the last row's sequence that isn't a Verification */
|
877 |
+
$sequence_last_row = $wpdb->get_row( "SELECT field_sequence FROM $this->field_table_name WHERE form_id = $form_id AND field_type = 'verification' ORDER BY field_sequence DESC LIMIT 1" );
|
878 |
|
879 |
/* If it's not the first for this form, add 1 */
|
880 |
+
$field_sequence = ( !empty( $sequence_last_row ) ) ? $sequence_last_row->field_sequence : 0;
|
881 |
+
|
882 |
$newdata = array(
|
883 |
'form_id' => absint( $data['form_id'] ),
|
884 |
'field_key' => $field_key,
|
885 |
'field_name' => $field_name,
|
886 |
'field_type' => $field_type,
|
887 |
+
'field_options' => $field_options,
|
888 |
'field_sequence' => $field_sequence,
|
889 |
'field_validation' => $field_validation
|
890 |
);
|
891 |
|
892 |
/* Create the field */
|
893 |
$wpdb->insert( $this->field_table_name, $newdata );
|
894 |
+
$insert_id = $wpdb->insert_id;
|
895 |
+
$update_these = array( 'verification', 'secret', 'submit' );
|
896 |
|
897 |
+
foreach ( $update_these as $update ) {
|
898 |
+
$where = array(
|
899 |
+
'form_id' => absint( $data['form_id'] ),
|
900 |
+
'field_type' => $update
|
901 |
+
);
|
902 |
+
|
903 |
+
$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence + 1 ), $where );
|
904 |
+
$field_sequence++;
|
905 |
+
}
|
906 |
|
|
|
|
|
|
|
|
|
|
|
|
|
907 |
|
908 |
+
echo $this->field_output( $data['form_id'], $insert_id );
|
909 |
}
|
910 |
|
911 |
die(1);
|
991 |
$last = $field->field_id;
|
992 |
$parent = $field->field_parent;
|
993 |
?>
|
994 |
+
<li id="form_item_<?php echo $field->field_id; ?>" class="form-item<?php echo ( in_array( $field->field_type, array( 'submit', 'secret', 'verification' ) ) ) ? ' ui-state-disabled' : ''; ?><?php echo ( !in_array( $field->field_type, array( 'fieldset', 'section', 'verification' ) ) ) ? ' ui-nestedSortable-no-nesting' : ''; ?>">
|
995 |
<dl class="menu-item-bar">
|
996 |
<dt class="menu-item-handle<?php echo ( $field->field_type == 'fieldset' ) ? ' fieldset' : ''; ?>">
|
997 |
<span class="item-title"><?php echo stripslashes( htmlspecialchars_decode( $field->field_name ) ); ?><?php echo ( $field->field_required == 'yes' ) ? ' <span class="is-field-required">*</span>' : ''; ?></span>
|
1003 |
</dl>
|
1004 |
|
1005 |
<div id="form-item-settings-<?php echo $field->field_id; ?>" class="menu-item-settings field-type-<?php echo $field->field_type; ?>" style="display: none;">
|
1006 |
+
<?php if ( in_array( $field->field_type, array( 'fieldset', 'section', 'verification' ) ) ) : ?>
|
1007 |
|
1008 |
<p class="description description-wide">
|
1009 |
+
<label for="edit-form-item-name-<?php echo $field->field_id; ?>"><?php echo ( in_array( $field->field_type, array( 'fieldset', 'verification' ) ) ) ? 'Legend' : 'Name'; ?><br />
|
1010 |
<input type="text" value="<?php echo stripslashes( $field->field_name ); ?>" name="field_name-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-name-<?php echo $field->field_id; ?>" />
|
1011 |
</label>
|
1012 |
</p>
|
1013 |
+
<p class="description description-wide">
|
1014 |
+
<label for="edit-form-item-css-<?php echo $field->field_id; ?>">
|
1015 |
+
<?php _e( 'CSS Classes' , 'visual-form-builder'); ?><br />
|
1016 |
+
<input type="text" value="<?php echo stripslashes( htmlspecialchars_decode( $field->field_css ) ); ?>" name="field_css-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-css-<?php echo $field->field_id; ?>" />
|
1017 |
+
</label>
|
1018 |
+
</p>
|
1019 |
|
1020 |
<?php elseif( $field->field_type == 'instructions' ) : ?>
|
1021 |
+
<!-- Instructions -->
|
1022 |
<p class="description description-wide">
|
1023 |
<label for="edit-form-item-name-<?php echo $field->field_id; ?>">
|
1024 |
<?php _e( 'Name' , 'visual-form-builder'); ?><br />
|
1094 |
unset( $opts_vals );
|
1095 |
endif;
|
1096 |
?>
|
1097 |
+
|
1098 |
+
<?php
|
1099 |
+
/* Display the Options input only for radio, checkbox, select, and autocomplete fields */
|
1100 |
+
if ( in_array( $field->field_type, array( 'file-upload' ) ) ) :
|
1101 |
+
?>
|
1102 |
+
<!-- File Upload Accepts -->
|
1103 |
+
<p class="description description-wide">
|
1104 |
+
<?php
|
1105 |
+
$opts_vals = array( '' );
|
1106 |
+
|
1107 |
+
/* If the options field isn't empty, unserialize and build array */
|
1108 |
+
if ( !empty( $field->field_options ) ) {
|
1109 |
+
if ( is_serialized( $field->field_options ) )
|
1110 |
+
$opts_vals = ( is_array( unserialize( $field->field_options ) ) ) ? unserialize( $field->field_options ) : unserialize( $field->field_options );
|
1111 |
+
}
|
1112 |
+
|
1113 |
+
/* Loop through the options */
|
1114 |
+
foreach ( $opts_vals as $options ) {
|
1115 |
+
?>
|
1116 |
+
<label for="edit-form-item-options-<?php echo $field->field_id; ?>">
|
1117 |
+
<?php _e( 'Accepted File Extensions' , 'visual-form-builder'); ?>
|
1118 |
+
<input type="text" value="<?php echo stripslashes( $options ); ?>" name="field_options-<?php echo $field->field_id; ?>[]" class="widefat" id="edit-form-item-options-<?php echo $field->field_id; ?>" />
|
1119 |
+
</label>
|
1120 |
+
</p>
|
1121 |
+
<?php
|
1122 |
+
}
|
1123 |
+
/* Unset the options for any following radio, checkboxes, or selects */
|
1124 |
+
unset( $opts_vals );
|
1125 |
+
endif;
|
1126 |
+
?>
|
1127 |
<!-- Validation -->
|
1128 |
<p class="description description-thin">
|
1129 |
<label for="edit-form-item-validation">
|
1130 |
+
<?php _e( 'Validation' , 'visual-form-builder'); ?><br />
|
1131 |
+
<select name="field_validation-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-validation-<?php echo $field->field_id; ?>"<?php echo ( in_array( $field->field_type, array( 'radio', 'select', 'checkbox', 'address', 'date', 'textarea', 'html', 'file-upload', 'secret' ) ) ) ? ' disabled="disabled"' : ''; ?>>
|
1132 |
<?php if ( $field->field_type == 'time' ) : ?>
|
1133 |
<option value="time-12" <?php selected( $field->field_validation, 'time-12' ); ?>><?php _e( '12 Hour Format' , 'visual-form-builder'); ?></option>
|
1134 |
<option value="time-24" <?php selected( $field->field_validation, 'time-24' ); ?>><?php _e( '24 Hour Format' , 'visual-form-builder'); ?></option>
|
1158 |
|
1159 |
<?php if ( !in_array( $field->field_type, array( 'radio', 'checkbox', 'time' ) ) ) : ?>
|
1160 |
<!-- Size -->
|
1161 |
+
<p class="description description-thin">
|
1162 |
<label for="edit-form-item-size">
|
1163 |
<?php _e( 'Size' , 'visual-form-builder'); ?><br />
|
1164 |
<select name="field_size-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-size-<?php echo $field->field_id; ?>">
|
1165 |
+
<option value="small" <?php selected( $field->field_size, 'small' ); ?>><?php _e( 'Small' , 'visual-form-builder'); ?></option>
|
1166 |
<option value="medium" <?php selected( $field->field_size, 'medium' ); ?>><?php _e( 'Medium' , 'visual-form-builder'); ?></option>
|
1167 |
<option value="large" <?php selected( $field->field_size, 'large' ); ?>><?php _e( 'Large' , 'visual-form-builder'); ?></option>
|
1168 |
</select>
|
1169 |
</label>
|
1170 |
</p>
|
1171 |
+
|
1172 |
+
<?php elseif ( in_array( $field->field_type, array( 'radio', 'checkbox', 'time' ) ) ) : ?>
|
1173 |
+
<!-- Options Layout -->
|
1174 |
+
<p class="description description-thin">
|
1175 |
+
<label for="edit-form-item-size">
|
1176 |
+
<?php _e( 'Options Layout' , 'visual-form-builder'); ?><br />
|
1177 |
+
<select name="field_size-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-size-<?php echo $field->field_id; ?>"<?php echo ( $field->field_type == 'time' ) ? ' disabled="disabled"' : ''; ?>>
|
1178 |
+
<option value="" <?php selected( $field->field_size, '' ); ?>><?php _e( 'One Column' , 'visual-form-builder'); ?></option>
|
1179 |
+
<option value="two-column" <?php selected( $field->field_size, 'two-column' ); ?>><?php _e( 'Two Columns' , 'visual-form-builder'); ?></option>
|
1180 |
+
<option value="three-column" <?php selected( $field->field_size, 'three-column' ); ?>><?php _e( 'Three Columns' , 'visual-form-builder'); ?></option>
|
1181 |
+
<option value="auto-column" <?php selected( $field->field_size, 'auto-column' ); ?>><?php _e( 'Auto Width' , 'visual-form-builder'); ?></option>
|
1182 |
+
</select>
|
1183 |
+
</label>
|
1184 |
+
</p>
|
1185 |
+
|
1186 |
<?php endif; ?>
|
1187 |
+
<!-- Field Layout -->
|
1188 |
+
<p class="description description-thin">
|
1189 |
+
<label for="edit-form-item-layout">
|
1190 |
+
<?php _e( 'Field Layout' , 'visual-form-builder'); ?><br />
|
1191 |
+
<select name="field_layout-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-layout-<?php echo $field->field_id; ?>">
|
1192 |
+
|
1193 |
+
<option value="" <?php selected( $field->field_layout, '' ); ?>><?php _e( 'Default' , 'visual-form-builder'); ?></option>
|
1194 |
+
<optgroup label="------------">
|
1195 |
+
<option value="left-half" <?php selected( $field->field_layout, 'left-half' ); ?>><?php _e( 'Left Half' , 'visual-form-builder'); ?></option>
|
1196 |
+
<option value="right-half" <?php selected( $field->field_layout, 'right-half' ); ?>><?php _e( 'Right Half' , 'visual-form-builder'); ?></option>
|
1197 |
+
</optgroup>
|
1198 |
+
<optgroup label="------------">
|
1199 |
+
<option value="left-third" <?php selected( $field->field_layout, 'left-third' ); ?>><?php _e( 'Left Third' , 'visual-form-builder'); ?></option>
|
1200 |
+
<option value="middle-third" <?php selected( $field->field_layout, 'middle-third' ); ?>><?php _e( 'Middle Third' , 'visual-form-builder'); ?></option>
|
1201 |
+
<option value="right-third" <?php selected( $field->field_layout, 'right-third' ); ?>><?php _e( 'Right Third' , 'visual-form-builder'); ?></option>
|
1202 |
+
</optgroup>
|
1203 |
+
<optgroup label="------------">
|
1204 |
+
<option value="left-two-thirds" <?php selected( $field->field_layout, 'left-two-thirds' ); ?>><?php _e( 'Left Two Thirds' , 'visual-form-builder'); ?></option>
|
1205 |
+
<option value="right-two-thirds" <?php selected( $field->field_layout, 'right-two-thirds' ); ?>><?php _e( 'Right Two Thirds' , 'visual-form-builder'); ?></option>
|
1206 |
+
</optgroup>
|
1207 |
+
</select>
|
1208 |
+
</label>
|
1209 |
+
</p>
|
1210 |
<p class="description description-wide">
|
1211 |
+
<label for="edit-form-item-css-<?php echo $field->field_id; ?>">
|
1212 |
+
<?php _e( 'CSS Classes' , 'visual-form-builder'); ?><br />
|
1213 |
+
<input type="text" value="<?php echo stripslashes( htmlspecialchars_decode( $field->field_css ) ); ?>" name="field_css-<?php echo $field->field_id; ?>" class="widefat" id="edit-form-item-css-<?php echo $field->field_id; ?>" />
|
1214 |
+
</label>
|
1215 |
</p>
|
1216 |
+
|
1217 |
<?php endif; ?>
|
1218 |
<?php endif; ?>
|
1219 |
|
1220 |
+
<?php if ( !in_array( $field->field_type, array( 'verification', 'secret', 'submit' ) ) ) : ?>
|
1221 |
<div class="menu-item-actions description-wide submitbox">
|
1222 |
<a href="<?php echo esc_url( wp_nonce_url( admin_url('options-general.php?page=visual-form-builder&action=delete_field&form=' . $form_nav_selected_id . '&field=' . $field->field_id ), 'delete-field-' . $form_nav_selected_id ) ); ?>" class="item-delete submitdelete deletion"><?php _e( 'Remove' , 'visual-form-builder'); ?></a>
|
1223 |
</div>
|
1774 |
|
1775 |
/* Setup count for fieldset and ul/section class names */
|
1776 |
$count = 1;
|
1777 |
+
|
1778 |
+
$verification = '';
|
1779 |
|
1780 |
foreach ( $forms as $form ) :
|
1781 |
|
1784 |
$output .= wp_nonce_field( 'visual-form-builder-nonce', '_wpnonce', false, false );
|
1785 |
|
1786 |
foreach ( $fields as $field ) {
|
1787 |
+
/* If field is required, build the span and add setup the 'required' class */
|
1788 |
+
$required_span = ( !empty( $field->field_required ) && $field->field_required === 'yes' ) ? ' <span>*</span>' : '';
|
1789 |
+
$required = ( !empty( $field->field_required ) && $field->field_required === 'yes' ) ? ' required' : '';
|
1790 |
+
$validation = ( !empty( $field->field_validation ) ) ? " $field->field_validation" : '';
|
1791 |
+
$css = ( !empty( $field->field_css ) ) ? " $field->field_css" : '';
|
1792 |
+
$layout = ( !empty( $field->field_layout ) ) ? " $field->field_layout" : '';
|
1793 |
|
1794 |
/* Close each section */
|
1795 |
if ( $open_section == true ) {
|
1796 |
/* If this field's parent does NOT equal our section ID */
|
1797 |
if ( $sec_id && $sec_id !== $field->field_parent ) {
|
1798 |
+
$output .= '</div><div class="vfb-clear"></div>';
|
1799 |
$open_section = false;
|
1800 |
}
|
1801 |
}
|
1805 |
if ( $open_fieldset == true )
|
1806 |
$output .= '</ul><br /></fieldset>';
|
1807 |
|
1808 |
+
$output .= '<fieldset class="fieldset fieldset-' . $count . ' ' . $field->field_key . $css . '"><div class="legend"><h3>' . stripslashes( $field->field_name ) . '</h3></div><ul class="section section-' . $count . '">';
|
1809 |
$open_fieldset = true;
|
1810 |
$count++;
|
1811 |
}
|
1816 |
$sec_id = $field->field_id;
|
1817 |
$open_section = true;
|
1818 |
}
|
1819 |
+
elseif ( !in_array( $field->field_type, array( 'verification', 'secret', 'submit' ) ) ) {
|
1820 |
+
|
1821 |
+
$columns_choice = ( in_array( $field->field_type, array( 'radio', 'checkbox' ) ) ) ? " $field->field_size" : '';
|
1822 |
+
|
1823 |
+
if ( $field->field_type !== 'hidden' ) {
|
1824 |
+
$output .= '<li class="item item-' . $field->field_type . $columns_choice . $layout . '"><label for="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" class="desc">'. stripslashes( $field->field_name ) . $required_span . '</label>';
|
1825 |
+
}
|
1826 |
+
}
|
1827 |
+
elseif ( in_array( $field->field_type, array( 'verification', 'secret' ) ) ) {
|
1828 |
+
|
1829 |
+
if ( $field->field_type == 'verification' )
|
1830 |
+
$verification .= '<fieldset class="fieldset fieldset-' . $count . ' ' . $field->field_key . $css . $page . '"><div class="legend"><h3>' . stripslashes( $field->field_name ) . '</h3></div><ul class="section section-' . $count . '">';
|
1831 |
+
|
1832 |
+
if ( $field->field_type == 'secret' ) {
|
1833 |
+
/* Default logged in values */
|
1834 |
+
$logged_in_display = '';
|
1835 |
+
$logged_in_value = '';
|
1836 |
+
|
1837 |
+
/* If the user is logged in, fill the field in for them */
|
1838 |
+
if ( is_user_logged_in() ) {
|
1839 |
+
/* Hide the secret field if logged in */
|
1840 |
+
$logged_in_display = ' style="display:none;"';
|
1841 |
+
$logged_in_value = 14;
|
1842 |
+
|
1843 |
+
/* Get logged in user details */
|
1844 |
+
$user = wp_get_current_user();
|
1845 |
+
$user_identity = ! empty( $user->ID ) ? $user->display_name : '';
|
1846 |
+
|
1847 |
+
/* Display a message for logged in users */
|
1848 |
+
$verification .= '<li class="item">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. Verification not required.', 'visual-form-builder' ), admin_url( 'profile.php' ), $user_identity ) . '</li>';
|
1849 |
+
}
|
1850 |
+
|
1851 |
+
$validation = ' {digits:true,maxlength:2,minlength:2}';
|
1852 |
+
$verification .= '<li class="item item-' . $field->field_type . '"' . $logged_in_display . '><label for="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" class="desc">'. stripslashes( $field->field_name ) . $required_span . '</label>';
|
1853 |
+
|
1854 |
+
if ( !empty( $field->field_description ) )
|
1855 |
+
$verification .= '<span><input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="' . $logged_in_value . '" class="text ' . $field->field_size . $required . $validation . $css . '" /><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
1856 |
+
else
|
1857 |
+
$verification .= '<input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="' . $logged_in_value . '" class="text ' . $field->field_size . $required . $validation . $css . '" />';
|
1858 |
+
}
|
1859 |
}
|
1860 |
|
1861 |
|
1884 |
|
1885 |
break;
|
1886 |
|
1887 |
+
case 'select' :
|
1888 |
if ( !empty( $field->field_description ) )
|
1889 |
$output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
1890 |
|
1894 |
|
1895 |
/* Loop through each option and output */
|
1896 |
foreach ( $options as $option => $value ) {
|
1897 |
+
$output .= '<option value="' . trim( stripslashes( $value ) ) . '">'. trim( stripslashes( $value ) ) . '</option>';
|
1898 |
}
|
1899 |
|
1900 |
$output .= '</select>';
|
1901 |
|
1902 |
break;
|
1903 |
|
1904 |
+
case 'radio' :
|
1905 |
|
1906 |
if ( !empty( $field->field_description ) )
|
1907 |
$output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
1913 |
/* Loop through each option and output */
|
1914 |
foreach ( $options as $option => $value ) {
|
1915 |
$output .= '<span>
|
1916 |
+
<input type="radio" name="vfb-'. $field->field_key . '-' . $field->field_id . '" id="vfb-'. $field->field_key . '-' . $field->field_id . '-' . $option . '" value="'. trim( stripslashes( $value ) ) . '" class="radio' . $required . $css . '" />'.
|
1917 |
+
' <label for="vfb-' . $field->field_key . '-' . $field->field_id . '-' . $option . '" class="choice">' . trim( stripslashes( $value ) ) . '</label>' .
|
1918 |
'</span>';
|
1919 |
}
|
1920 |
|
1922 |
|
1923 |
break;
|
1924 |
|
1925 |
+
case 'checkbox' :
|
1926 |
|
1927 |
if ( !empty( $field->field_description ) )
|
1928 |
$output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
1942 |
|
1943 |
break;
|
1944 |
|
1945 |
+
case 'address' :
|
1946 |
|
1947 |
if ( !empty( $field->field_description ) )
|
1948 |
$output .= '<span><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
1987 |
|
1988 |
break;
|
1989 |
|
1990 |
+
case 'date' :
|
1991 |
|
1992 |
if ( !empty( $field->field_description ) )
|
1993 |
$output .= '<span><input type="text" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text vfb-date-picker ' . $field->field_size . $required . $css . '" /><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
2042 |
|
2043 |
case 'file-upload' :
|
2044 |
|
2045 |
+
$options = ( is_array( unserialize( $field->field_options ) ) ) ? unserialize( $field->field_options ) : unserialize( $field->field_options );
|
2046 |
+
$accept = ( !empty( $options[0] ) ) ? "{accept:'$options[0]'}" : '';
|
2047 |
+
|
2048 |
if ( !empty( $field->field_description ) )
|
2049 |
+
$output .= '<span><input type="file" size="35" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text ' . $field->field_size . $required . $validation . $accept . $css . '" /><label>' . stripslashes( $field->field_description ) . '</label></span>';
|
2050 |
else
|
2051 |
+
$output .= '<input type="file" size="35" name="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" id="vfb-' . esc_html( $field->field_key ) . '-' . $field->field_id . '" value="" class="text ' . $field->field_size . $required . $validation . $accept . $css . '" />';
|
2052 |
|
2053 |
|
2054 |
break;
|
2070 |
}
|
2071 |
|
2072 |
/* Closing </li> */
|
2073 |
+
$output .= ( !in_array( $field->field_type , array( 'verification', 'secret', 'submit', 'fieldset', 'section' ) ) ) ? '</li>' : '';
|
2074 |
}
|
2075 |
|
2076 |
/* Close user-added fields */
|
2077 |
$output .= '</ul><br /></fieldset>';
|
2078 |
|
2079 |
+
/* Make sure the verification displays even if they have not updated their form */
|
2080 |
+
if ( $verification == '' ) {
|
2081 |
+
$verification = '<fieldset class="fieldset verification">
|
2082 |
<div class="legend">
|
2083 |
<h3>' . __( 'Verification' , 'visual-form-builder') . '</h3>
|
2084 |
</div>
|
2088 |
<div>
|
2089 |
<input type="text" name="vfb-secret" id="vfb-secret" class="text medium" />
|
2090 |
</div>
|
2091 |
+
</li>';
|
2092 |
+
}
|
2093 |
+
|
2094 |
+
/* Output our security test */
|
2095 |
+
$output .= $verification . '<li style="display:none;">
|
2096 |
<label for="vfb-spam">' . __( 'This box is for spam protection' , 'visual-form-builder') . ' - <strong>' . __( 'please leave it blank' , 'visual-form-builder') . '</strong>:</label>
|
2097 |
<div>
|
2098 |
<input name="vfb-spam" id="vfb-spam" />
|
2099 |
</div>
|
2100 |
</li>
|
2101 |
+
|
2102 |
<li class="item item-submit">
|
2103 |
+
<input type="submit" name="visual-form-builder-submit" value="' . $submit . '" class="submit" id="sendmail" />' . $total_page . '
|
2104 |
</li>
|
2105 |
</ul>
|
2106 |
</fieldset></form>';
|
2107 |
+
|
|
|
2108 |
endforeach;
|
2109 |
}
|
2110 |
|
2121 |
global $wpdb, $post;
|
2122 |
|
2123 |
/* Security check before moving any further */
|
2124 |
+
//if ( isset( $_REQUEST['visual-form-builder-submit'] ) && $_REQUEST['vfb-spam'] == '' && is_numeric( $_REQUEST['vfb-secret'] ) && strlen( $_REQUEST['vfb-secret'] ) == 2 ) :
|
2125 |
+
if ( isset( $_REQUEST['visual-form-builder-submit'] ) && $_REQUEST['vfb-spam'] == '' ) :
|
2126 |
$nonce = $_REQUEST['_wpnonce'];
|
2127 |
|
2128 |
/* Security check to verify the nonce */
|
2291 |
else
|
2292 |
$value = html_entity_decode( stripslashes( esc_html( $value ) ), ENT_QUOTES, 'UTF-8' );
|
2293 |
|
2294 |
+
//if ( $field->field_type !== 'submit' ) {
|
2295 |
+
if ( !in_array( $field->field_type , array( 'verification', 'secret', 'submit' ) ) ) {
|
2296 |
if ( $field->field_type == 'fieldset' )
|
2297 |
$message .= '<tr style="background-color:#393E40;color:white;font-size:14px;"><td colspan="2">' . stripslashes( $field->field_name ) . '</td></tr>';
|
2298 |
elseif ( $field->field_type == 'section' )
|
2329 |
$wpdb->insert( $this->entries_table_name, $entry );
|
2330 |
|
2331 |
/* Close out the content */
|
2332 |
+
$message .= '<tr><td class="footer" height="61" align="left" valign="middle"><p style="font-size: 12px; font-weight: normal; margin: 0; line-height: 16px; padding: 0;">This email was built and sent using <a href="http://wordpress.org/extend/plugins/visual-form-builder/" style="font-size: 12px;">Visual Form Builder</a>.</p></td></tr></table></body></html>';
|
2333 |
|
2334 |
/* Initialize header filter vars */
|
2335 |
$this->header_from_name = stripslashes( $form_from_name );
|