Changeset 3748754
- Timestamp:
- 10/15/2026 02:36:23 PM (10 days ago)
- Location:
- zoho-forms
- Files:
-
- 28 added
- 12 deleted
- 15 edited
- 2 copied
-
tags/5.0 (copied) (copied from zoho-forms/trunk )
-
tags/5.0/images (added)
-
tags/5.0/images/access-form.png (added)
-
tags/5.0/images/completed.png (added)
-
tags/5.0/images/fieldprop-minus.png (added)
-
tags/5.0/images/fieldprop-plus.png (added)
-
tags/5.0/images/icon-link.png (added)
-
tags/5.0/images/refresh-form.png (added)
-
tags/5.0/images/zFormsIcon.png (added)
-
tags/5.0/images/zohoforms.png (added)
-
tags/5.0/lib (added)
-
tags/5.0/lib/select2 (added)
-
tags/5.0/lib/select2/select2.min.css (added)
-
tags/5.0/lib/select2/select2.min.js (added)
-
tags/5.0/readme.txt (copied) (copied from zoho-forms/trunk/readme.txt ) (3 diffs)
-
tags/5.0/tinymce/backbtn.jpg (deleted)
-
tags/5.0/tinymce/fieldprop-minus.png (deleted)
-
tags/5.0/tinymce/fieldprop-plus.png (deleted)
-
tags/5.0/tinymce/paramtrArrow.jpg (deleted)
-
tags/5.0/tinymce/zFormsIcon.png (deleted)
-
tags/5.0/tinymce/zforms_dailog.css (modified) (2 diffs)
-
tags/5.0/tinymce/zforms_dailog.js (modified) (18 diffs)
-
tags/5.0/tinymce/zforms_dialog.php (modified) (3 diffs)
-
tags/5.0/tinymce/zforms_editor_plugin.js (modified) (1 diff)
-
tags/5.0/tinymce/zforms_newdialog.css (added)
-
tags/5.0/tinymce/zohoforms.png (deleted)
-
tags/5.0/zohoForms.php (modified) (4 diffs)
-
tags/5.0/zohoforms-block.css (modified) (1 diff)
-
tags/5.0/zohoforms-block.js (modified) (31 diffs)
-
trunk/images (added)
-
trunk/images/access-form.png (added)
-
trunk/images/completed.png (added)
-
trunk/images/fieldprop-minus.png (added)
-
trunk/images/fieldprop-plus.png (added)
-
trunk/images/icon-link.png (added)
-
trunk/images/refresh-form.png (added)
-
trunk/images/zFormsIcon.png (added)
-
trunk/images/zohoforms.png (added)
-
trunk/lib (added)
-
trunk/lib/select2 (added)
-
trunk/lib/select2/select2.min.css (added)
-
trunk/lib/select2/select2.min.js (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/tinymce/backbtn.jpg (deleted)
-
trunk/tinymce/fieldprop-minus.png (deleted)
-
trunk/tinymce/fieldprop-plus.png (deleted)
-
trunk/tinymce/paramtrArrow.jpg (deleted)
-
trunk/tinymce/zFormsIcon.png (deleted)
-
trunk/tinymce/zforms_dailog.css (modified) (2 diffs)
-
trunk/tinymce/zforms_dailog.js (modified) (18 diffs)
-
trunk/tinymce/zforms_dialog.php (modified) (3 diffs)
-
trunk/tinymce/zforms_editor_plugin.js (modified) (1 diff)
-
trunk/tinymce/zforms_newdialog.css (added)
-
trunk/tinymce/zohoforms.png (deleted)
-
trunk/zohoForms.php (modified) (2 diffs)
-
trunk/zohoforms-block.css (modified) (1 diff)
-
trunk/zohoforms-block.js (modified) (31 diffs)
Legend:
- Unmodified
- Added
- Removed
-
zoho-forms/tags/5.0/readme.txt
r3729093 r3748754 5 5 Tags: contact form, form builder, custom form, forms, form plugin 6 6 Requires at least: 2.8 7 Tested up to: 7.1 8 Stable tag: 4.17 Tested up to: 7.1.3 8 Stable tag: 5.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 230 230 == Changelog == 231 231 232 = 5.0 = 233 234 * Refreshed the Zoho Forms plugin with a new look for embedding forms. 235 232 236 = 4.1 = 233 237 234 238 * Upgraded the Zoho Forms block to Block API version 3 for compatibility with the iframe-based block editor. 235 239 * Fixed the Zoho Forms block not working in the block editor from WordPress 7.1. 236 240 = 4.0.4 = 237 241 … … 292 296 == Upgrade Notice == 293 297 294 = 4.1 = 295 296 * Required for WordPress 7.1 and later: the Zoho Forms block now supports the iframe-based block editor (Block API version 3). 297 298 = 4.0.4 = 299 300 * Enhanced iframe and JavaScript code of forms with required browser permissions and WCAG attributes. 298 = 5.0 = 299 300 * Refreshed the Zoho Forms plugin with a new look for embedding forms. -
zoho-forms/tags/5.0/tinymce/zforms_dailog.css
r3729081 r3748754 407 407 padding: 0 20px; 408 408 } 409 .intArrow {410 border-bottom: 1px dashed #afafaf;411 font-size: 13px;412 font-weight: 300;413 width: 75px;414 position: relative;415 margin-left: 15px;416 margin-right: 15px;417 display: inline-block;418 float: left;419 vertical-align: middle;420 top: 15px;421 margin-left: 20px;422 margin-right: 20px;423 }424 .intArrow .arrowImg {425 background: url(paramtrArrow.jpg) no-repeat;426 width: 5px;427 height: 10px;428 display: block;429 top: -4px;430 position: absolute;431 right: 0;432 opacity: 0.8;433 }434 409 .fiedPropPlus, .fiedPropMinus{ 435 410 width: 24px; 436 411 height: 24px; 437 background: url( fieldprop-plus.png) no-repeat;412 background: url(../images/fieldprop-plus.png) no-repeat; 438 413 background-size: contain; 439 414 margin-top: 2px; … … 443 418 } 444 419 .fiedPropMinus { 445 background: url( fieldprop-minus.png) no-repeat; background-size: contain;420 background: url(../images/fieldprop-minus.png) no-repeat; background-size: contain; 446 421 margin-left: 8px; 447 422 } -
zoho-forms/tags/5.0/tinymce/zforms_dailog.js
r3729081 r3748754 94 94 var embedType = $("#zf_embedCatogory").val(); 95 95 if(embedType == "formPerma"){ 96 var perma_link = document.getElementById("permalink").value;96 var perma_link = $.trim(document.getElementById("permalink").value); 97 97 if(perma_link.length==0) 98 98 { 99 99 document.getElementById("permaLinkError").style.display="block"; 100 100 document.getElementById("permaLinkError").innerHTML="Please enter your form's public link."; 101 document.getElementById("permaContainer").classList.add("errorCont"); 101 document.getElementById("permaContainer").classList.add("zf-wb-errorCont"); 102 return; 103 } 104 if(perma_link.toLowerCase().indexOf("https://") !== 0) 105 { 106 document.getElementById("permaLinkError").style.display="block"; 107 document.getElementById("permaLinkError").innerHTML="Enter a valid permalink Url"; 108 document.getElementById("permaContainer").classList.add("zf-wb-errorCont"); 102 109 return; 103 110 } … … 109 116 document.getElementById("formSelectionError").style.display="block"; 110 117 document.getElementById("formSelectionError").innerHTML="Please select a form."; 111 document.getElementById("selctContainer").class Name= "errorCont";118 document.getElementById("selctContainer").classList.add("zf-wb-errorCont"); 112 119 return; 113 120 } … … 126 133 if(!paramKeyRegex.test(paramKey)){ 127 134 hasError = true; 128 $(elem).find("input[elname=paramKey]").parent("div").addClass(" errorCont");135 $(elem).find("input[elname=paramKey]").parent("div").addClass("zf-wb-errorCont"); 129 136 } 130 137 if(paramKey!='' && paramVal!=''){ … … 140 147 } 141 148 } 142 var formWidth = document.getElementById('width'); 149 var formWidth = document.getElementById('formWidth'); 150 var widthUnit = $("#formWidth").closest(".embedInputCont").find("i.selected").attr("size_symbol") || "%"; 143 151 if(formWidth.value=="") 144 152 { 145 formWidth.value="100%"; 146 } 147 var formHeight = document.getElementById('height'); 153 formWidth.value="100"+widthUnit; 154 }else if(!/(px|%)$/.test(formWidth.value)){ 155 formWidth.value=formWidth.value+widthUnit; 156 } 157 var formHeight = document.getElementById('formHeight'); 158 var heightUnit = $("#formHeight").closest(".embedInputCont").find("i").attr("size_symbol") || "px"; 148 159 if(formHeight.value=="") 149 160 { 150 formHeight.value="600px"; 161 formHeight.value="600"+heightUnit; 162 }else if(!/(px|%)$/.test(formHeight.value)){ 163 formHeight.value=formHeight.value+heightUnit; 151 164 } 152 165 //insertContent(urlBuild,formWidth.value,formHeight.value); … … 170 183 tag +=' urlparams="'+urlParams+'"'; 171 184 } 172 if($("#jsEmbed").is(":checked")){ 173 tag +=' type=js'; 174 } 175 if($("#autoHeightCB").is(":checked")){ 185 tag +=' type=js'; 186 if(!$("#autoHeightCB").is(":checked")){ 176 187 tag +=' autoheight=true' 177 188 } … … 203 214 $("#chooseFormDiv").hide(); 204 215 $("#embedActionsDiv").hide(); 216 selectMappingStep("choose"); 217 } 218 219 function selectMappingStep(step){ 220 if(step == "embed"){ 221 $("#chooseFormStep").addClass("is-selected"); 222 $("#configureEmbedStep").addClass("is-selected"); 223 setStepCompleted("#chooseFormStep", true); 224 setStepCompleted("#configureEmbedStep", false); 225 }else{ 226 $("#configureEmbedStep").removeClass("is-selected"); 227 $("#chooseFormStep").addClass("is-selected"); 228 setStepCompleted("#chooseFormStep", false); 229 setStepCompleted("#configureEmbedStep", false); 230 } 231 } 232 function setStepCompleted(stepSelector, completed){ 233 var $step = $(stepSelector); 234 if(completed){ 235 $step.find("span[elname=stepNumber]").hide(); 236 $step.find("span[elname=tickIcon]").css("display", ""); 237 }else{ 238 $step.find("span[elname=stepNumber]").css("display", ""); 239 $step.find("span[elname=tickIcon]").hide(); 240 } 241 } 242 243 function selectConnectionCard(card){ 244 $("#accessZohoFormsCard, #embedUsingPermalinkCard").removeClass("selected"); 245 $(card).addClass("selected"); 246 } 247 248 function proceedFromHome(){ 249 if($("#accessZohoFormsCard").hasClass("selected")){ 250 showChooseFormDiv(); 251 }else if($("#embedUsingPermalinkCard").hasClass("selected")){ 252 embedPerma(); 253 } 205 254 } 206 255 … … 210 259 $("#zf_embedCatogory").val("formPerma"); 211 260 $("#permaLinkDiv").show(); 261 $("#formSelectionDiv").hide(); 212 262 $("#embedActionsDiv").show(); 213 if(document.getElementById("permaContainer").classList.contains(" errorCont"))214 { 215 document.getElementById("permaContainer").classList.remove(" errorCont");263 if(document.getElementById("permaContainer").classList.contains("zf-wb-errorCont")) 264 { 265 document.getElementById("permaContainer").classList.remove("zf-wb-errorCont"); 216 266 document.getElementById("permaLinkError").style.display="none"; 217 267 } … … 219 269 //document.getElementById("permaLinkDiv").style.display="block"; 220 270 document.getElementById("chooseFormDiv").style.display= "none"; 221 //document.getElementById("selectForm").classList.remove("selected"); 222 271 selectMappingStep("embed"); 223 272 } 224 273 225 function signin() 226 { 227 if(window.tinyMCE) 228 { 229 var domainValue = $("#zForm_domain").val(); 230 var formsUrl = getZohoURL(domainValue); 231 if(formsUrl !=""){ 232 window.open(formsUrl+"/forms/login.html"); 233 document.getElementById("refreshDiv").style.display="block"; 234 document.getElementById("signinDiv").style.display="none"; 235 } 236 } 274 var signInTabOpened = false; 275 function openSignInTab(formsUrl){ 276 if(!signInTabOpened && formsUrl !=""){ 277 signInTabOpened = true; 278 window.open(formsUrl); 279 } 280 $("#zDomaindiv").hide(); 281 $("#zfCreateFormDiv").hide(); 282 document.getElementById("zfRefreshDiv").style.display="flex"; 237 283 } 238 284 function appendScript() … … 259 305 $("#zf_tiny_homeDiv").hide(); 260 306 $("#zf_embedCatogory").val("formSelect"); 261 //document.getElementById("selectForm").classList.add("selected"); 307 document.getElementById("permaLinkDiv").style.display= "none"; 308 if(a!="" && a.forms && a.forms.length > 0){ 309 $("#chooseFormDiv").hide(); 310 $("#formSelectionDiv").show(); 311 $("#embedActionsDiv").show(); 312 selectMappingStep("embed"); 313 return; 314 } 262 315 document.getElementById("chooseFormDiv").style.display="block"; 263 document.getElementById("permaLinkDiv").style.display= "none";264 //document.getElementById("publicLink").className= "none";265 316 showEmbedActionsDiv(); 266 317 } 267 318 268 319 function proceedToSelectFormOnTinyMce(){ 269 var domainValue = $("#z Form_domain").val();320 var domainValue = $("#zf_domain").val(); 270 321 if(domainValue == "-select-"){ 271 $("#domain SelectionErr").show();272 $("# domainSelectionDiv").addClass("errorCont");322 $("#domainErr").show(); 323 $("#zDomaindiv").addClass("zf-wb-errorCont"); 273 324 return; 274 325 } 275 326 var formsUrl = getZohoFormsURL(domainValue); 276 327 if(formsUrl !=""){ 328 signInTabOpened = false; 329 var refreshVisible = $("#zfRefreshDiv").is(":visible"); 330 var loaderElem = refreshVisible ? $("#refreshLoadingImgElem") : $("#connectLoadingImgElem"); 331 loaderElem.show(); 277 332 getZohoFormsLisOnTinyMce(formsUrl); 278 $("#domainSelectionDiv").hide();279 $("#refreshDiv").hide();280 $("#loadingDiv").show();281 333 setTimeout(function() { 282 $("#loadingDiv").hide();334 loaderElem.hide(); 283 335 if(a==""){ 284 $("#signinDiv").show(); 285 }else if(a.forms.length == 0){ 286 $("#createFormDiv").show(); 336 openSignInTab(formsUrl); 337 return; 338 } 339 $("#zDomaindiv").hide(); 340 $("#zfRefreshDiv").hide(); 341 if(a.forms.length == 0){ 342 $("#zfCreateFormDiv").show(); 287 343 }else{ 344 $("#chooseFormDiv").hide(); 345 $("#permaLinkDiv").hide(); 288 346 $("#formSelectionDiv").show(); 347 $("#embedActionsDiv").show(); 348 selectMappingStep("embed"); 289 349 } 290 350 … … 294 354 function getZohoFormsLisOnTinyMce(formsUrl){ 295 355 var apiURL = formsUrl+"/api/getforms?type=plugin"; 296 $("#loadingDiv").show();297 356 getFormsAndIncludeScriptOnTinyMce(apiURL,addToFormListDropDown); 298 357 } … … 310 369 formList.options.add(option); 311 370 } 312 $("#zFormSelectDiv").show(); 371 if($("#formname").data("select2")){ 372 $("#formname").trigger("change.select2"); 373 } 374 $("#chooseFormDiv").hide(); 375 $("#permaLinkDiv").hide(); 376 $("#formSelectionDiv").show(); 377 $("#embedActionsDiv").show(); 378 selectMappingStep("embed"); 313 379 } 380 }else{ 381 openSignInTab(getZohoFormsURL($("#zf_domain").val())); 314 382 } 315 383 } … … 369 437 } 370 438 function hideDomainSelctError(){ 371 $("# domainSelectionDiv").removeClass("errorCont");372 $("#domain SelectionErr").hide();439 $("#zDomaindiv").removeClass("zf-wb-errorCont"); 440 $("#domainErr").hide(); 373 441 } 374 442 375 443 function hideError() 376 444 { 377 if(document.getElementById("permaContainer").classList.contains(" errorCont"))378 { 379 document.getElementById("permaContainer").classList.remove(" errorCont");445 if(document.getElementById("permaContainer").classList.contains("zf-wb-errorCont")) 446 { 447 document.getElementById("permaContainer").classList.remove("zf-wb-errorCont"); 380 448 document.getElementById("permaLinkError").style.display="none"; 381 449 } 382 if(document.getElementById("selctContainer").classList.contains(" errorCont")){450 if(document.getElementById("selctContainer").classList.contains("zf-wb-errorCont")){ 383 451 document.getElementById("formSelectionError").style.display="none"; 384 document.getElementById("selctContainer").classList.remove(" errorCont");452 document.getElementById("selctContainer").classList.remove("zf-wb-errorCont"); 385 453 } 386 454 } … … 391 459 { 392 460 document.getElementById("selectForm").classList.add("selected"); 393 if(document.getElementById("selctContainer").classList.contains(" errorCont"))394 { 395 document.getElementById("selctContainer").classList.remove(" errorCont");461 if(document.getElementById("selctContainer").classList.contains("zf-wb-errorCont")) 462 { 463 document.getElementById("selctContainer").classList.remove("zf-wb-errorCont"); 396 464 document.getElementById("formSelectionError").style.display="none"; 397 465 } … … 401 469 if(a.forms.length==0) 402 470 { 403 document.getElementById(" createFormDiv").style.display="block";471 document.getElementById("zfCreateFormDiv").style.display="block"; 404 472 document.getElementById("chooseFormDiv").style.display="none"; 405 document.getElementById("signinDiv").style.display="none";406 473 } 407 474 else 408 475 { 409 476 document.getElementById("chooseFormDiv").style.display="block"; 410 document.getElementById("signinDiv").style.display="none";411 477 } 412 478 } 413 479 else 414 { 415 416 document.getElementById("signinDiv").style.display="block"; 417 418 419 480 { 481 openSignInTab(getZohoFormsURL($("#zf_domain").val())); 420 482 } 421 483 document.getElementById("permaLinkDiv").style.display= "none"; 422 document.getElementById("refreshDiv").style.display="none"; 484 if(a!=""){ 485 document.getElementById("zfRefreshDiv").style.display="none"; 486 } 423 487 document.getElementById("publicLink").className= "none"; 424 488 } … … 436 500 function createForm() 437 501 { 438 var domainValue = $("#z Form_domain").val();502 var domainValue = $("#zf_domain").val(); 439 503 var formsUrl = getZohoFormsURL(domainValue); 440 504 if(formsUrl !=""){ 441 505 window.open(formsUrl); 442 document.getElementById("refreshDiv").style.display="block"; 443 document.getElementById("createFormDiv").style.display="none"; 444 document.getElementById("signinDiv").style.display="none"; 506 document.getElementById("zfRefreshDiv").style.display="flex"; 507 document.getElementById("zfCreateFormDiv").style.display="none"; 445 508 } 446 509 } … … 454 517 var newParam = $(urlParamsDiv).find("div[elname=paramTemplate]").clone(); 455 518 $(newParam).removeAttr("elname"); 456 $(newParam). show();519 $(newParam).css("display", ""); 457 520 $(paramsDiv).append($(newParam)); 458 521 $(urlParamsDiv).slideDown(); … … 465 528 var newParam = $(urlParamsDiv).find("div[elname=paramTemplate]").clone(); 466 529 $(newParam).removeAttr("elname"); 467 $(newParam). show();530 $(newParam).css("display", ""); 468 531 $(newParam).insertAfter($(elem).parent().parent("div[eltype=keyValPair]")); 469 532 } 470 533 471 function showiframeOrJsChange(){472 if($("#jsEmbed").is(":checked")){473 $("#autoHeightDiv").slideDown();474 }else{475 $("#autoHeightDiv").slideUp();476 }477 $("#autoHeightCB").prop("checked",false);478 $("#height").removeProp("disabled");479 $("#height").val("600px");480 481 }482 534 function deleteParam(elem){ 483 535 $(elem).parent().parent("div").remove(); … … 494 546 if(formname !="-Select-"){ 495 547 $("#embedActionsDiv").slideDown(); 496 }else{ 497 $("#embedActionsDiv").slideUp(); 498 } 499 548 selectMappingStep("embed"); 549 } 550 } 551 function selectWidthUnit(elem){ 552 $(elem).siblings("i").removeClass("selected"); 553 $(elem).addClass("selected"); 554 } 555 function allowOnlyNumbers(elem){ 556 var value = elem.value.replace(/[^0-9]/g, ""); 557 if(elem.value !== value){ 558 elem.value = value; 559 } 500 560 } 501 561 function disableHeight(){ 502 562 if($("#autoHeightCB").is(":checked")){ 503 $("#height").prop("disabled",true); 504 $("#height").val(''); 563 $("#formHeightDiv").css("display", ""); 505 564 }else{ 506 $("#height").removeProp("disabled"); 507 $("#height").val('600px'); 565 $("#formHeightDiv").hide(); 508 566 } 509 567 } 510 568 511 569 function hideparamError(elem){ 512 $(elem).parent("div").removeClass(" errorCont");570 $(elem).parent("div").removeClass("zf-wb-errorCont"); 513 571 $("#paramError").hide(); 514 572 } 573 574 jQuery(function(){ 575 /*setTimeout(function(){ 576 if(!window.tinyMCEPopup || !tinyMCEPopup.uiWindow || !url){ 577 return; 578 } 579 var titleEl = tinyMCEPopup.uiWindow.getEl("title"); 580 if(!titleEl || titleEl.getElementsByTagName("img").length){ 581 return; 582 } 583 var icon = titleEl.ownerDocument.createElement("img"); 584 icon.src = url + "/../images/zohoforms.png"; 585 icon.alt = ""; 586 icon.style.width = "18px"; 587 icon.style.height = "18px"; 588 icon.style.marginRight = "8px"; 589 icon.style.verticalAlign = "middle"; 590 titleEl.insertBefore(icon, titleEl.firstChild); 591 }, 0);*/ 592 function setupSelect(selector, onChange){ 593 var $el = jQuery(selector); 594 if(!$el.length || !jQuery.fn.select2 || $el.data("select2")){ 595 return; 596 } 597 $el.select2({ 598 width: "100%", 599 dropdownParent: jQuery(".zf-WpPopupContainer"), 600 minimumResultsForSearch: Infinity 601 }); 602 if(onChange){ 603 $el.on("change.zfSelect2", onChange); 604 } 605 } 606 setupSelect("#zf_domain", hideDomainSelctError); 607 setupSelect("#formname"); 608 jQuery(document).on("mousedown.zfSelect2", function(event){ 609 if(jQuery(event.target).closest(".select2-container").length){ 610 return; 611 } 612 jQuery("#zf_domain, #formname").each(function(){ 613 var $el = jQuery(this); 614 if($el.data("select2")){ 615 $el.select2("close"); 616 } 617 }); 618 }); 619 }); -
zoho-forms/tags/5.0/tinymce/zforms_dialog.php
r3729081 r3748754 15 15 <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/form_utils.js"></script> 16 16 <script type="text/javascript" src="jquery.js"></script> 17 <script type="text/javascript" src="../lib/select2/select2.min.js"></script> 17 18 <script language="javascript" type="text/javascript" src="zforms_dailog.js"></script> 18 <link href="zforms_dailog.css" rel="stylesheet"> 19 </head> 20 <body style="background: rgba(0,0,0,0.7);"> 19 <!-- <link href="zforms_dailog.css" rel="stylesheet"> --> 20 <link href="../lib/select2/select2.min.css" rel="stylesheet"> 21 <link href="../zohoforms-block.css" rel="stylesheet"> 22 <link href="zforms_newdialog.css" rel="stylesheet"> 23 </head> 24 <body style="background: rgba(0,0,0,0.7);"> 21 25 22 <div class="zf-WpPopupContainer ">26 <div class="zf-WpPopupContainer zf-wb-containerWrapper"> 23 27 <div class="zf-WpMainWrap"> 24 28 25 29 <input id="zf_embedCatogory" type="hidden" value="formPerma"> 26 <div class="zf-WpFormPermaWrap" id="zf_tiny_homeDiv" > 27 <p>You can choose a form from your Zoho Form's account or enter your form's permalink</p> 28 <button onclick="showChooseFormDiv();">Access Zoho Forms</button> 29 <span>or</span> 30 <a onclick="embedPerma();">Enter Form Permalink</a> 31 </div> 32 33 <div class="zf-WpEmbeddedWrap zf-EmbedInner" id="permaLinkDiv" style="display:none"> 34 <div class="zf-WpEmbeddedHead"> 35 <span onclick="goToHome();"> 36 <img src="backbtn.jpg"> 37 </span> 38 <h3>Embedded with Permalink</h3> 39 </div> 40 41 42 <div class="zf-WpEmbeddedContainer"> 43 <div class="embeddedPublicLink" id="permaContainer"> 44 <label>Enter your form's public Link <em>*</em></label> 45 <textarea onchange="hideError()" id="permalink"></textarea> 46 <span>Not sure where to find your form's permalink URL? <a href="https://www.zoho.com/forms/help/share/public-sharing.html#link" target="_blank">Click here</a> to learn more.</span> 47 <p id="permaLinkError" style="display:none;"/> 48 </div> 49 </div> 50 </div> 51 <div class="zf-WpEmbeddedWrap zf-EmbedInner" id="chooseFormDiv" style="display: none;"> 52 <div class="zf-WpEmbeddedHead"> 53 <span onclick="goToHome();"><img src="backbtn.jpg"></span> 54 <h3>Choose your form</h3> 55 </div> 56 <div id="domainSelectionDiv" class="zf-WpSelectDomain"> 57 <label>Choose the domain where you've registered your Zoho account.<em>*</em></label> 58 <span class="cusDropArrow"></span> 59 <select id="zForm_domain" onchange="hideDomainSelctError()"; > 60 <option value="-select-">-Select-</option> 61 <option value=".com">zoho.com</option> 62 <option value=".eu">zoho.eu</option> 63 <option value=".com.cn">zoho.com.cn</option> 64 <option value=".in">zoho.in</option> 65 <option value=".com.au">zoho.com.au</option> 66 <option value=".jp">zoho.jp</option> 67 <option value=".ca">zohocloud.ca</option> 68 <option value=".sa">zoho.sa</option> 69 </select> 70 71 <p id="domainSelectionErr" style="display:none">Please choose a domain.</p> 72 <div class="zf-wpFooter" style="border-top: 0px;"> 73 <button onclick="proceedToSelectFormOnTinyMce();">Connect</button> 74 </div> 75 </div> 76 <div class="zf-WpSelectDomain zf-WpSelectFrm" id="formSelectionDiv" style="display:none"> 77 <div id="selctContainer"> 78 <label>Choose a form<em>*</em></label> 79 <span class="cusDropArrow"></span> 80 <select id="formname" onchange="showEmbedActionsDiv();hideError();"; style="width: 100%" > 81 <option value="-Select-">-Select-</option> 82 </select> 83 84 <p id="formSelectionError" /> 85 </div> 86 </div> 87 <div class="zf-WpFormPermaWrap zf-WpFormRefresh" id="signinDiv" style="display:none"> 88 <p> Sign in to your Zoho Forms account to select a form. </p> 89 <div class="zf-wpFooter" style="border-top: 0px;"> 90 <button onclick="signin()">Sign In</button> 91 </div> 92 </div> 93 <div class="zf-WpFormPermaWrap zf-WpFormRefresh" id="createFormDiv" style="display:none"> 94 <p> You have not created any forms yet. Click on Create to build a new form. </p> 95 <div class="zf-wpFooter" style="border-top: 0px;"> 96 <button onclick="createForm()">Create</button> 97 </div> 98 </div> 99 <div class="zf-WpFormPermaWrap zf-WpFormRefresh" id="refreshDiv" style="display:none"> 100 <p> Please Refresh to view your forms. </p> 101 <div class="zf-wpFooter" style="border-top: 0px;"> 102 <button id="button_refresh" onclick="proceedToSelectFormOnTinyMce()">Refresh</button> 103 </div> 104 </div> 105 <div id="loadingDiv" class="zf-WpFormPermaWrap zf-WpFormRefresh" style="display: none;"> 30 <div class="connFormCont"> 31 <div> 32 <!-- <div class="connFormHeader"> 33 <i> 34 <img src="../images/zohoforms.png" alt=""> 35 </i> 36 <h4>Connect Your Form</h4> 37 </div> --> 38 <div class="customAddMapping"> 39 <a id="chooseFormStep" class="is-selected"> 40 <span elname="stepNumber">1</span> 41 <span elname="tickIcon" style="display: none;"> 42 <img src="../images/completed.png" alt=""> 43 </span> 44 <em>Choose Form</em> 45 </a> 46 <a id="configureEmbedStep"> 47 <span elname="stepNumber">2</span> 48 <span elname="tickIcon" style="display: none;"> 49 <img src="../images/completed.png" alt=""> 50 </span> 51 <em>Embed Settings</em> 52 </a> 53 </div> 54 </div> 55 <div id="zf_tiny_homeDiv" class="connFormInnCont"> 56 <div class="zf-wb-signWrapper zconnectMainCont"> 57 <h2>Choose a way to embed your form</h2> 58 <div class="accCardCont"> 59 <div id="accessZohoFormsCard" class="accConectCard" onclick="selectConnectionCard(this);"> 60 <i> 61 <img src="../images/access-form.png" alt=""> 62 </i> 63 <div class="accCardRight"> 64 <h4>Access Zoho Forms</h4> 65 <p>Sign in to Zoho Forms and choose a form.</p> 66 </div> 67 68 </div> 69 <div id="embedUsingPermalinkCard" class="accConectCard" onclick="selectConnectionCard(this);"> 70 <i> 71 <img src="../images/icon-link.png" alt=""> 72 </i> 73 <div class="accCardRight"> 74 <h4>Use a Permalink</h4> 75 <p>Embed a form using its permalink URL.</p> 76 </div> 77 78 </div> 79 </div> 80 </div> 81 <div class="connFormFooter"> 82 <button class="greenBtnNew" onclick="proceedFromHome();">Next</button> 83 </div> 84 </div> 85 86 <div class="zf-wb-outerWrapper" id="chooseFormDiv" style="display: none;"> 87 <div id="loadingDiv" class="zf-wb-loading" style="display: none;"> 106 88 <p>loading</p> 107 89 <div class="zf-wb-spinner"> … … 111 93 </div> 112 94 </div> 113 </div> 114 115 <div class="zf-WpEmbeddedWrap" id="embedActionsDiv" style="display:none"> 116 <div class="embedFormUsing"> 117 <label>Embed form using</label> 118 <div class="flLeft cusRadioButton"> 119 <span> 120 <input name="embedType" id="iframeEmbed" type="radio" value="iframe" checked="" onchange="showiframeOrJsChange();"> 121 <label for="iframeEmbed">Iframe</label> 122 </span> 123 <span> 124 <input name="embedType" id="jsEmbed" type="radio" value="jsCode" onchange="showiframeOrJsChange();"> 125 <label for="jsEmbed">Javascript</label> 126 </span> 127 </div> 128 <div id="autoHeightDiv" style="display:none;" class="flLeft cusCheckBox"> 129 <input type="checkbox" id="autoHeightCB" onchange="disableHeight();"> 130 <label for="autoHeightCB">Set form height automatically.</label> 131 </div> 132 133 <div class="embedFormInputField"> 134 <span> 135 <label>Width</label> 136 <input type="text" value="100%" id="width"> 137 </span> 138 <span> 139 <label>Height</label> 140 <input type="text" value ="600px" id="height"> 141 </span> 142 </div> 143 </div> 144 <div class="embedIncldeParamtrs"> 145 <div class="cusCheckBox"> 146 <input type="checkbox" id="queryParamsCB" onchange="showOrHideUrlParamsDiv();"> 147 <label for="queryParamsCB">Include URL Parameters</label> 148 </div> 149 <span>Include parameters to prefill forms and add referrers to track sources</span> 150 </div> 151 <div class="embedParameterValue" id="urlParamsDiv" style="display:none;"> 152 <div class="embedField"> 153 <div class="embedFiel_Col1"> Parameter Name </div> 154 <div class="embedFiel_Col2"> Parameter Value </div> 95 <div id="zDomaindiv" class="connFormInnCont"> 96 <div class="zf-wb-innerWrapper zconnectMainCont"> 97 <label>Select the domain your Zoho account is registered on. <em>*</em></label> 98 <div class="zf-wb-dropWrapper"> 99 <select id="zf_domain" onchange="hideDomainSelctError();"> 100 <option value="-select-">-Select-</option> 101 <option value=".com">zoho.com</option> 102 <option value=".eu">zoho.eu</option> 103 <option value=".com.cn">zoho.com.cn</option> 104 <option value=".in">zoho.in</option> 105 <option value=".com.au">zoho.com.au</option> 106 <option value=".jp">zoho.jp</option> 107 <option value=".ca">zohocloud.ca</option> 108 <option value=".sa">zoho.sa</option> 109 </select> 110 </div> 111 <p id="domainErr" style="display: none;">Please choose a domain.</p> 112 </div> 113 <div class="connFormFooter"> 114 <button onclick="goToHome();">Back</button> 115 <button class="greenBtnNew" onclick="proceedToSelectFormOnTinyMce();"> 116 <em id="connectLoadingImgElem" class="newBtnLoader" style="display: none;"></em>Connect 117 </button> 118 </div> 119 </div> 120 <div id="zfRefreshDiv" class="refreshCont" style="display: none;"> 121 <img src="../images/refresh-form.png" alt=""> 122 <h3>Sign in on the Zoho page, then come back and refresh to load your forms.</h3> 123 <div class="refFormFooter"> 124 <button onclick="goToHome();">Back</button> 125 <button class="greenBtnNew" onclick="proceedToSelectFormOnTinyMce();"> 126 <em id="refreshLoadingImgElem" class="newBtnLoader" style="display: none;"></em>Refresh 127 </button> 128 </div> 129 </div> 130 <div id="zfCreateFormDiv" class="refreshCont" style="display: none;"> 131 <img src="../images/refresh-form.png" alt=""> 132 <h3>You don't have any forms.</h3> 133 <div class="refFormFooter"> 134 <button class="greenBtnNew" onclick="createForm();"> 135 <em id="createLoadingImgElem" class="newBtnLoader" style="display: none;"></em>Create a new form 136 </button> 137 </div> 138 </div> 139 </div> 140 141 <div id="embedActionsDiv" class="embedActionsDiv" style="display: none;"> 142 <div class="zconnectMainCont"> 143 <div id="formSelectionDiv" class="zf-wb-innerWrapper" style="display: none;"> 144 <div class="zf-wb-innerWrapper" id="selctContainer"> 145 <label>Choose a form <em>*</em></label> 146 <div class="zf-wb-dropWrapper"> 147 <select id="formname" onchange="showEmbedActionsDiv();hideError();"> 148 <option value="-Select-">-Select-</option> 149 </select> 150 </div> 151 <p id="formSelectionError" style="display: none;">Please select a form.</p> 152 </div> 153 </div> 154 <div id="permaLinkDiv" class="zf-wb-outerWrapper" style="display: none;"> 155 <div class="zf-wb-innerWrapper" id="permaContainer"> 156 <label>Enter your form's permalink URL <em>*</em></label> 157 <textarea id="permalink" rows="4" style="width: 100%;" onchange="hideError();"></textarea> 158 <p id="permaLinkError" style="display: none;">Please enter your form's permalink URL.</p> 159 <span>Need help finding your permalink? <a href="https://help.zoho.com/portal/en/kb/forms/sharing-forms/articles/sharing-a-form-publicly#Sharing_a_link" target="_blank">Learn more</a></span> 160 </div> 161 </div> 162 <div class="embedFormDivider"></div> 163 <div class="embedFormUsing"> 164 <div class="embedFormInputField"> 165 <span> 166 <label>Width </label> 167 <div class="embedInputCont"> 168 <input type="text" id="formWidth" placeholder="100" oninput="allowOnlyNumbers(this);"> 169 <div class="embedInputPer"> 170 <i onclick="selectWidthUnit(this);" size_symbol="px">px</i> 171 <i class="selected" onclick="selectWidthUnit(this);" size_symbol="%">%</i> 172 </div> 155 173 </div> 156 <div class="clearBoth"></div> 157 <div class="addparamsWrap" elname="paramTemplate" eltype="keyValPair" style="display:none;"> 158 <div class="addParamaFeld"> 159 <input type="text" elname="paramKey" maxlength="50" onchange="hideparamError(this);"> 160 </div> 161 <div class="intArrow"><em class="arrowImg"></em></div> 162 <div class="addParamaFeld"> 163 <input type="text" elname="value" maxlength="50"> 164 </div> 165 <div class="zf-Wp-plusminus"> 166 <span class="fiedPropPlus" onclick="addUrlParam(this);"></span> 167 <span class="fiedPropMinus" onclick="deleteParam(this);"> </span> 168 </div> 174 175 </span> 176 <div id="autoHeightDiv" class="cusCheckBox autoHeightDiv"> 177 <input type="checkbox" id="autoHeightCB" onchange="disableHeight();"> 178 <label for="autoHeightCB">Set Custom Height.</label> 179 </div> 180 <span id="formHeightDiv" style="display: none;"> 181 <label>Height </label> 182 <div class="embedInputCont"> 183 <input type="text" id="formHeight" class="formHeight" placeholder="600" oninput="allowOnlyNumbers(this);"> 184 <div class="embedInputPer"> 185 <i size_symbol="px">px</i> 169 186 </div> 170 <div elname="paramsDiv">171 187 </div> 172 </div> 173 <div id="paramError" class="errorCont" style="display:none;"> 174 <p>Parameters should contain only alphanumeric characters, underscore, and hyphen.</p> 175 </div> 176 <div class="clearBoth"></div> 177 <div class="zf-wpFooter"> 178 <button onclick="zforms_submit()">Embed</button> 179 </div> 188 189 </span> 190 </div> 191 </div> 192 <div class="embedFormDivider"></div> 193 <div class="embedIncldeParamtrs"> 194 <div class="cusCheckBox"> 195 <input type="checkbox" id="queryParamsCB" onchange="showOrHideUrlParamsDiv();"> 196 <label for="queryParamsCB">Add URL Parameters</label> 197 </div> 198 <span>Prefill form fields and track where responses come from.</span> 199 </div> 200 <div id="urlParamsDiv" class="embedParameterValue" style="display: none;"> 201 <div class="embedField"> 202 <div class="embedFiel_Col1"> 203 <label>Parameter Name</label> 204 </div> 205 <div class="embedFiel_Col2"> 206 <label>Parameter Value </label> 207 </div> 208 </div> 209 <div class="clearBoth"></div> 210 <div elname="paramsDiv"></div> 211 <div class="clearBoth"></div> 212 <div elname="paramTemplate" class="addparamsWrap" eltype="keyValPair" style="display: none;"> 213 <div class="addParamaFeld"> 214 <input type="text" elname="paramKey" maxlength="50" onchange="hideparamError(this);"> 215 </div> 216 <div class="addParamaFeld"> 217 <input type="text" elname="value" maxlength="50"> 218 </div> 219 <div class="zf-Wp-plusminus"> 220 <span class="fiedPropPlus" elname="addParam" onclick="addUrlParam(this);"></span> 221 <span class="fiedPropMinus" elname="deleteParam" onclick="deleteParam(this);"></span> 222 </div> 223 </div> 224 </div> 225 <div class="zf-wb-errorCont" id="paramError" style="display: none;"> 226 <p>Parameters should contain only alphanumeric characters, underscore, and hyphen.</p> 227 </div> 228 </div> 229 <div class="connFormFooter"> 230 <button type="button" onclick="goToHome();">Back</button> 231 <button type="button" class="greenBtnNew" onclick="zforms_submit();"> 232 <em elem="loadingImgElem" class="newBtnLoader" style="display: none;"></em>Embed Form 233 </button> 234 </div> 235 </div> 180 236 </div> 181 237 </div> … … 184 240 </body> 185 241 </html> 186 -
zoho-forms/tags/5.0/tinymce/zforms_editor_plugin.js
r3729081 r3748754 17 17 title : 'Zoho Forms', 18 18 cmd : 'zforms_embed_window', 19 image : url+'/ zohoforms.png',19 image : url+'/../images/zohoforms.png', 20 20 }); 21 21 return false; -
zoho-forms/tags/5.0/zohoForms.php
r3729081 r3748754 5 5 Plugin URI: http://wordpress.org/extend/plugins/zohoforms 6 6 Description: Try Zoho Forms, the best WordPress contact form plugin! Create contact, payment & custom forms with a drag and drop builder. Get started for free! 7 Version: 4.17 Version: 5.0 8 8 Author: Zoho Forms 9 9 Author URI: https://forms.zoho.com … … 11 11 12 12 // Keep in sync with the Version header above. 13 define('ZOHO_FORMS_VERSION', ' 4.1');13 define('ZOHO_FORMS_VERSION', '5.0'); 14 14 15 15 //Shortcode for embeding the form … … 148 148 function loadZohoFormsBlockFiles() { 149 149 wp_enqueue_script( 150 'zoho-forms-select2', 151 plugin_dir_url(__FILE__) . 'lib/select2/select2.min.js', 152 array('jquery'), 153 '4.0.13', 154 true 155 ); 156 wp_enqueue_script( 150 157 'zoho-forms-block-js', 151 158 plugin_dir_url(__FILE__) . 'zohoforms-block.js', 152 array('wp-blocks', 'wp-element', 'wp-block-editor', 'wp-i18n', 'jquery' ),159 array('wp-blocks', 'wp-element', 'wp-block-editor', 'wp-i18n', 'jquery', 'zoho-forms-select2'), 153 160 ZOHO_FORMS_VERSION, 154 161 true … … 156 163 wp_localize_script( 'zoho-forms-block-js', 'zohoFormsBlock', array( 157 164 'blockCSS' => plugin_dir_url(__FILE__) . 'zohoforms-block.css', 158 'favIconPath' => plugin_dir_url(__FILE__) . 'tinymce/zFormsIcon.png' 165 'select2CSS' => plugin_dir_url(__FILE__) . 'lib/select2/select2.min.css', 166 'favIconPath' => plugin_dir_url(__FILE__) . 'images/zFormsIcon.png', 167 'accessFormIcon' => plugin_dir_url(__FILE__) . 'images/access-form.png', 168 'permalinkIcon' => plugin_dir_url(__FILE__) . 'images/icon-link.png', 169 'refreshFormIcon' => plugin_dir_url(__FILE__) . 'images/refresh-form.png', 170 'zohoFormsIcon' => plugin_dir_url(__FILE__) . 'images/zohoforms.png', 171 'completedIcon' => plugin_dir_url(__FILE__) . 'images/completed.png' 159 172 ) ); 160 173 } -
zoho-forms/tags/5.0/zohoforms-block.css
r3729081 r3748754 1 .body{ 2 margin: 0; 3 padding: 0; 4 font-family: Arimo, Helvetica, sans-serif; 5 6 } 7 8 input:focus, textarea:focus, select:focus{ outline: none !important; border-color: #24A68A !important; box-shadow: none !important;} 9 button:focus{outline: none;} 10 button{cursor: pointer;} 11 12 .clearBoth{ 13 clear:both; 14 } 15 16 .flLeft{ 17 float:left; 18 } 19 20 .flRight{ 21 float:right; 22 } 23 24 .zf-wb-containerWrapper{ 25 letter-spacing:0.5px; 26 width: 100%; 27 padding: 0 10px; 28 padding-top: 10px; 29 } 30 31 .zf-wb-tabToggle{ 32 width: 60%; 33 margin:0 auto; 34 font-size: 14px; 35 font-weight: 400; 36 margin-bottom: 10px; 37 } 38 39 .zf-wb-tabToggle ul{ 40 display: table; 41 width: 100%; 42 padding: 0; 43 margin: 0 !important; 44 } 45 46 .zf-wb-tabToggle ul li{ 47 padding:6px 8px; 48 border-collapse: collapse; 49 border-width: 1px 0 1px 1px; 50 border-color: #d8d8d8; 51 border-style: solid; 52 overflow: hidden; 53 display: table-cell; 54 text-align: center; 55 cursor: pointer; 56 width: 50%; 57 } 58 59 .zf-wb-tabToggle ul li:last-child{ 60 border-width: 1px; 61 -webkit-border-radius:0px 25px 25px 0; 62 -moz-border-radius:0px 25px 25px 0; 63 border-radius:0px 25px 25px 0; 64 } 65 66 .zf-wb-tabToggle ul li:first-child{ 67 -webkit-border-radius:25px 0 0 25px; 68 -moz-border-radius:25px 0 0 25px; 69 border-radius:25px 0 0 25px; 70 } 71 72 .zf-wb-tabToggle ul li.active{ 73 border:1px solid #007AFF; 74 background: #007AFF; 75 color: #fff; 76 cursor: default; 77 } 78 79 .zf-wb-tabToggle ul li.active ~ li{ 80 border-width: 1px 1px 1px 0; 81 } 82 83 .zf-wb-outerWrapper{ font-size: 14px !important;} 84 .zf-wb-outerWrapper .zf-wb-desc{ font-size: 14px; color: #666; text-align: center; margin-bottom:20px;} 85 .zf-wb-outerWrapper .zf-wb-innerWrapper{ padding-bottom:20px;} 86 .zf-wb-outerWrapper .zf-wb-innerWrapper label{ display: block;margin-bottom:5px;} 87 .zf-wb-outerWrapper .zf-wb-innerWrapper label em{ color:#ff0000;font-size:16px;} 88 89 .zf-wb-outerWrapper .zf-wb-innerWrapper input, .zf-wb-outerWrapper .zf-wb-innerWrapper textarea{ width: 100%; border:1px solid #d6d6d6;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:4px; font-size: 14px;} 90 91 .zf-wb-outerWrapper .zf-wb-twoColumns .zf-wb-innerWrapper{ width: 45%;} 92 93 .zf-wb-errorCont input, .zf-wb-errorCont textarea{ border: 1px solid #ff0000 !important;} 94 95 .zf-wb-errorCont input:focus, .zf-wb-errorCont textarea:focus{ border:1px solid #ff0000 !important; -moz-box-shadow: none !important;-webkit-box-shadow: none !important;box-shadow: none !important;} 96 97 .zf-wb-errorCont p{font-size:13px !important; color:#ff0000; margin:0 !important; padding-top:3px;} 98 99 .zf-wb-Fotter{ text-align:center; border-top: 1px solid #d6d6d6; padding:20px 0; padding-bottom: 10px; margin-top: -1px;} 100 .zf-wb-Fotter button{ padding:6px 18px; border: 1px solid #d6d6d6; font-size: 14px !important; margin: 0 5px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px; line-height: 21px !important;} 101 .zf-wb-blue{border: 1px solid #24A68A;background: #24A68A;color: #fff;border-radius: 3px;font-size: 14px;cursor: pointer;padding: 10px 12px;display: inline-block;} 102 .zf-wb-red{background:#f04b2f; color:#fff !important; border:1px solid #f04b2f !important;} 103 .zf-wb-green{background:#00A552; color:#fff !important; border:1px solid #00A552 !important;} 104 .zf-wb-white{background:#fff; border:1px solid #adadad !important;} 105 106 .zf-wb-signWrapper{ text-align: center; font-size: 14px; padding: 10px 0 20px 0; margin-bottom: 10px;} 107 .zf-wb-signWrapper p{ margin: 0 !important;font-size: 15px !important;line-height: 23px !important;margin-bottom: 15px !important;} 108 .zf-wb-signWrapper button{ padding:6px 18px; border: 1px solid #d6d6d6; font-size: 14px !important; margin: 0 5px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px; margin-top: 5px;} 109 110 .zf-wb-dropWrapper{ border:1px solid #d6d6d6; position: relative; height:32px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px; overflow: hidden;} 111 .zf-wb-dropWrapper::before{ content: "";right: 12px;top: 11px; position: absolute;width: 0; height: 0; border-left: 6px solid transparent;border-right: 6px solid transparent;border-top: 7px solid #222;} 112 113 .zf-wb-dropWrapper select{ 114 position: absolute; 115 top: 0; 116 border: 0 none !important; 117 width: 100%; 118 max-width: 100%; 119 outline: none !important; 120 -moz-outline: none !important; 121 margin: 0; 122 appearance: none; 123 -moz-appearance: radio-container; 124 -webkit-appearance: none; 125 background: transparent; 126 text-overflow: ''; 127 webkit-user-select: none; 128 -moz-user-select: none; 129 -ms-user-select: none; 130 -o-user-select: none; 131 user-select: none; 132 text-indent: 2px; 133 white-space: nowrap; 134 text-overflow: ellipsis; 135 height: auto; 136 font-size: 14px !important; 137 padding-bottom: 5px; 138 line-height: inherit;; 139 } 140 .zf-wb-dropWrapper select:hover{color:#444 !important;} 141 .zf-wb-dropWrapper select:focus, .zf-wb-dropWrapper select:hover, .zf-wb-dropWrapper select option{-moz-outline: none !important; outline: none !important; border:none; -moz-box-shadow: none !important;-webkit-box-shadow: none !important;box-shadow: none !important;outline-offset: -2px !important; color: #444;} 142 select:-moz-focusring {color: transparent !important;text-shadow: 0 0 0 #000 !important;} 143 .zf-wb-infoDiv { position: relative;border-radius: 100px;border: 2px solid #1a75ef;width: 38px;height: 38px;z-index: 9999999;padding: 5px;line-height: 33px;text-align: center;display: inline-block;margin-bottom: 15px;} 144 .zf-wb-infoDiv:before { position: absolute;content: "i";color: #1a75ef;font-size: 20px;left: 15px;font-weight: 600;top: 0;} 145 .zf-wb-signWrapper a { color: #24A68A !important;cursor: pointer;text-decoration: underline !important;box-shadow: none !important;font-size: 16px;} 146 .zf-wb-signWrapper label {margin: 0 12px !important;font-size: 15px;color: #999;cursor: default;} 147 .zf-wb-headwrap { border-bottom: 1px solid #ccc; padding: 0 0 12px 0; margin-bottom: 20px;} 148 .zf-wb-heading { padding: 0 0 0 42px;font-size: 17px;font-weight: 600;} 149 .zf-wb-backIocn { position: relative; border: 1px solid #ccc; width: 23px; height: 23px; float: left; cursor: pointer; margin: 2px 0 0 0;} 150 .zf-wb-backIocn svg { display: inline-block; width: 15px; height: 17px; stroke-width: 0; stroke: currentColor; fill: #a2a2a2; position: absolute; left: 2px; top: -1px;} 151 .zf-wb-innerWrapper span { color: #777;} 152 .zf-wb-innerWrapper a:hover { box-shadow: none !important;color: #24A68A !important;} 153 .zf-wb-innerWrapper a { color: #24A68A !important;text-decoration: underline !important;box-shadow: none !important;} 154 .zf-wb-connect-btn{ text-align: center;border-top: none;} 155 .zf-wb-errorCont .zf-wb-dropWrapper { border: 1px solid #ff0000;} 156 .zf-wb-loading{ text-align: center;} 157 .zf-wb-loading p{ display: inline;padding: 0 10px 0 0px !important;} 158 .zf-wb-lightblue { background: #E3F0FF; color: #153C69; border: 1px solid #C8E1FE !important; 159 } 160 .zf-wb-dropWrapper select{height: 32px;} 161 162 /*loading animation */ 163 .zf-wb-spinner { text-align: center;display: inline;position: relative;top: 2px;} 164 .zf-wb-spinner > div { 165 width: 11px; 166 height: 11px; 167 background-color: #333; 168 169 border-radius: 100%; 170 display: inline-block; 171 -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both; 172 animation: sk-bouncedelay 1.4s infinite ease-in-out both; 173 } 174 175 .zf-wb-spinner .bounce1 { 176 -webkit-animation-delay: -0.32s; 177 animation-delay: -0.32s; 178 } 179 180 .zf-wb-spinner .bounce2 { 181 -webkit-animation-delay: -0.16s; 182 animation-delay: -0.16s; 183 } 184 185 @-webkit-keyframes sk-bouncedelay { 186 0%, 80%, 100% { -webkit-transform: scale(0) } 187 40% { -webkit-transform: scale(1.0) } 188 } 189 190 @keyframes sk-bouncedelay { 191 0%, 80%, 100% { 192 -webkit-transform: scale(0); 193 transform: scale(0); 194 } 40% { 195 -webkit-transform: scale(1.0); 196 transform: scale(1.0); 197 } 198 } 199 200 .zf-WpEmbeddedWrap { 201 padding: 0 25px; 202 } 203 .zf-WpEmbeddedWrap .zf-WpSelectFrm .cusDropArrow { 204 top: 60px; 205 } 206 .embedFormUsing label { 207 font-size: 15px; 208 margin-bottom: 12px; 209 display: inline-block; 210 } 211 .embedFormUsing { 212 padding-bottom: 15px; 213 margin-bottom: 15px; 214 } 215 .cusRadioButton span { 216 margin-right: 25px; 217 } 218 .cusRadioButton [type="radio"]:checked, .cusRadioButton [type="radio"]:not(:checked) { 1 .body{ 2 margin: 0; 3 padding: 0; 4 font-family: Arimo, Helvetica, sans-serif; 5 6 } 7 8 input:focus, textarea:focus, select:focus{ outline: none !important; border-color: #24A68A !important; box-shadow: none !important;} 9 button:focus{outline: none;} 10 button{cursor: pointer;} 11 12 .clearBoth{ 13 clear:both; 14 } 15 16 .flLeft{ 17 float:left; 18 } 19 20 .flRight{ 21 float:right; 22 } 23 24 25 .zconnectMainCont { 26 padding: 24px 32px; 27 min-height: 290px; 28 box-sizing: border-box; 29 } 30 .zf-wb-outerWrapper .zf-wb-desc{ font-size: 14px; color: #666; text-align: center; margin-bottom:20px;} 31 .zf-wb-outerWrapper .zf-wb-innerWrapper h4{ 32 font-size: 13px; 33 color: #454e5c; 34 margin: 0; 35 margin-bottom: 14px; 36 } 37 .zf-wb-innerWrapper label { 38 font-size: 14px; 39 color: #222; 40 font-weight: 500; 41 margin-bottom: 8px; 42 display: block; 43 } 44 .zf-wb-outerWrapper label em{ color:#ff0000;font-size:16px;} 45 46 .zf-wb-outerWrapper .zf-wb-innerWrapper input, .zf-wb-outerWrapper .zf-wb-innerWrapper textarea{ width: 100%; border:1px solid #d6d6d6;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;padding:4px; font-size: 14px;} 47 .zf-wb-outerWrapper .zf-wb-innerWrapper textarea { 48 height: 105px; 49 box-sizing: border-box; 50 padding: 12px; 51 } 52 53 54 .zf-wb-errorCont input, .zf-wb-errorCont textarea{ border: 1px solid #ff0000 !important;} 55 56 .zf-wb-errorCont input:focus, .zf-wb-errorCont textarea:focus{ border:1px solid #ff0000 !important; -moz-box-shadow: none !important;-webkit-box-shadow: none !important;box-shadow: none !important;} 57 58 .zf-wb-errorCont p{font-size:13px !important; color:#ff0000; margin: 0; 59 margin-bottom: 4px;} 60 .zf-wb-dropWrapper{ 61 border: 1px solid #ccd6e0; 62 position: relative; 63 height: 38px; 64 -moz-border-radius: 4px; 65 -webkit-border-radius: 4px; 66 border-radius: 4px; 67 overflow: hidden; 68 margin-bottom: 6px; 69 } 70 .zf-wb-dropWrapper::before{ content: ""; 71 right: 18px; 72 position: absolute; 73 border-left: 6px solid transparent; 74 border-right: 6px solid transparent; 75 border-top: 17px solid #222; 76 border: solid #222; 77 border-width: 0 1.5px 1.5px 0; 78 top: 17px; 79 width: 10px; 80 height: 10px; 81 box-sizing: border-box; 82 transform: rotate(45deg);} 83 84 .zf-wb-dropWrapper select{ 219 85 position: absolute; 220 left: -9999px; 221 } 222 .cusRadioButton [type="radio"]:checked + label, .cusRadioButton [type="radio"]:not(:checked) + label { 223 position: relative; 224 padding-left: 26px !important; 225 cursor: pointer; 226 line-height: 16px; 227 display: inline-block; 228 color: #444; 86 top: 0; 87 border: 0 none !important; 88 width: 100%; 89 max-width: 100%; 90 outline: none !important; 91 -moz-outline: none !important; 229 92 margin: 0; 230 font-weight: normal; 231 font-size: 15px; 232 } 233 .cusRadioButton [type="radio"]:checked + label:before, .cusRadioButton [type="radio"]:not(:checked) + label:before { 234 content: ''; 235 position: absolute; 236 left: 0; 237 top: 0; 238 width: 15px; 239 height: 15px; 240 border: 1px solid #24A68A; 241 border-radius: 100%; 242 background: #fff; 243 } 244 .cusRadioButton [type="radio"]:checked + label:after { 245 opacity: 1; 246 -webkit-transform: scale(1); 247 transform: scale(1); 248 } 249 250 .cusRadioButton [type="radio"]:checked + label:after, .cusRadioButton [type="radio"]:not(:checked) + label:after { 251 content: ''; 252 width: 9px; 253 height: 9px; 254 background: #24A68A; 255 position: absolute; 256 top: 3px; 257 left: 3px; 258 border-radius: 100%; 259 -webkit-transition: all 0.2s ease; 260 transition: all 0.2s ease; 261 } 262 .cusRadioButton [type="radio"]:not(:checked) + label { 263 color: #444; 264 } 265 .cusRadioButton [type="radio"]:not(:checked) + label:after { 266 opacity: 0; 267 -webkit-transform: scale(0); 268 transform: scale(0); 269 } 270 .cusRadioButton { 271 margin-bottom: 20px; 272 } 273 274 .cusCheckBox [type="checkbox"] { 275 border: 0; 276 clip: rect(1px, 1px, 1px, 1px); 277 -webkit-clip-path: inset(50%); 278 clip-path: inset(50%); 279 height: 1px; 280 overflow: hidden; 281 padding: 0; 282 position: absolute; 283 width: 1px; 284 white-space: nowrap; 285 } 286 .cusCheckBox [type="checkbox"] + label { 287 position: relative; 288 -webkit-user-select: none; 93 appearance: none; 94 -moz-appearance: radio-container; 95 -webkit-appearance: none; 96 background: transparent; 97 text-overflow: ''; 98 webkit-user-select: none; 289 99 -moz-user-select: none; 290 100 -ms-user-select: none; 101 -o-user-select: none; 291 102 user-select: none; 103 text-indent: 2px; 104 white-space: nowrap; 105 text-overflow: ellipsis; 106 height: auto; 107 font-size: 14px !important; 108 padding-bottom: 5px; 109 line-height: inherit;; 110 } 111 112 .zf-wb-innerWrapper a { color: #24A68A !important;text-decoration: underline !important;box-shadow: none !important;} 113 .zf-wb-innerWrapper span { color: #454e5c; 114 font-size: 13px; 115 display: flex; 116 flex-wrap: wrap; 117 gap: 4px;} 118 .zf-wb-dropWrapper select{ height: 51px; 119 padding-left: 18px; 120 color: #222; 121 font-size: 16px !important;} 122 123 124 .cusCheckBox [type="checkbox"] { 125 border: 0; 126 clip: rect(1px, 1px, 1px, 1px); 127 -webkit-clip-path: inset(50%); 128 clip-path: inset(50%); 129 height: 1px; 130 overflow: hidden; 131 padding: 0; 132 position: absolute; 133 width: 1px; 134 white-space: nowrap; 135 } 136 .cusCheckBox [type="checkbox"] + label { 137 position: relative; 138 -webkit-user-select: none; 139 -moz-user-select: none; 140 -ms-user-select: none; 141 user-select: none; 142 cursor: pointer; 143 line-height: 17px; 144 padding-left: 26px; 145 display: inline-block; 146 font-size: 14px; 147 color: #222 !important; 148 } 149 .cusCheckBox [type="checkbox"]:not(:checked) + label:before, .cusCheckBox [type="checkbox"]:not(:checked) + .decisionCusCheckBox:before { 150 border: 1px solid #afafaf; 151 background: #fff; 152 } 153 .cusCheckBox [type="checkbox"] + label::before{ 154 155 background-color: #24A68A; 156 border: 1px solid #24A68A; 157 box-sizing: content-box; 158 content: ''; 159 color: #444; 160 margin-right: 7px; 161 top: -1px; 162 left: 0; 163 width: 16px; 164 height: 16px; 165 display: inline-block; 166 vertical-align: middle; 167 position: absolute; 168 border-radius: 3px; 169 } 170 .cusCheckBox [type="checkbox"]:checked + label::after{ 171 content: ''; 172 -webkit-transform: rotate(-45deg) scale(1); 173 transform: rotate(-45deg) scale(1); 174 transition: -webkit-transform 200ms ease-out; 175 transition: transform 200ms ease-out; 176 transition: transform 200ms ease-out, -webkit-transform 200ms ease-out; 177 } 178 179 .cusCheckBox [type="checkbox"] + label::after { 180 background-color: transparent; 181 top: 9.5px; 182 left: 4px; 183 position: absolute; 184 width: 9.2px; 185 height: 3px; 186 margin-top: calc(24px / -2 / 2 * 0.8); 187 border-style: solid; 188 border-color: #fff; 189 border-width: 0 0 2px 2px; 190 border-radius: 0; 191 -o-border-image: none; 192 border-image: none; 193 -webkit-transform: rotate(-45deg) scale(0); 194 transform: rotate(-45deg) scale(0); 195 transition: none; 196 } 197 198 .cusCheckBox { 199 margin-bottom: 3px; 200 display: flex; 201 } 202 .autoHeightDiv.cusCheckBox [type="checkbox"] + label { 203 color: #475568 !important; 204 font-weight: 400; 205 margin-bottom: 0; 206 } 207 .embedInputCont { 208 position: relative; 209 display: inline-flex; 210 align-items: center; 211 } 212 .embedInputCont input { 213 padding-right: 40px; 214 } 215 .embedInputCont input[type="text"].formHeight { 216 padding-right: 50px; 217 } 218 .embedInputPer { 219 display: flex; 220 position: absolute; 221 right: 3px; 222 background: #f0f4fb; 223 border-radius: 4px; 224 } 225 .embedInputPer i { 226 font-size: 13px; 227 color: #222; 228 border: 1px solid transparent; 229 width: 36px; 230 height: 29px; 231 display: flex; 232 justify-content: center; 292 233 cursor: pointer; 293 line-height: 17px; 294 padding-left: 30px; 295 display: inline-block; 296 font-size: 15px; 297 } 298 .cusCheckBox [type="checkbox"]:not(:checked) + label:before, .cusCheckBox [type="checkbox"]:not(:checked) + .decisionCusCheckBox:before { 299 border: 1px solid #ddd; 234 font-style: normal; 235 line-height: 28px; 236 } 237 .embedInputPer i.selected { 238 background: #fafffe; 239 border: 1px solid #7acab8; 240 border-radius: 4px; 241 cursor: default; 242 } 243 244 .embedFormInputField { 245 display: flex; 246 flex-flow: column; 247 width: 100%; 248 margin-bottom: 10px; 249 gap: 16px; 250 } 251 .embedFormInputField span { 252 253 } 254 .embedFormInputField label { 255 font-size: 13px; 256 display: block; 257 margin-bottom: 8px; 258 color: #222; 259 font-weight: 600; 260 } 261 .embedFormInputField span:last-child { 262 float: right; 263 } 264 .embedFormInputField input[type="text"] { 265 width: 140px; 266 box-sizing: border-box; 267 border-radius: 4px; 268 border: 1px solid #ccd6e0; 269 padding: 7px 87px 7px 10px; 270 font-size: 13px; 271 height: 38px; 272 } 273 .embedIncldeParamtrs span { 274 font-size: 14px; 275 color: #6b6b6b; 276 line-height: 23px; 277 margin-bottom: 15px; 278 margin-top: 10px; 279 display: flex; 280 flex-wrap: wrap; 281 } 282 .embedParameterValue { 283 border: 1px solid #eaeaea; 284 display: inline-block; 285 width: 100%; 286 padding-bottom: 7px; 287 border-radius: 4px; 288 margin-bottom: 10px; 289 } 290 .embedField { 291 background: #f3f5f9; 292 border-bottom: 1px solid #eaeaea; 293 padding: 10px 20px; 294 display: inline-block; 295 width: 100%; 296 box-sizing: border-box; 297 border-radius: 3px 3px 0 0; 298 } 299 .embedIncldeParamtrs label { 300 font-size: 15px; 301 font-weight: 500; 302 } 303 304 .embedFiel_Col1 { 305 width: 270px; 306 float: left; 307 font-size: 14px; 308 color: #000; 309 font-weight: 500; 310 } 311 .embedFiel_Col2 { 312 width: 270px; 313 float: left; 314 font-size: 14px; 315 color: #000; 316 font-weight: 500; 317 margin-left: 25px; 318 } 319 .addparamsWrap { 320 display: flex; 321 align-items: center; 322 gap: 16px; 323 width: 100%; 324 float: left; 325 padding: 14px 20px; 326 border-bottom: 1px solid #eaeaea; 327 box-sizing: border-box; 328 } 329 .addparamsWrap:last-of-type { 330 border-bottom: none; 331 } 332 .fiedPropPlus, .fiedPropMinus{ 333 width: 24px; 334 height: 24px; 335 background: url(./images/fieldprop-plus.png) no-repeat; 336 background-size: contain; 337 margin-top: 2px; 338 float: left; cursor: pointer; 339 left: 0px !important; 340 } 341 .fiedPropMinus { 342 background: url(./images/fieldprop-minus.png) no-repeat; 343 background-size: contain; 344 margin-left: 8px; 345 } 346 .addParamaFeld { 347 flex-grow: 1; 348 width: 220px; 349 } 350 .addParamaFeld input[type="text"] { 351 width: 100%; 352 border-radius: 3px; 353 border: 1px solid #ccd6e0; 354 box-sizing: border-box; 355 padding: 7px 10px; 356 font-size: 13px; 357 height: 36px; 358 } 359 input[type="text"]:disabled { 360 background: #ececec; 361 } 362 363 364 365 366 /* Rewamp UI Css Start */ 367 .connFormCont { 368 background: #fff; 369 border: 1px solid #ddd; 370 border-radius: 8px; 371 } 372 .connFormHeader { 373 width: 100%; 374 box-sizing: border-box; 375 padding: 20px 32px; 376 display: flex; 377 align-items: center; 378 border-bottom: 1px solid rgba(230, 230, 230, 0.6); 379 border-radius: 8px 8px 0 0; 380 flex-shrink: 0; 381 position: relative; 382 background: #fff; 383 overflow: hidden; 384 } 385 .connFormHeader i { 386 width: 32px; 387 height: 32px; 388 } 389 .connFormHeader i img { 390 width: 32px; 391 height: 32px; 392 } 393 .connFormHeader h4 { 394 font-size: 18px; 395 color: #000; 396 font-weight: bold; 397 overflow: hidden; 398 text-overflow: ellipsis; 399 text-align: left; 400 margin: 0; 401 margin-left: 12px; 402 padding: 0; 403 } 404 .connFormHeader i { 405 width: 22px; 406 height: 22px; 407 } 408 .connFormHeader i img { 409 width: 22px; 410 height: 22px; 411 } 412 .connFormFooter { 413 width: 100%; 414 grid-gap: 16px; 415 padding: 18px 32px; 416 border-top: 1px solid #ddd; 417 box-sizing: border-box; 418 display: flex; 419 justify-content: end; 420 align-items: center; 421 } 422 .connFormFooter button { 423 border-radius: 50px; 424 padding: 12px 32px; 425 background: #fff; 426 border: 1px solid #d3dce0; 427 font-size: 14px; 428 min-width: 105px; 429 position: relative; 430 } 431 .connFormFooter button:hover { 432 border: 1px solid #d3dce0; 433 background: rgb(241 244 247 / 50%); 434 } 435 .connFormFooter .greenBtnNew { 436 background: #24a68a; 437 color: #fff; 438 border: 1px solid #24a68a; 439 } 440 .connFormFooter .greenBtnNew:hover, 441 .refFormFooter .greenBtnNew:hover { 442 box-shadow: 0px 6px 45px 0px rgba(0, 0, 0, 0.18) inset; 443 background: #24a68a; 444 border: 1px solid #24a68a; 445 } 446 .customAddMapping { 447 display: flex; 448 align-items: center; 449 justify-content: space-evenly; 450 padding: 10px 0; 451 border-bottom: 1px solid rgba(230, 230, 230, 0.6); 452 background: #f6f8fb; 453 position: relative; 454 } 455 .customAddMapping::before { 456 content: ""; 457 position: absolute; 458 width: 50%; 459 border-top: 1px dashed #a3a6b0; 460 } 461 .customAddMapping a { 462 background: #f6f8fb; 463 position: relative; 464 padding: 0 10px; 465 display: flex; 466 align-items: center; 467 } 468 .customAddMapping span { 469 display: inline-flex; 470 align-items: center; 471 justify-content: center; 472 width: 27px; 473 height: 27px; 474 border-radius: 10px; 475 background: #fff; 476 border: 1px solid #e3dddd; 477 font-size: 12px; 478 color: #444; 479 font-weight: 500; 480 margin-right: 8px; 481 } 482 .customAddMapping a.is-selected span { 483 border: 1px solid transparent; 484 background: #24a68a; 485 color: #fff; 486 } 487 .customAddMapping span img { 488 width: 14px; 489 } 490 .customAddMapping em { 491 color: #222; 492 font-size: 14px; 493 font-weight: 500; 494 max-width: 200px; 495 overflow: hidden; 496 text-overflow: ellipsis; 497 white-space: nowrap; 498 display: inline-block; 499 padding-right: 2px; 500 font-style: normal; 501 } 502 .customAddMapping a.is-selected em { 503 color: #23a689; 504 } 505 .zf-wb-signWrapper { 506 display: flex; 507 box-sizing: border-box; 508 width: 100%; 509 padding: 32px; 510 text-align: left; 511 flex-direction: column; 512 overflow: hidden; 513 overflow-y: auto; 514 position: relative; 515 } 516 .zf-wb-signWrapper h2 { 517 font-size: 15px; 518 color: #000; 519 font-weight: 500; 520 margin: 0; 521 margin-bottom: 12px; 522 } 523 .accCardCont { 524 display: flex; 525 flex-flow: column; 526 gap: 20px; 527 } 528 .accConectCard { 529 border: 1px solid #e2e8ef; 530 border-radius: 12px; 531 padding: 20px; 532 cursor: pointer; 533 display: flex; 534 align-items: center; 535 gap: 20px; 536 } 537 .accConectCard:hover { 538 border: 1px solid #c2c8ce; 539 } 540 .accConectCard.selected { 541 border: 1px solid #23a689; 542 background: #fafffe; 543 } 544 .accConectCard i { 545 width: 50px; 546 height: 50px; 547 border: 1px solid #e2e8ef; 548 border-radius: 12px; 300 549 background: #fff; 301 } 302 .cusCheckBox [type="checkbox"] + label::before{ 303 304 background-color: #fff; 305 border: 1px solid #24A68A; 306 box-sizing: content-box; 307 content: ''; 308 color: #444; 309 margin-right: 7px; 310 top: 0; 311 left: 0; 312 width: 15px; 313 height: 15px; 314 display: inline-block; 315 vertical-align: middle; 316 position: absolute; 317 } 318 .cusCheckBox [type="checkbox"]:checked + label::after{ 319 content: ''; 320 -webkit-transform: rotate(-45deg) scale(1); 321 transform: rotate(-45deg) scale(1); 322 transition: -webkit-transform 200ms ease-out; 323 transition: transform 200ms ease-out; 324 transition: transform 200ms ease-out, -webkit-transform 200ms ease-out; 325 } 326 327 .cusCheckBox [type="checkbox"] + label::after { 328 background-color: transparent; 329 box-sizing: content-box; 330 content: ''; 331 position: absolute; 332 top: 9px; 333 left: 4px; 334 width: 7px; 335 height: 4px; 336 margin-top: calc(24px / -2 / 2 * 0.8); 337 border-style: solid; 338 border-color: #24A68A; 339 border-width: 0 0 2px 2px; 340 border-radius: 0; 341 -o-border-image: none; 342 border-image: none; 343 -webkit-transform: rotate(-45deg) scale(0); 344 transform: rotate(-45deg) scale(0); 345 transition: none; 346 } 347 348 .cusCheckBox { 349 margin-bottom: 3px; 350 } 351 352 .embedFormInputField { 353 display: inline-block; 354 width: 100%; 355 margin-bottom: 10px; 356 margin-top: 10px; 357 } 358 .embedFormInputField span { 359 width: 45%; 360 float: left; 550 display: flex; 551 align-items: center; 552 justify-content: center; 553 box-sizing: border-box; 554 flex-shrink: 0; 555 } 556 .accConectCard i img { 557 width: 18px; 558 } 559 .accConectCard h4 { 560 font-size: 15px; 561 color: #000; 562 font-weight: 500; 563 margin: 0; 564 margin-bottom: 6px; 565 } 566 .accConectCard p { 567 color: #454e5c; 568 font-size: 14px; 569 line-height: 150%; 570 margin: 0; 571 font-weight: 400; 572 } 573 .embedFormDivider { 574 width: 100%; 575 height: 1px; 576 background: #e2e8ef; 577 margin: 24px 0; 578 } 579 .tabs { 580 display: inline-flex; 581 width: auto; 582 border: 1px solid #d0d8e2; 583 border-radius: 3px; 584 height: 38px; 585 margin-bottom: 24px; 586 box-sizing: border-box; 587 } 588 589 .tab { 590 background: #fff; 591 border-radius: 3px; 592 color: #46546a; 593 font-size: 14px; 594 cursor: pointer; 595 padding: 10px 24px; 596 border: none; 597 outline: none; 598 width: 119px; 599 } 600 601 .tab.active { 602 color: #24a68a; 603 border-radius: 0 0 0 0; 604 background: #fbfffe; 605 position: relative; 606 } 607 .tab.active:before { 608 position: absolute; 609 left: -1px; 610 top: -1px; 611 right: -1px; 612 bottom: -1px; 613 content: ""; 614 border: 1px solid #24a68a; 615 border-radius: 3px; 616 } 617 618 .refreshCont { 619 padding: 24px 32px; 620 display: flex; 621 flex-flow: column; 622 align-items: center; 623 justify-content: center; 624 min-height: 360px; 625 } 626 .refreshCont img { 627 width: 120px; 628 height: 120px; 629 margin-bottom: 16px; 630 } 631 .refreshCont h3 { 632 font-size: 14px; 633 color: #222; 634 margin-bottom: 28px; 635 font-weight: 600; 636 } 637 .refFormFooter { 638 display: flex; 639 align-items: center; 640 justify-content: center; 641 gap: 16px; 642 } 643 .refFormFooter button { 644 border-radius: 50px; 645 padding: 12px 32px; 646 background: #fff; 647 border: 1px solid #d3dce0; 648 font-size: 14px; 649 min-width: 105px; 650 position: relative; 651 } 652 .refFormFooter .greenBtnNew { 653 background: #24a68a; 654 color: #fff; 655 border: 1px solid #24a68a; 656 } 657 .newBtnLoader { 658 font-size: 7px; 659 float: left; 660 margin: 2px 6px 0 0; 661 text-indent: -9999em; 662 width: 2em; 663 height: 2em; 664 border-radius: 50%; 665 background: #ffffff; 666 background: -moz-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%); 667 background: -webkit-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%); 668 background: -o-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%); 669 background: -ms-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%); 670 background: linear-gradient(to right, #ffffff 10%, rgba(255, 255, 255, 0) 42%); 671 -webkit-animation: newload 0.8s infinite linear; 672 animation: newload 0.8s infinite linear; 673 -webkit-transform: translateZ(0); 674 -ms-transform: translateZ(0); 675 transform: translateZ(0); 676 /* display: none; */ 677 position: absolute; 678 left: 13px; 679 } 680 .newBtnLoader:before { 681 width: 50%; 682 height: 50%; 683 background: #ffffff; 684 border-radius: 100% 0 0 0; 685 position: absolute; 686 top: 0; 687 left: 0; 688 content: ''; 689 } 690 .newBtnLoader:after { 691 background: rgb(36 166 138); 692 width: 75%; 693 height: 75%; 694 border-radius: 50%; 695 content: ''; 696 margin: auto; 697 position: absolute; 698 top: 0; 699 left: 0; 700 bottom: 0; 701 right: 0; 702 } 703 .greenBtnNew:hover .newBtnLoader:after { 704 background: #209479; 705 } 706 707 .embedFormUsing label { 708 font-size: 14px; 709 color: #222; 710 font-weight: 500; 711 margin-bottom: 8px; 712 display: block; 713 } 714 .embedFormUsing { 715 margin-bottom: 15px; 361 716 } 362 717 .embedFormInputField label { 363 font-size: 14px; 364 display: block; 365 margin-bottom: 10px; 366 } 367 .embedFormInputField span:last-child { 368 float: right; 369 } 370 .embedFormInputField input[type="text"] { 371 width: 100%; 372 box-sizing: border-box; 373 border-radius: 3px; 374 border: 1px solid #ccc; 375 padding: 7px 10px; 376 font-size: 13px; 377 } 378 .embedIncldeParamtrs span { 379 font-size: 14px; 380 color: #6b6b6b; 381 line-height: 23px; 382 position: relative; 383 left: 30px; 384 margin-bottom: 15px; 385 display: inline-block; 386 } 387 .embedParameterValue { 388 border: 1px solid #ccc; 389 display: inline-block; 390 width: 100%; 391 padding-bottom: 7px; 392 } 393 .embedField { 394 background: #f6f6f6; 395 padding: 10px 20px; 396 margin-bottom: 15px; 397 display: inline-block; 398 width: 100%; 399 box-sizing: border-box; 400 } 401 .embedFiel_Col1 { 402 width: 240px; 403 float: left; 404 font-size: 14px; 405 } 406 .embedFiel_Col2 { 407 width: 200px; 408 float: left; 409 font-size: 14px; 410 margin-left: 67px; 411 } 412 .addparamsWrap { 413 display: inline-block; 414 width: 100%; 415 margin-bottom: 16px; 416 float: left; 417 padding: 0 20px; 418 } 419 .intArrow { 420 border-bottom: 1px dashed #afafaf; 421 font-size: 13px; 422 font-weight: 300; 423 width: 75px; 424 position: relative; 425 margin-left: 15px; 426 margin-right: 15px; 427 display: inline-block; 428 float: left; 429 vertical-align: middle; 430 top: 15px; 431 margin-left: 20px; 432 margin-right: 20px; 433 } 434 .intArrow .arrowImg { 435 background: url(./tinymce/paramtrArrow.jpg) no-repeat; 436 width: 5px; 437 height: 10px; 438 display: block; 439 top: -4px; 440 position: absolute; 441 right: 0; 442 opacity: 0.8; 443 } 444 .fiedPropPlus, .fiedPropMinus{ 445 width: 24px; 446 height: 24px; 447 background: url(./tinymce/fieldprop-plus.png) no-repeat; 448 background-size: contain; 449 margin-top: 2px; 450 float: left; cursor: pointer; 451 margin-left: 15px; 452 left: 0px !important; 453 } 454 .fiedPropMinus { 455 background: url(./tinymce/fieldprop-minus.png) no-repeat; 456 background-size: contain; 457 margin-left: 8px; 458 } 459 .addParamaFeld { 460 width: 190px; 461 float: left; 462 } 463 .addParamaFeld input[type="text"] { 464 width: 100%; 465 border-radius: 3px; 466 border: 1px solid #ccc; 467 box-sizing: border-box; 468 padding: 7px 10px; 469 font-size: 13px; 470 } 471 input[type="text"]:disabled { 472 background: #ececec; 473 } 718 color: #222; 719 font-weight: 500; 720 } 721 .zf-Wp-plusminus { 722 display: flex; 723 } 724 .block-editor-block-list__layout.is-root-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { 725 max-width: 750px; 726 } 727 .zf-wb-dropWrapper::before { 728 display: none; 729 } 730 .zf-wb-innerWrapper .select2-container .selection { 731 width: 100%; 732 display: block; 733 height: 38px; 734 border: none; 735 } 736 .zf-wb-innerWrapper .select2-container--default .select2-selection--single { 737 background-color: #fff; 738 border: none; 739 border-radius: 4px; 740 height: 38px; 741 line-height: 41px; 742 } 743 .zf-wb-innerWrapper .select2-container--default .select2-selection--single .select2-selection__rendered { 744 color: #444; 745 line-height: 38px; 746 font-size: 13px; 747 font-weight: 400; 748 padding-left: 12px; 749 } 750 .zf-wb-containerWrapper .select2-dropdown { 751 z-index: 100000; 752 background: #fff; 753 border: 1px solid #d3dce0; 754 -webkit-border-radius: 0px 0px 8px 8px; 755 -moz-border-radius: 0px 0px 8px 8px; 756 border-radius: 8px; 757 box-shadow: 0px 1px 15px 0px #0000001A; 758 box-sizing: border-box; 759 } 760 .zf-wb-containerWrapper .select2-results__option { 761 padding: 9px 12px; 762 border-radius: 4px; 763 margin-bottom: 2px; 764 position: relative; 765 line-height: 150%; 766 font-size: 13px; 767 color: #222 !important; 768 } 769 770 .zf-wb-containerWrapper .select2-container--default .select2-results__option--highlighted[aria-selected] { 771 background: rgb(241 244 247 / 70%); 772 color: #222 !important; 773 } 774 .zf-wb-containerWrapper .select2-container--default .select2-results__option[aria-selected=true] { 775 background: rgb(233 246 243) !important; 776 color: rgb(36 166 138) !important; 777 } 778 .zf-wb-containerWrapper .select2-container--default .select2-results > .select2-results__options { 779 margin: 4px; 780 } 781 .zf-wb-containerWrapper .select2-container--default .select2-selection--single .select2-selection__arrow b { 782 border-color: #888 transparent transparent transparent; 783 border-style: solid; 784 left: 3px; 785 margin-left: -4px; 786 margin-top: -2px; 787 position: absolute; 788 top: 50%; 789 width: 7px; 790 height: 7px; 791 border-width: 0; 792 border-top: 1.5px solid rgb(34 34 34); 793 border-left: 1.5px solid rgb(34 34 34); 794 transform: rotate(223deg); 795 } 796 797 .zf-wb-containerWrapper .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { 798 transform: rotate(47deg); 799 width: 7px; 800 height: 7px; 801 border-width: 0; 802 border-top: 1.5px solid #222; 803 border-left: 1.5px solid #222; 804 top: 57%; 805 } 806 807 @-webkit-keyframes newload { 808 0% { 809 -webkit-transform: rotate(0deg); 810 transform: rotate(0deg); 811 } 812 813 100% { 814 -webkit-transform: rotate(360deg); 815 transform: rotate(360deg); 816 } 817 } 818 819 @keyframes newload { 820 0% { 821 -webkit-transform: rotate(0deg); 822 transform: rotate(0deg); 823 } 824 825 100% { 826 -webkit-transform: rotate(360deg); 827 transform: rotate(360deg); 828 } 829 } 830 /* Rewamp UI Css End */ 831 832 -
zoho-forms/tags/5.0/zohoforms-block.js
r3729081 r3748754 7 7 alt: "Zoho Forms" 8 8 }); 9 var backSvgIcon = wpCreateElem('svg', null,10 wpCreateElem('path', { d: "M21 11.016v1.969h-14.156l3.563 3.609-1.406 1.406-6-6 6-6 1.406 1.406-3.563 3.609h14.156z"} )11 );12 9 var zohoFormsAttributes = { 13 10 zf_short_code: {type: 'string'}, … … 38 35 return jQuery(blockRef.current).find(selector); 39 36 } 37 wpElem.useEffect(function(){ 38 if(!blockRef.current || !jQuery.fn.select2){ 39 return; 40 } 41 var $block = jQuery(blockRef.current); 42 var ownerDoc = blockRef.current.ownerDocument; 43 function setupSelect(selector, onChange){ 44 var $el = $block.find(selector); 45 if(!$el.length || $el.data("select2")){ 46 return; 47 } 48 $el.select2({ 49 width: "100%", 50 dropdownParent: $block, 51 minimumResultsForSearch: Infinity 52 }); 53 $el.on("change.zfSelect2", onChange); 54 } 55 setupSelect("#zf_domain", hideDomainError); 56 setupSelect("#zf_formslist", formSelectOnchange); 57 function closeSelect2OnOutsideClick(event){ 58 if(jQuery(event.target).closest(".select2-container").length){ 59 return; 60 } 61 $block.find("#zf_domain, #zf_formslist").each(function(){ 62 var $el = jQuery(this); 63 if($el.data("select2")){ 64 $el.select2("close"); 65 } 66 }); 67 } 68 jQuery(ownerDoc).on("mousedown.zfSelect2", closeSelect2OnOutsideClick); 69 return function(){ 70 jQuery(ownerDoc).off("mousedown.zfSelect2", closeSelect2OnOutsideClick); 71 $block.find("#zf_domain, #zf_formslist").each(function(){ 72 var $el = jQuery(this); 73 $el.off("change.zfSelect2"); 74 if($el.data("select2")){ 75 $el.select2("destroy"); 76 } 77 }); 78 }; 79 }, []); 80 var isAutoHeight = props.attributes.autoheight === true || props.attributes.autoheight === "true"; 81 wpElem.useEffect(function(){ 82 if(!isAutoHeight || !blockRef.current){ 83 return; 84 } 85 var ownerWindow = blockRef.current.ownerDocument.defaultView; 86 if(!ownerWindow){ 87 return; 88 } 89 function onFormResize(event){ 90 var evntData = event.data; 91 if(!evntData || evntData.constructor != String || !blockRef.current){ 92 return; 93 } 94 var zf_ifrm_data = evntData.split("|"); 95 if(zf_ifrm_data.length != 2 && zf_ifrm_data.length != 3){ 96 return; 97 } 98 var iframe = blockRef.current.querySelector("iframe"); 99 if(!iframe){ 100 return; 101 } 102 var zf_perma = zf_ifrm_data[0]; 103 if(iframe.src.indexOf("formperma") < 0 || iframe.src.indexOf(zf_perma) < 0){ 104 return; 105 } 106 var zf_ifrm_ht_nw = (parseInt(zf_ifrm_data[1], 10) + 15) + "px"; 107 var prevIframeHeight = iframe.style.height; 108 var zf_tout = false; 109 if(zf_ifrm_data.length == 3){ 110 iframe.scrollIntoView(); 111 zf_tout = true; 112 } 113 if(prevIframeHeight != zf_ifrm_ht_nw){ 114 if(zf_tout){ 115 ownerWindow.setTimeout(function(){ 116 iframe.style.height = zf_ifrm_ht_nw; 117 }, 500); 118 }else{ 119 iframe.style.height = zf_ifrm_ht_nw; 120 } 121 } 122 } 123 ownerWindow.addEventListener("message", onFormResize, false); 124 return function(){ 125 ownerWindow.removeEventListener("message", onFormResize, false); 126 }; 127 }, [isAutoHeight, props.attributes.formPerma]); 40 128 if(isEmbedded){ 41 return wpCreateElem("div", blockProps, wpCreateElem("iframe", {src: props.attributes.formPerma, width: props.attributes.width, height: props.attributes.height, frameborder:"0", allow : "geolocation;microphone;camera", "aria-label" : props.attributes.formtitle})); 129 var iframeSrc = props.attributes.formPerma; 130 if(isAutoHeight && iframeSrc && iframeSrc.indexOf("zf_rszfm=") === -1){ 131 iframeSrc += (iframeSrc.indexOf("?") === -1 ? "?" : "&") + "zf_rszfm=1"; 132 } 133 return wpCreateElem("div", blockProps, wpCreateElem("iframe", {src: iframeSrc, width: props.attributes.width, height: props.attributes.height, style: { border: "none", width: props.attributes.width, height: props.attributes.height, transition: "all 0.5s ease" }, frameborder:"0", allow : "geolocation;microphone;camera", "aria-label" : props.attributes.formtitle})); 42 134 } 43 135 var $ = jQuery; … … 56 148 var newParam = $(urlParamsDiv).find("div[elname=paramTemplate]").clone(); 57 149 $(newParam).removeAttr("elname"); 58 $(newParam). show();150 $(newParam).css("display", ""); 59 151 bindParamRow(newParam); 60 152 $(newParam).insertAfter($(elem).parent().parent("div[eltype=keyValPair]")); … … 74 166 getElem("#formPermaLinkPasteDiv").hide(); 75 167 getElem("#chooseZohoFormDiv").hide(); 168 getElem("#blockEditShortCodeDiv").hide(); 76 169 getElem("#zfHomeDiv").show(); 77 170 getElem("#embedActionsDiv").hide(); 171 selectMappingStep("choose"); 172 } 173 function selectMappingStep(step){ 174 if(step == "embed"){ 175 getElem("#chooseFormStep").addClass("is-selected"); 176 getElem("#configureEmbedStep").addClass("is-selected"); 177 setStepCompleted("#chooseFormStep", true); 178 setStepCompleted("#configureEmbedStep", false); 179 }else{ 180 getElem("#configureEmbedStep").removeClass("is-selected"); 181 getElem("#chooseFormStep").addClass("is-selected"); 182 setStepCompleted("#chooseFormStep", false); 183 setStepCompleted("#configureEmbedStep", false); 184 } 185 } 186 function setStepCompleted(stepSelector, completed){ 187 var $step = getElem(stepSelector); 188 if(completed){ 189 $step.find("span[elname=stepNumber]").hide(); 190 $step.find("span[elname=tickIcon]").css("display", ""); 191 }else{ 192 $step.find("span[elname=stepNumber]").css("display", ""); 193 $step.find("span[elname=tickIcon]").hide(); 194 } 195 } 196 function selectConnectionCard(event){ 197 getElem("#accessZohoFormsCard, #embedUsingPermalinkCard").removeClass("selected"); 198 $(event.currentTarget).addClass("selected"); 199 } 200 function proceedFromHome(){ 201 if(getElem("#accessZohoFormsCard").hasClass("selected")){ 202 getElem("#blockEditShortCodeDiv").hide(); 203 chooseForm(); 204 }else if(getElem("#embedUsingPermalinkCard").hasClass("selected")){ 205 getElem("#blockEditShortCodeDiv").hide(); 206 embedPerma(); 207 } 78 208 } 79 209 … … 92 222 if(formName!="-select-"){ 93 223 getElem("#embedActionsDiv").show(); 94 }else{ 95 getElem("#embedActionsDiv").hide(); 224 selectMappingStep("embed"); 96 225 } 97 226 } … … 100 229 var formPerma='', formTitle = ''; 101 230 if(getElem("#embedCatogory").val()=="formPerma"){ 102 formPerma = getElem("#permalink").val(); 231 formPerma = String(getElem("#permalink").val()).trim(); 232 var permaLinkErrElem = getElem('#permaLinkError'); 103 233 if(formPerma.length==0){ 104 var permaLinkErrElem = getElem('#permaLinkError'); 234 $(permaLinkErrElem).text("Please enter your form's permalink URL."); 235 $(permaLinkErrElem).parent().addClass("zf-wb-errorCont"); 236 $(permaLinkErrElem).show(); 237 return; 238 } 239 if(formPerma.toLowerCase().indexOf("https://") !== 0){ 240 $(permaLinkErrElem).text("Enter a valid permalink Url"); 105 241 $(permaLinkErrElem).parent().addClass("zf-wb-errorCont"); 106 242 $(permaLinkErrElem).show(); … … 117 253 formTitle = getElem("#zf_formslist").find(":selected").text(); 118 254 } 119 var height = getElem("#formHeight").val();120 var width = getElem("#formWidth").val();121 if( height== ""){122 height = '600px';123 } 124 if(width == ""){125 width= '100%';126 }127 var embedType= "iframe";128 if(getElem("#jsEmbed").is(":checked")){129 embedType ='js';130 } 131 var autoHeight = false;132 if(getElem("#autoHeightCB").is(":checked")){ 133 autoHeight =true;134 }255 var widthVal = getElem("#formWidth").val(); 256 var widthUnit = getElem("#formWidth").closest(".embedInputCont").find("i.selected").attr("size_symbol") || "%"; 257 if(widthVal == ""){ 258 widthVal = "100" + widthUnit; 259 }else if(!/(px|%)$/.test(widthVal)){ 260 widthVal = widthVal + widthUnit; 261 } 262 var heightVal = getElem("#formHeight").val(); 263 var heightUnit = getElem("#formHeight").closest(".embedInputCont").find("i").attr("size_symbol") || "px"; 264 if(heightVal == ""){ 265 heightVal = "600" + heightUnit; 266 }else if(!/(px|%)$/.test(heightVal)){ 267 heightVal = heightVal + heightUnit; 268 } 269 var embedType = "js"; 270 var autoHeight = !getElem("#autoHeightCB").is(":checked"); 135 271 var urlParams = ''; 136 272 if(getElem("#queryParamsCB").is(":checked")){ … … 157 293 } 158 294 } 159 saveShortCode(formPerma,width ,height,embedType,autoHeight,urlParams, formTitle);295 saveShortCode(formPerma,widthVal,heightVal,embedType,autoHeight,urlParams, formTitle); 160 296 } 161 297 //form select error … … 189 325 getElem("#chooseZohoFormDiv").hide(); 190 326 getElem("#formPermaLinkPasteDiv").show(); 327 getElem("#zFormSelectDiv").hide(); 191 328 getElem("#permalink").focus(); 192 329 getElem("#embedActionsDiv").show(); 193 330 getElem("#embedCatogory").val("formPerma"); 331 selectMappingStep("embed"); 194 332 } 195 333 //while choosing embed form threw formslist … … 212 350 //Getting zoho forms and adding to list 213 351 function getZohoForms(){ 214 getElem("#zfRefreshDiv").hide(); 352 var refreshVisible = getElem("#zfRefreshDiv").is(":visible"); 353 var domainVisible = getElem("#zDomaindiv").is(":visible"); 354 if(!refreshVisible){ 355 getElem("#zfRefreshDiv").hide(); 356 } 215 357 var newScript = document.createElement("script"); 216 358 var inlineScript = document.createTextNode("var a='';"); … … 222 364 resetFormsList(); 223 365 if(zohoFormsURL != ""){ 224 getElem("#zDomaindiv").hide(); 225 getZohoFormsList(zohoFormsURL); 366 if(domainVisible){ 367 getElem("#connectLoadingImgElem").show(); 368 getZohoFormsList(zohoFormsURL, "connect"); 369 }else if(refreshVisible){ 370 getElem("#refreshLoadingImgElem").show(); 371 getZohoFormsList(zohoFormsURL, "refresh"); 372 }else{ 373 getElem("#zDomaindiv").hide(); 374 getZohoFormsList(zohoFormsURL, false); 375 } 226 376 }else{ 227 377 getElem("#zFormSelectDiv").hide(); … … 243 393 } 244 394 //reset forms list 395 function syncSelect2(selector){ 396 var $el = getElem(selector); 397 if($el.length && $el.data("select2")){ 398 $el.trigger("change.select2"); 399 } 400 } 245 401 function resetFormsList(){ 246 402 hideFormSelectError(); 247 getElem('#zf_formslist').find('option').remove(); 248 getElem('#zf_formslist').append("<option value='-select-'>-Select-</option>"); 403 var $list = getElem("#zf_formslist"); 404 if($list.data("select2")){ 405 $list.select2("close"); 406 } 407 $list.find("option").remove(); 408 $list.append("<option value='-select-'>-Select-</option>"); 409 $list.val("-select-"); 410 syncSelect2("#zf_formslist"); 249 411 } 250 412 //constructing url based on domain extention … … 261 423 } 262 424 //calling api and adding to dropdown 263 function getZohoFormsList(formsUrl ){425 function getZohoFormsList(formsUrl, loader){ 264 426 var apiURL = formsUrl+"/api/getforms?type=plugin"; 265 getElem("#loadingDiv").show(); 266 getFormsAndIncludeScript(apiURL,addToFormListDropDown); 267 } 268 function showiframeOrJsChange(){ 269 if(getElem("#jsEmbed").is(":checked")){ 270 getElem("#autoHeightDiv").slideDown(); 271 }else{ 272 getElem("#autoHeightDiv").slideUp(); 273 } 274 getElem("#autoHeightCB").prop("checked",false); 275 getElem("#formHeight").prop("disabled",false); 276 getElem("#formHeight").prop("placeholder","600px"); 427 if(!loader){ 428 getElem("#loadingDiv").show(); 429 } 430 getFormsAndIncludeScript(apiURL, function(){ 431 if(loader == "connect"){ 432 getElem("#connectLoadingImgElem").hide(); 433 getElem("#zDomaindiv").hide(); 434 }else if(loader == "refresh"){ 435 getElem("#refreshLoadingImgElem").hide(); 436 getElem("#zfRefreshDiv").hide(); 437 } 438 addToFormListDropDown(); 439 }); 277 440 } 278 441 function showOrHideUrlParamsDiv(){ … … 285 448 $(newParam).removeAttr("elname"); 286 449 bindParamRow(newParam); 287 $(newParam). show();450 $(newParam).css("display", ""); 288 451 $(paramsDiv).append($(newParam)); 289 452 $(urlParamsDiv).slideDown(); … … 293 456 } 294 457 458 function selectWidthUnit(event){ 459 var $unit = jQuery(event.currentTarget); 460 $unit.siblings("i").removeClass("selected"); 461 $unit.addClass("selected"); 462 } 463 function allowOnlyNumbers(event){ 464 var value = event.target.value.replace(/[^0-9]/g, ""); 465 if(event.target.value !== value){ 466 event.target.value = value; 467 } 468 } 295 469 function disableOrEnableHeight(){ 296 470 if(getElem("#autoHeightCB").is(":checked")){ 297 getElem("#formHeight").prop("disabled",true); 298 getElem("#formHeight").prop("placeholder",""); 299 getElem("#formHeight").val(''); 471 getElem("#formHeightDiv").css("display", ""); 300 472 }else{ 301 getElem("#formHeight").prop("disabled",false); 302 getElem("#formHeight").prop("placeholder","600px"); 473 getElem("#formHeightDiv").hide(); 303 474 } 304 475 } … … 333 504 document.getElementsByTagName("head")[0].appendChild(script); 334 505 } 506 function getFormsWithFetch(){ 507 fetch("/wp-json/zohoforms/v1/getforms") 508 .then(function(response){ return response.json(); }) 509 .then(function(data){ 510 a = data; 511 addToFormListDropDown(); 512 }); 513 } 335 514 function addToFormListDropDown(){ 336 515 getElem("#zfRefreshDiv").hide(); … … 349 528 formList.options.add(option); 350 529 } 530 syncSelect2("#zf_formslist"); 351 531 getElem("#zFormSelectDiv").show(); 532 getElem("#formPermaLinkPasteDiv").hide(); 352 533 getElem("#embedActionsDiv").show(); 534 selectMappingStep("embed"); 353 535 } 354 536 }else{ … … 373 555 var domainDropDownElem = wpCreateElem("div", 374 556 { 375 id: "zDomaindiv", 376 class: "zf-wb-innerWrapper" 557 id: "zDomaindiv" 377 558 }, 378 wpCreateElem("label",null,"Choose the domain where you've registered your Zoho account.",wpCreateElem("em",null,"*")), 559 wpCreateElem("div", 560 { 561 class: "zf-wb-innerWrapper zconnectMainCont" 562 }, 563 wpCreateElem("label",null,"Select the domain your Zoho account is registered on.",wpCreateElem("em",null,"*")), 379 564 wpCreateElem("div", 380 565 { … … 442 627 ) 443 628 ), 444 wpCreateElem("p",{ id:"domainErr", style:{display:'none'}},"Please choose a domain."), 445 wpCreateElem("div",{class:"zf-wb-connect-btn zf-wb-Fotter"},wpCreateElem("button", { onClick: getZohoForms, class: "zf-wb-blue" },"Connect")) 629 wpCreateElem("p",{ id:"domainErr", style:{display:'none'}},"Please choose a domain.") 630 ), 631 wpCreateElem("div", 632 { 633 class: "connFormFooter" 634 }, 635 wpCreateElem("button", { onClick: goToHomeDiv }, "Back"), 636 wpCreateElem("button", 637 { 638 class: "greenBtnNew", 639 onClick: getZohoForms 640 }, 641 wpCreateElem("em", { id: "connectLoadingImgElem", class: "newBtnLoader", style: { display: "none" } }), 642 "Connect" 643 ) 644 ) 446 645 ); 447 646 var formListEmbedDiv = wpCreateElem("div", … … 451 650 display: 'none', 452 651 }, 453 class: "zf-wb-innerWrapper "652 class: "zf-wb-innerWrapper zf-wb-outerWrapper" 454 653 }, 455 654 wpCreateElem("div", … … 480 679 { 481 680 id: "zfRefreshDiv", 681 class: "refreshCont", 482 682 style: { 483 683 display: 'none' 484 }, 485 class: "zf-wb-signWrapper" 684 } 486 685 }, 487 wpCreateElem("p", null,"Click 'Refresh' to choose a form."), 488 wpCreateElem("button", { id: "refreshLink", onClick: getZohoForms, class: "zf-wb-lightblue" },"Refresh") 686 wpCreateElem("img", { src: zohoFormsBlock.refreshFormIcon }), 687 wpCreateElem("h3", null, "Sign in on the Zoho page, then come back and refresh to load your forms."), 688 wpCreateElem("div", { class: "refFormFooter" }, 689 wpCreateElem("button", { onClick: goToHomeDiv }, "Back"), 690 wpCreateElem("button", { class: "greenBtnNew", onClick: getZohoForms }, 691 wpCreateElem("em", { id: "refreshLoadingImgElem", class: "newBtnLoader", style: { display: "none" } }), 692 "Refresh" 693 ) 694 ) 489 695 ); 490 696 var createFormDiv = wpCreateElem("div", 491 697 { 492 698 id: "zfCreateFormDiv", 699 class: "refreshCont", 493 700 style: { 494 701 display: 'none' 495 }, 496 class: "zf-wb-signWrapper" 702 } 497 703 }, 498 wpCreateElem("p", null,"You don't have any forms."), 499 wpCreateElem("button", { id: "createFormLink", onClick: openSigninOrCreateForm, class: "zf-wb-green"},"CREATE A NEW FORM") 704 wpCreateElem("img", { src: zohoFormsBlock.refreshFormIcon }), 705 wpCreateElem("h3", null, "You don't have any forms."), 706 wpCreateElem("div", { class: "refFormFooter" }, 707 wpCreateElem("button", { class: "greenBtnNew", onClick: openSigninOrCreateForm }, 708 wpCreateElem("em", { id: "createLoadingImgElem", class: "newBtnLoader", style: { display: "none" } }), 709 "Create a new form" 710 ) 711 ) 500 712 ); 501 713 var chooseZFormDiv = wpCreateElem("div", … … 507 719 } 508 720 }, 509 wpCreateElem("div",510 {class: "zf-wb-headwrap"},511 wpCreateElem("span",{class: "zf-wb-backIocn", onClick:goToHomeDiv},backSvgIcon),512 wpCreateElem("div",{class: "zf-wb-heading"},"Choose your form")513 ),514 721 wpCreateElem("div",{id: "loadingDiv", class: "zf-wb-loading" ,style: {display: 'none'}},wpCreateElem("p",null,"loading"),wpCreateElem("div",{class: "zf-wb-spinner"},wpCreateElem("div",{class:"bounce1"}),wpCreateElem("div",{class:"bounce2"}),wpCreateElem("div",{class:"bounce3"}))), 515 722 domainDropDownElem, 516 formListEmbedDiv,517 723 refreshDiv, 518 724 createFormDiv … … 525 731 style: { display:'none'} 526 732 }, 527 wpCreateElem("div",528 {class: "zf-wb-headwrap"},529 wpCreateElem("span",{class: "zf-wb-backIocn", onClick:goToHomeDiv},backSvgIcon),530 wpCreateElem("div",{class: "zf-wb-heading"},"Enter form permalink")531 ),532 733 wpCreateElem("div", 533 734 { … … 543 744 } 544 745 ), 545 wpCreateElem("p", { id: "permaLinkError", style: {display:'none'} },"Please enter your form'spermalink URL."),546 wpCreateElem("span",null,"N ot sure where to find the permalink URL? ",wpCreateElem("a",{href: "https://www.zoho.com/forms/help/share/public-sharing.html#link", target: "_blank"},"Click here "),wpCreateElem("span",null,"to learn more."))746 wpCreateElem("p", { id: "permaLinkError", style: {display:'none'} },"Please enter the permalink URL."), 747 wpCreateElem("span",null,"Need help finding your permalink? ",wpCreateElem("a",{href: "https://help.zoho.com/portal/en/kb/forms/sharing-forms/articles/sharing-a-form-publicly#Sharing_a_link", target: "_blank"},"Learn more")) 547 748 ),); 548 var embedTypeDIv = wpCreateElem("div", {549 class: "cusRadioButton",550 id: "embedTypeDiv"551 },552 wpCreateElem("span", {553 class: ""554 },555 wpCreateElem("input", {556 type: "radio",557 id: "iframeEmbed",558 name: "embedType",559 onClick: showiframeOrJsChange,560 value: "iframe",561 defaultChecked: true562 },),563 wpCreateElem("label", {564 for: "iframeEmbed"565 }, "iFrame")),566 wpCreateElem("span", {567 class: ""568 },569 wpCreateElem("input", {570 type: "radio",571 id: "jsEmbed",572 name: "embedType",573 onClick: showiframeOrJsChange,574 value: "iframe",575 },),576 wpCreateElem("label", {577 for: "jsEmbed"578 }, "Java Script"))579 );580 749 var urlParamsCBDiv = wpCreateElem("div",{ 581 750 class: "embedIncldeParamtrs" … … 587 756 }), wpCreateElem("label", { 588 757 for: "queryParamsCB" 589 }, "Add URL params")),590 wpCreateElem("span",null," Include parameters to prefill forms and add referrers to track sources"));758 }, "Add URL Parameters")), 759 wpCreateElem("span",null,"Prefill form fields and track where responses come from.")); 591 760 var urlParamDiv = wpCreateElem("div", 592 761 { … … 609 778 class: "embedFiel_Col2" 610 779 }, 611 wpCreateElem("label", null, "Parameter Value ")780 wpCreateElem("label", null, "Parameter Value") 612 781 ), 613 782 … … 644 813 maxlength: "50" 645 814 })), 646 wpCreateElem("div",{647 class: "intArrow"648 },649 wpCreateElem("em",{class: "arrowImg"})),650 815 wpCreateElem("div", { 651 816 class: "addParamaFeld" … … 671 836 { 672 837 id: "autoHeightDiv", 673 class: "cusCheckBox", 674 onChange : disableOrEnableHeight , 675 style: { display:'none'} 838 class: "cusCheckBox autoHeightDiv" 676 839 }, wpCreateElem("input", { 677 840 type: "checkbox", 678 841 id: "autoHeightCB", 842 onChange: disableOrEnableHeight 679 843 }), wpCreateElem("label", { 680 844 for: "autoHeightCB" 681 }, "Set form height automatically."));845 }, "Set custom height")); 682 846 var embedActionDiv = wpCreateElem("div", 683 847 { 684 848 id: "embedActionsDiv", 685 //class: "zf-WpEmbeddedWrap",849 class: "embedActionsDiv", 686 850 style: { display:'none'} 687 851 }, 852 wpCreateElem("div", { class: "zconnectMainCont" }, 853 formListEmbedDiv, 854 permaLinkEmbedDiv, 855 wpCreateElem("div", { class: "embedFormDivider" }), 688 856 wpCreateElem("div", 689 857 { 690 858 class: "embedFormUsing", 691 859 }, 692 wpCreateElem("label", null, "Embed form using", ),693 embedTypeDIv,694 autoHeightCBDiv,695 860 wpCreateElem("div", 696 861 { 697 862 class: "embedFormInputField" 698 863 }, 699 wpCreateElem("span", 700 { 701 702 }, 864 wpCreateElem("span", null, 703 865 wpCreateElem("label", null, "Width "), 704 wpCreateElem(" input",705 {866 wpCreateElem("div", { class: "embedInputCont" }, 867 wpCreateElem("input", { 706 868 type: "text", 707 869 id: "formWidth", 708 placeholder: "100%" 709 } 710 ) 870 placeholder: "100", 871 onInput: allowOnlyNumbers 872 }), 873 wpCreateElem("div", { class: "embedInputPer" }, 874 wpCreateElem("i", { onClick: selectWidthUnit, size_symbol: "px" }, "px"), 875 wpCreateElem("i", { class: "selected", onClick: selectWidthUnit, size_symbol: "%" }, "%") 876 ) 877 ) 711 878 ), 879 autoHeightCBDiv, 712 880 wpCreateElem("span", 713 881 { 714 882 id: "formHeightDiv", 883 style: { display: "none" } 715 884 }, 716 885 wpCreateElem("label", null, "Height "), 717 wpCreateElem(" input",718 {886 wpCreateElem("div", { class: "embedInputCont" }, 887 wpCreateElem("input", { 719 888 type: "text", 720 889 id: "formHeight", 721 placeholder: "600px" 722 } 723 ) 724 ), 725 //wpCreateElem("div",{class:"clearBoth"},null) 890 class: "formHeight", 891 placeholder: "600", 892 onInput: allowOnlyNumbers 893 }), 894 wpCreateElem("div", { class: "embedInputPer" }, 895 wpCreateElem("i", { size_symbol: "px" }, "px") 896 ) 897 ) 898 ) 726 899 )), 900 wpCreateElem("div", { class: "embedFormDivider" }), 727 901 urlParamsCBDiv, 728 902 urlParamDiv, … … 731 905 id: "paramError", 732 906 style: {display:'none'} 733 },wpCreateElem("p", null,"Parameters should contain only alphanumeric characters, underscore, and hyphen.")), 734 wpCreateElem("div",{class:"zf-wb-Fotter"},wpCreateElem("button",{class:"zf-wb-blue", onClick: zf_block_embed},"Embed")) 907 },wpCreateElem("p", null,"Parameters should contain only alphanumeric characters, underscore, and hyphen.")) 908 ), 909 wpCreateElem("div", { class: "connFormFooter" }, 910 wpCreateElem("button", { onClick: goToHomeDiv }, "Back"), 911 wpCreateElem("button", { class: "greenBtnNew", onClick: zf_block_embed }, 912 wpCreateElem("em", { elem: "loadingImgElem", class: "newBtnLoader", style: { display: "none" } }), 913 "Embed Form" 914 ) 915 ) 735 916 ); 736 917 return wpCreateElem("div", … … 742 923 } 743 924 ), 925 wpCreateElem("link", 926 { 927 href: zohoFormsBlock.select2CSS, 928 rel: "stylesheet" 929 } 930 ), 744 931 wpCreateElem("input",{ 745 932 id:"embedCatogory", … … 747 934 value:"formPerma" 748 935 }), 749 wpCreateElem("div", 936 wpCreateElem("div", { class: "connFormCont" }, 937 wpCreateElem("div", null, 938 wpCreateElem("div", { class: "connFormHeader" }, 939 wpCreateElem("i", null, 940 wpCreateElem("img", { src: zohoFormsBlock.zohoFormsIcon }) 941 ), 942 wpCreateElem("h4", null, "Zoho Forms") 943 ), 944 wpCreateElem("div", { class: "customAddMapping" }, 945 wpCreateElem("a", { id: "chooseFormStep", class: "is-selected" }, 946 wpCreateElem("span", { elname: "stepNumber" }, "1"), 947 wpCreateElem("span", { elname: "tickIcon", style: { display: "none" } }, 948 wpCreateElem("img", { src: zohoFormsBlock.completedIcon, alt: "" }) 949 ), 950 wpCreateElem("em", null, "Choose Form") 951 ), 952 wpCreateElem("a", { id: "configureEmbedStep" }, 953 wpCreateElem("span", { elname: "stepNumber" }, "2"), 954 wpCreateElem("span", { elname: "tickIcon", style: { display: "none" } }, 955 wpCreateElem("img", { src: zohoFormsBlock.completedIcon, alt: "" }) 956 ), 957 wpCreateElem("em", null, "Embed Settings") 958 ) 959 ) 960 ), 961 wpCreateElem("div", 750 962 { 751 963 id: "zfHomeDiv", 752 753 class: "zf-wb-signWrapper" 964 class: "connFormInnCont" 754 965 }, 755 wpCreateElem("p", null,"You can choose a form from your Zoho forms account or enter your form's permalink URL and embed it."), 756 wpCreateElem("button", { class:"zf-wb-blue", onClick: chooseForm },"Access Zoho Forms"), 757 wpCreateElem("label",null,"or"), 758 wpCreateElem("a",{onClick: embedPerma},"Embed using permalink") 759 ), 760 permaLinkEmbedDiv, 761 chooseZFormDiv, 762 embedActionDiv, 763 wpCreateElem("div", { id: "blockEditShortCodeDiv"} ) 966 wpCreateElem("div", { class: "zf-wb-signWrapper zconnectMainCont" }, 967 wpCreateElem("h2", null, "Choose a way to embed your form"), 968 wpCreateElem("div", { class: "accCardCont" }, 969 wpCreateElem("div", { id: "accessZohoFormsCard", class: "accConectCard", onClick: selectConnectionCard }, 970 wpCreateElem("i", null, wpCreateElem("img", { src: zohoFormsBlock.accessFormIcon })), 971 wpCreateElem("div", { class: "accCardRight" }, 972 wpCreateElem("h4", null, "Access Zoho Forms"), 973 wpCreateElem("p", null, "Sign in to Zoho Forms and choose a form.") 974 ) 975 ), 976 wpCreateElem("div", { id: "embedUsingPermalinkCard", class: "accConectCard", onClick: selectConnectionCard }, 977 wpCreateElem("i", null, wpCreateElem("img", { src: zohoFormsBlock.permalinkIcon })), 978 wpCreateElem("div", { class: "accCardRight" }, 979 wpCreateElem("h4", null, "Use a Permalink"), 980 wpCreateElem("p", null, "Embed a form using its permalink URL.") 981 ) 982 ) 983 ) 984 ), 985 wpCreateElem("div", { class: "connFormFooter" }, 986 wpCreateElem("button", { class: "greenBtnNew", onClick: proceedFromHome }, "Next") 987 ) 988 ), 989 chooseZFormDiv, 990 embedActionDiv 991 ), 992 wpCreateElem("div", { id: "blockEditShortCodeDiv", style: { display: "none" } }) 764 993 ); 765 994 }, //End of edit function -
zoho-forms/trunk/readme.txt
r3729093 r3748754 5 5 Tags: contact form, form builder, custom form, forms, form plugin 6 6 Requires at least: 2.8 7 Tested up to: 7.1 8 Stable tag: 4.17 Tested up to: 7.1.3 8 Stable tag: 5.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 230 230 == Changelog == 231 231 232 = 5.0 = 233 234 * Refreshed the Zoho Forms plugin with a new look for embedding forms. 235 232 236 = 4.1 = 233 237 234 238 * Upgraded the Zoho Forms block to Block API version 3 for compatibility with the iframe-based block editor. 235 239 * Fixed the Zoho Forms block not working in the block editor from WordPress 7.1. 236 240 = 4.0.4 = 237 241 … … 292 296 == Upgrade Notice == 293 297 294 = 4.1 = 295 296 * Required for WordPress 7.1 and later: the Zoho Forms block now supports the iframe-based block editor (Block API version 3). 297 298 = 4.0.4 = 299 300 * Enhanced iframe and JavaScript code of forms with required browser permissions and WCAG attributes. 298 = 5.0 = 299 300 * Refreshed the Zoho Forms plugin with a new look for embedding forms. -
zoho-forms/trunk/tinymce/zforms_dailog.css
r3729081 r3748754 407 407 padding: 0 20px; 408 408 } 409 .intArrow {410 border-bottom: 1px dashed #afafaf;411 font-size: 13px;412 font-weight: 300;413 width: 75px;414 position: relative;415 margin-left: 15px;416 margin-right: 15px;417 display: inline-block;418 float: left;419 vertical-align: middle;420 top: 15px;421 margin-left: 20px;422 margin-right: 20px;423 }424 .intArrow .arrowImg {425 background: url(paramtrArrow.jpg) no-repeat;426 width: 5px;427 height: 10px;428 display: block;429 top: -4px;430 position: absolute;431 right: 0;432 opacity: 0.8;433 }434 409 .fiedPropPlus, .fiedPropMinus{ 435 410 width: 24px; 436 411 height: 24px; 437 background: url( fieldprop-plus.png) no-repeat;412 background: url(../images/fieldprop-plus.png) no-repeat; 438 413 background-size: contain; 439 414 margin-top: 2px; … … 443 418 } 444 419 .fiedPropMinus { 445 background: url( fieldprop-minus.png) no-repeat; background-size: contain;420 background: url(../images/fieldprop-minus.png) no-repeat; background-size: contain; 446 421 margin-left: 8px; 447 422 } -
zoho-forms/trunk/tinymce/zforms_dailog.js
r3729081 r3748754 94 94 var embedType = $("#zf_embedCatogory").val(); 95 95 if(embedType == "formPerma"){ 96 var perma_link = document.getElementById("permalink").value;96 var perma_link = $.trim(document.getElementById("permalink").value); 97 97 if(perma_link.length==0) 98 98 { 99 99 document.getElementById("permaLinkError").style.display="block"; 100 100 document.getElementById("permaLinkError").innerHTML="Please enter your form's public link."; 101 document.getElementById("permaContainer").classList.add("errorCont"); 101 document.getElementById("permaContainer").classList.add("zf-wb-errorCont"); 102 return; 103 } 104 if(perma_link.toLowerCase().indexOf("https://") !== 0) 105 { 106 document.getElementById("permaLinkError").style.display="block"; 107 document.getElementById("permaLinkError").innerHTML="Enter a valid permalink Url"; 108 document.getElementById("permaContainer").classList.add("zf-wb-errorCont"); 102 109 return; 103 110 } … … 109 116 document.getElementById("formSelectionError").style.display="block"; 110 117 document.getElementById("formSelectionError").innerHTML="Please select a form."; 111 document.getElementById("selctContainer").class Name= "errorCont";118 document.getElementById("selctContainer").classList.add("zf-wb-errorCont"); 112 119 return; 113 120 } … … 126 133 if(!paramKeyRegex.test(paramKey)){ 127 134 hasError = true; 128 $(elem).find("input[elname=paramKey]").parent("div").addClass(" errorCont");135 $(elem).find("input[elname=paramKey]").parent("div").addClass("zf-wb-errorCont"); 129 136 } 130 137 if(paramKey!='' && paramVal!=''){ … … 140 147 } 141 148 } 142 var formWidth = document.getElementById('width'); 149 var formWidth = document.getElementById('formWidth'); 150 var widthUnit = $("#formWidth").closest(".embedInputCont").find("i.selected").attr("size_symbol") || "%"; 143 151 if(formWidth.value=="") 144 152 { 145 formWidth.value="100%"; 146 } 147 var formHeight = document.getElementById('height'); 153 formWidth.value="100"+widthUnit; 154 }else if(!/(px|%)$/.test(formWidth.value)){ 155 formWidth.value=formWidth.value+widthUnit; 156 } 157 var formHeight = document.getElementById('formHeight'); 158 var heightUnit = $("#formHeight").closest(".embedInputCont").find("i").attr("size_symbol") || "px"; 148 159 if(formHeight.value=="") 149 160 { 150 formHeight.value="600px"; 161 formHeight.value="600"+heightUnit; 162 }else if(!/(px|%)$/.test(formHeight.value)){ 163 formHeight.value=formHeight.value+heightUnit; 151 164 } 152 165 //insertContent(urlBuild,formWidth.value,formHeight.value); … … 170 183 tag +=' urlparams="'+urlParams+'"'; 171 184 } 172 if($("#jsEmbed").is(":checked")){ 173 tag +=' type=js'; 174 } 175 if($("#autoHeightCB").is(":checked")){ 185 tag +=' type=js'; 186 if(!$("#autoHeightCB").is(":checked")){ 176 187 tag +=' autoheight=true' 177 188 } … … 203 214 $("#chooseFormDiv").hide(); 204 215 $("#embedActionsDiv").hide(); 216 selectMappingStep("choose"); 217 } 218 219 function selectMappingStep(step){ 220 if(step == "embed"){ 221 $("#chooseFormStep").addClass("is-selected"); 222 $("#configureEmbedStep").addClass("is-selected"); 223 setStepCompleted("#chooseFormStep", true); 224 setStepCompleted("#configureEmbedStep", false); 225 }else{ 226 $("#configureEmbedStep").removeClass("is-selected"); 227 $("#chooseFormStep").addClass("is-selected"); 228 setStepCompleted("#chooseFormStep", false); 229 setStepCompleted("#configureEmbedStep", false); 230 } 231 } 232 function setStepCompleted(stepSelector, completed){ 233 var $step = $(stepSelector); 234 if(completed){ 235 $step.find("span[elname=stepNumber]").hide(); 236 $step.find("span[elname=tickIcon]").css("display", ""); 237 }else{ 238 $step.find("span[elname=stepNumber]").css("display", ""); 239 $step.find("span[elname=tickIcon]").hide(); 240 } 241 } 242 243 function selectConnectionCard(card){ 244 $("#accessZohoFormsCard, #embedUsingPermalinkCard").removeClass("selected"); 245 $(card).addClass("selected"); 246 } 247 248 function proceedFromHome(){ 249 if($("#accessZohoFormsCard").hasClass("selected")){ 250 showChooseFormDiv(); 251 }else if($("#embedUsingPermalinkCard").hasClass("selected")){ 252 embedPerma(); 253 } 205 254 } 206 255 … … 210 259 $("#zf_embedCatogory").val("formPerma"); 211 260 $("#permaLinkDiv").show(); 261 $("#formSelectionDiv").hide(); 212 262 $("#embedActionsDiv").show(); 213 if(document.getElementById("permaContainer").classList.contains(" errorCont"))214 { 215 document.getElementById("permaContainer").classList.remove(" errorCont");263 if(document.getElementById("permaContainer").classList.contains("zf-wb-errorCont")) 264 { 265 document.getElementById("permaContainer").classList.remove("zf-wb-errorCont"); 216 266 document.getElementById("permaLinkError").style.display="none"; 217 267 } … … 219 269 //document.getElementById("permaLinkDiv").style.display="block"; 220 270 document.getElementById("chooseFormDiv").style.display= "none"; 221 //document.getElementById("selectForm").classList.remove("selected"); 222 271 selectMappingStep("embed"); 223 272 } 224 273 225 function signin() 226 { 227 if(window.tinyMCE) 228 { 229 var domainValue = $("#zForm_domain").val(); 230 var formsUrl = getZohoURL(domainValue); 231 if(formsUrl !=""){ 232 window.open(formsUrl+"/forms/login.html"); 233 document.getElementById("refreshDiv").style.display="block"; 234 document.getElementById("signinDiv").style.display="none"; 235 } 236 } 274 var signInTabOpened = false; 275 function openSignInTab(formsUrl){ 276 if(!signInTabOpened && formsUrl !=""){ 277 signInTabOpened = true; 278 window.open(formsUrl); 279 } 280 $("#zDomaindiv").hide(); 281 $("#zfCreateFormDiv").hide(); 282 document.getElementById("zfRefreshDiv").style.display="flex"; 237 283 } 238 284 function appendScript() … … 259 305 $("#zf_tiny_homeDiv").hide(); 260 306 $("#zf_embedCatogory").val("formSelect"); 261 //document.getElementById("selectForm").classList.add("selected"); 307 document.getElementById("permaLinkDiv").style.display= "none"; 308 if(a!="" && a.forms && a.forms.length > 0){ 309 $("#chooseFormDiv").hide(); 310 $("#formSelectionDiv").show(); 311 $("#embedActionsDiv").show(); 312 selectMappingStep("embed"); 313 return; 314 } 262 315 document.getElementById("chooseFormDiv").style.display="block"; 263 document.getElementById("permaLinkDiv").style.display= "none";264 //document.getElementById("publicLink").className= "none";265 316 showEmbedActionsDiv(); 266 317 } 267 318 268 319 function proceedToSelectFormOnTinyMce(){ 269 var domainValue = $("#z Form_domain").val();320 var domainValue = $("#zf_domain").val(); 270 321 if(domainValue == "-select-"){ 271 $("#domain SelectionErr").show();272 $("# domainSelectionDiv").addClass("errorCont");322 $("#domainErr").show(); 323 $("#zDomaindiv").addClass("zf-wb-errorCont"); 273 324 return; 274 325 } 275 326 var formsUrl = getZohoFormsURL(domainValue); 276 327 if(formsUrl !=""){ 328 signInTabOpened = false; 329 var refreshVisible = $("#zfRefreshDiv").is(":visible"); 330 var loaderElem = refreshVisible ? $("#refreshLoadingImgElem") : $("#connectLoadingImgElem"); 331 loaderElem.show(); 277 332 getZohoFormsLisOnTinyMce(formsUrl); 278 $("#domainSelectionDiv").hide();279 $("#refreshDiv").hide();280 $("#loadingDiv").show();281 333 setTimeout(function() { 282 $("#loadingDiv").hide();334 loaderElem.hide(); 283 335 if(a==""){ 284 $("#signinDiv").show(); 285 }else if(a.forms.length == 0){ 286 $("#createFormDiv").show(); 336 openSignInTab(formsUrl); 337 return; 338 } 339 $("#zDomaindiv").hide(); 340 $("#zfRefreshDiv").hide(); 341 if(a.forms.length == 0){ 342 $("#zfCreateFormDiv").show(); 287 343 }else{ 344 $("#chooseFormDiv").hide(); 345 $("#permaLinkDiv").hide(); 288 346 $("#formSelectionDiv").show(); 347 $("#embedActionsDiv").show(); 348 selectMappingStep("embed"); 289 349 } 290 350 … … 294 354 function getZohoFormsLisOnTinyMce(formsUrl){ 295 355 var apiURL = formsUrl+"/api/getforms?type=plugin"; 296 $("#loadingDiv").show();297 356 getFormsAndIncludeScriptOnTinyMce(apiURL,addToFormListDropDown); 298 357 } … … 310 369 formList.options.add(option); 311 370 } 312 $("#zFormSelectDiv").show(); 371 if($("#formname").data("select2")){ 372 $("#formname").trigger("change.select2"); 373 } 374 $("#chooseFormDiv").hide(); 375 $("#permaLinkDiv").hide(); 376 $("#formSelectionDiv").show(); 377 $("#embedActionsDiv").show(); 378 selectMappingStep("embed"); 313 379 } 380 }else{ 381 openSignInTab(getZohoFormsURL($("#zf_domain").val())); 314 382 } 315 383 } … … 369 437 } 370 438 function hideDomainSelctError(){ 371 $("# domainSelectionDiv").removeClass("errorCont");372 $("#domain SelectionErr").hide();439 $("#zDomaindiv").removeClass("zf-wb-errorCont"); 440 $("#domainErr").hide(); 373 441 } 374 442 375 443 function hideError() 376 444 { 377 if(document.getElementById("permaContainer").classList.contains(" errorCont"))378 { 379 document.getElementById("permaContainer").classList.remove(" errorCont");445 if(document.getElementById("permaContainer").classList.contains("zf-wb-errorCont")) 446 { 447 document.getElementById("permaContainer").classList.remove("zf-wb-errorCont"); 380 448 document.getElementById("permaLinkError").style.display="none"; 381 449 } 382 if(document.getElementById("selctContainer").classList.contains(" errorCont")){450 if(document.getElementById("selctContainer").classList.contains("zf-wb-errorCont")){ 383 451 document.getElementById("formSelectionError").style.display="none"; 384 document.getElementById("selctContainer").classList.remove(" errorCont");452 document.getElementById("selctContainer").classList.remove("zf-wb-errorCont"); 385 453 } 386 454 } … … 391 459 { 392 460 document.getElementById("selectForm").classList.add("selected"); 393 if(document.getElementById("selctContainer").classList.contains(" errorCont"))394 { 395 document.getElementById("selctContainer").classList.remove(" errorCont");461 if(document.getElementById("selctContainer").classList.contains("zf-wb-errorCont")) 462 { 463 document.getElementById("selctContainer").classList.remove("zf-wb-errorCont"); 396 464 document.getElementById("formSelectionError").style.display="none"; 397 465 } … … 401 469 if(a.forms.length==0) 402 470 { 403 document.getElementById(" createFormDiv").style.display="block";471 document.getElementById("zfCreateFormDiv").style.display="block"; 404 472 document.getElementById("chooseFormDiv").style.display="none"; 405 document.getElementById("signinDiv").style.display="none";406 473 } 407 474 else 408 475 { 409 476 document.getElementById("chooseFormDiv").style.display="block"; 410 document.getElementById("signinDiv").style.display="none";411 477 } 412 478 } 413 479 else 414 { 415 416 document.getElementById("signinDiv").style.display="block"; 417 418 419 480 { 481 openSignInTab(getZohoFormsURL($("#zf_domain").val())); 420 482 } 421 483 document.getElementById("permaLinkDiv").style.display= "none"; 422 document.getElementById("refreshDiv").style.display="none"; 484 if(a!=""){ 485 document.getElementById("zfRefreshDiv").style.display="none"; 486 } 423 487 document.getElementById("publicLink").className= "none"; 424 488 } … … 436 500 function createForm() 437 501 { 438 var domainValue = $("#z Form_domain").val();502 var domainValue = $("#zf_domain").val(); 439 503 var formsUrl = getZohoFormsURL(domainValue); 440 504 if(formsUrl !=""){ 441 505 window.open(formsUrl); 442 document.getElementById("refreshDiv").style.display="block"; 443 document.getElementById("createFormDiv").style.display="none"; 444 document.getElementById("signinDiv").style.display="none"; 506 document.getElementById("zfRefreshDiv").style.display="flex"; 507 document.getElementById("zfCreateFormDiv").style.display="none"; 445 508 } 446 509 } … … 454 517 var newParam = $(urlParamsDiv).find("div[elname=paramTemplate]").clone(); 455 518 $(newParam).removeAttr("elname"); 456 $(newParam). show();519 $(newParam).css("display", ""); 457 520 $(paramsDiv).append($(newParam)); 458 521 $(urlParamsDiv).slideDown(); … … 465 528 var newParam = $(urlParamsDiv).find("div[elname=paramTemplate]").clone(); 466 529 $(newParam).removeAttr("elname"); 467 $(newParam). show();530 $(newParam).css("display", ""); 468 531 $(newParam).insertAfter($(elem).parent().parent("div[eltype=keyValPair]")); 469 532 } 470 533 471 function showiframeOrJsChange(){472 if($("#jsEmbed").is(":checked")){473 $("#autoHeightDiv").slideDown();474 }else{475 $("#autoHeightDiv").slideUp();476 }477 $("#autoHeightCB").prop("checked",false);478 $("#height").removeProp("disabled");479 $("#height").val("600px");480 481 }482 534 function deleteParam(elem){ 483 535 $(elem).parent().parent("div").remove(); … … 494 546 if(formname !="-Select-"){ 495 547 $("#embedActionsDiv").slideDown(); 496 }else{ 497 $("#embedActionsDiv").slideUp(); 498 } 499 548 selectMappingStep("embed"); 549 } 550 } 551 function selectWidthUnit(elem){ 552 $(elem).siblings("i").removeClass("selected"); 553 $(elem).addClass("selected"); 554 } 555 function allowOnlyNumbers(elem){ 556 var value = elem.value.replace(/[^0-9]/g, ""); 557 if(elem.value !== value){ 558 elem.value = value; 559 } 500 560 } 501 561 function disableHeight(){ 502 562 if($("#autoHeightCB").is(":checked")){ 503 $("#height").prop("disabled",true); 504 $("#height").val(''); 563 $("#formHeightDiv").css("display", ""); 505 564 }else{ 506 $("#height").removeProp("disabled"); 507 $("#height").val('600px'); 565 $("#formHeightDiv").hide(); 508 566 } 509 567 } 510 568 511 569 function hideparamError(elem){ 512 $(elem).parent("div").removeClass(" errorCont");570 $(elem).parent("div").removeClass("zf-wb-errorCont"); 513 571 $("#paramError").hide(); 514 572 } 573 574 jQuery(function(){ 575 /*setTimeout(function(){ 576 if(!window.tinyMCEPopup || !tinyMCEPopup.uiWindow || !url){ 577 return; 578 } 579 var titleEl = tinyMCEPopup.uiWindow.getEl("title"); 580 if(!titleEl || titleEl.getElementsByTagName("img").length){ 581 return; 582 } 583 var icon = titleEl.ownerDocument.createElement("img"); 584 icon.src = url + "/../images/zohoforms.png"; 585 icon.alt = ""; 586 icon.style.width = "18px"; 587 icon.style.height = "18px"; 588 icon.style.marginRight = "8px"; 589 icon.style.verticalAlign = "middle"; 590 titleEl.insertBefore(icon, titleEl.firstChild); 591 }, 0);*/ 592 function setupSelect(selector, onChange){ 593 var $el = jQuery(selector); 594 if(!$el.length || !jQuery.fn.select2 || $el.data("select2")){ 595 return; 596 } 597 $el.select2({ 598 width: "100%", 599 dropdownParent: jQuery(".zf-WpPopupContainer"), 600 minimumResultsForSearch: Infinity 601 }); 602 if(onChange){ 603 $el.on("change.zfSelect2", onChange); 604 } 605 } 606 setupSelect("#zf_domain", hideDomainSelctError); 607 setupSelect("#formname"); 608 jQuery(document).on("mousedown.zfSelect2", function(event){ 609 if(jQuery(event.target).closest(".select2-container").length){ 610 return; 611 } 612 jQuery("#zf_domain, #formname").each(function(){ 613 var $el = jQuery(this); 614 if($el.data("select2")){ 615 $el.select2("close"); 616 } 617 }); 618 }); 619 }); -
zoho-forms/trunk/tinymce/zforms_dialog.php
r3729081 r3748754 15 15 <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/form_utils.js"></script> 16 16 <script type="text/javascript" src="jquery.js"></script> 17 <script type="text/javascript" src="../lib/select2/select2.min.js"></script> 17 18 <script language="javascript" type="text/javascript" src="zforms_dailog.js"></script> 18 <link href="zforms_dailog.css" rel="stylesheet"> 19 </head> 20 <body style="background: rgba(0,0,0,0.7);"> 19 <!-- <link href="zforms_dailog.css" rel="stylesheet"> --> 20 <link href="../lib/select2/select2.min.css" rel="stylesheet"> 21 <link href="../zohoforms-block.css" rel="stylesheet"> 22 <link href="zforms_newdialog.css" rel="stylesheet"> 23 </head> 24 <body style="background: rgba(0,0,0,0.7);"> 21 25 22 <div class="zf-WpPopupContainer ">26 <div class="zf-WpPopupContainer zf-wb-containerWrapper"> 23 27 <div class="zf-WpMainWrap"> 24 28 25 29 <input id="zf_embedCatogory" type="hidden" value="formPerma"> 26 <div class="zf-WpFormPermaWrap" id="zf_tiny_homeDiv" > 27 <p>You can choose a form from your Zoho Form's account or enter your form's permalink</p> 28 <button onclick="showChooseFormDiv();">Access Zoho Forms</button> 29 <span>or</span> 30 <a onclick="embedPerma();">Enter Form Permalink</a> 31 </div> 32 33 <div class="zf-WpEmbeddedWrap zf-EmbedInner" id="permaLinkDiv" style="display:none"> 34 <div class="zf-WpEmbeddedHead"> 35 <span onclick="goToHome();"> 36 <img src="backbtn.jpg"> 37 </span> 38 <h3>Embedded with Permalink</h3> 39 </div> 40 41 42 <div class="zf-WpEmbeddedContainer"> 43 <div class="embeddedPublicLink" id="permaContainer"> 44 <label>Enter your form's public Link <em>*</em></label> 45 <textarea onchange="hideError()" id="permalink"></textarea> 46 <span>Not sure where to find your form's permalink URL? <a href="https://www.zoho.com/forms/help/share/public-sharing.html#link" target="_blank">Click here</a> to learn more.</span> 47 <p id="permaLinkError" style="display:none;"/> 48 </div> 49 </div> 50 </div> 51 <div class="zf-WpEmbeddedWrap zf-EmbedInner" id="chooseFormDiv" style="display: none;"> 52 <div class="zf-WpEmbeddedHead"> 53 <span onclick="goToHome();"><img src="backbtn.jpg"></span> 54 <h3>Choose your form</h3> 55 </div> 56 <div id="domainSelectionDiv" class="zf-WpSelectDomain"> 57 <label>Choose the domain where you've registered your Zoho account.<em>*</em></label> 58 <span class="cusDropArrow"></span> 59 <select id="zForm_domain" onchange="hideDomainSelctError()"; > 60 <option value="-select-">-Select-</option> 61 <option value=".com">zoho.com</option> 62 <option value=".eu">zoho.eu</option> 63 <option value=".com.cn">zoho.com.cn</option> 64 <option value=".in">zoho.in</option> 65 <option value=".com.au">zoho.com.au</option> 66 <option value=".jp">zoho.jp</option> 67 <option value=".ca">zohocloud.ca</option> 68 <option value=".sa">zoho.sa</option> 69 </select> 70 71 <p id="domainSelectionErr" style="display:none">Please choose a domain.</p> 72 <div class="zf-wpFooter" style="border-top: 0px;"> 73 <button onclick="proceedToSelectFormOnTinyMce();">Connect</button> 74 </div> 75 </div> 76 <div class="zf-WpSelectDomain zf-WpSelectFrm" id="formSelectionDiv" style="display:none"> 77 <div id="selctContainer"> 78 <label>Choose a form<em>*</em></label> 79 <span class="cusDropArrow"></span> 80 <select id="formname" onchange="showEmbedActionsDiv();hideError();"; style="width: 100%" > 81 <option value="-Select-">-Select-</option> 82 </select> 83 84 <p id="formSelectionError" /> 85 </div> 86 </div> 87 <div class="zf-WpFormPermaWrap zf-WpFormRefresh" id="signinDiv" style="display:none"> 88 <p> Sign in to your Zoho Forms account to select a form. </p> 89 <div class="zf-wpFooter" style="border-top: 0px;"> 90 <button onclick="signin()">Sign In</button> 91 </div> 92 </div> 93 <div class="zf-WpFormPermaWrap zf-WpFormRefresh" id="createFormDiv" style="display:none"> 94 <p> You have not created any forms yet. Click on Create to build a new form. </p> 95 <div class="zf-wpFooter" style="border-top: 0px;"> 96 <button onclick="createForm()">Create</button> 97 </div> 98 </div> 99 <div class="zf-WpFormPermaWrap zf-WpFormRefresh" id="refreshDiv" style="display:none"> 100 <p> Please Refresh to view your forms. </p> 101 <div class="zf-wpFooter" style="border-top: 0px;"> 102 <button id="button_refresh" onclick="proceedToSelectFormOnTinyMce()">Refresh</button> 103 </div> 104 </div> 105 <div id="loadingDiv" class="zf-WpFormPermaWrap zf-WpFormRefresh" style="display: none;"> 30 <div class="connFormCont"> 31 <div> 32 <!-- <div class="connFormHeader"> 33 <i> 34 <img src="../images/zohoforms.png" alt=""> 35 </i> 36 <h4>Connect Your Form</h4> 37 </div> --> 38 <div class="customAddMapping"> 39 <a id="chooseFormStep" class="is-selected"> 40 <span elname="stepNumber">1</span> 41 <span elname="tickIcon" style="display: none;"> 42 <img src="../images/completed.png" alt=""> 43 </span> 44 <em>Choose Form</em> 45 </a> 46 <a id="configureEmbedStep"> 47 <span elname="stepNumber">2</span> 48 <span elname="tickIcon" style="display: none;"> 49 <img src="../images/completed.png" alt=""> 50 </span> 51 <em>Embed Settings</em> 52 </a> 53 </div> 54 </div> 55 <div id="zf_tiny_homeDiv" class="connFormInnCont"> 56 <div class="zf-wb-signWrapper zconnectMainCont"> 57 <h2>Choose a way to embed your form</h2> 58 <div class="accCardCont"> 59 <div id="accessZohoFormsCard" class="accConectCard" onclick="selectConnectionCard(this);"> 60 <i> 61 <img src="../images/access-form.png" alt=""> 62 </i> 63 <div class="accCardRight"> 64 <h4>Access Zoho Forms</h4> 65 <p>Sign in to Zoho Forms and choose a form.</p> 66 </div> 67 68 </div> 69 <div id="embedUsingPermalinkCard" class="accConectCard" onclick="selectConnectionCard(this);"> 70 <i> 71 <img src="../images/icon-link.png" alt=""> 72 </i> 73 <div class="accCardRight"> 74 <h4>Use a Permalink</h4> 75 <p>Embed a form using its permalink URL.</p> 76 </div> 77 78 </div> 79 </div> 80 </div> 81 <div class="connFormFooter"> 82 <button class="greenBtnNew" onclick="proceedFromHome();">Next</button> 83 </div> 84 </div> 85 86 <div class="zf-wb-outerWrapper" id="chooseFormDiv" style="display: none;"> 87 <div id="loadingDiv" class="zf-wb-loading" style="display: none;"> 106 88 <p>loading</p> 107 89 <div class="zf-wb-spinner"> … … 111 93 </div> 112 94 </div> 113 </div> 114 115 <div class="zf-WpEmbeddedWrap" id="embedActionsDiv" style="display:none"> 116 <div class="embedFormUsing"> 117 <label>Embed form using</label> 118 <div class="flLeft cusRadioButton"> 119 <span> 120 <input name="embedType" id="iframeEmbed" type="radio" value="iframe" checked="" onchange="showiframeOrJsChange();"> 121 <label for="iframeEmbed">Iframe</label> 122 </span> 123 <span> 124 <input name="embedType" id="jsEmbed" type="radio" value="jsCode" onchange="showiframeOrJsChange();"> 125 <label for="jsEmbed">Javascript</label> 126 </span> 127 </div> 128 <div id="autoHeightDiv" style="display:none;" class="flLeft cusCheckBox"> 129 <input type="checkbox" id="autoHeightCB" onchange="disableHeight();"> 130 <label for="autoHeightCB">Set form height automatically.</label> 131 </div> 132 133 <div class="embedFormInputField"> 134 <span> 135 <label>Width</label> 136 <input type="text" value="100%" id="width"> 137 </span> 138 <span> 139 <label>Height</label> 140 <input type="text" value ="600px" id="height"> 141 </span> 142 </div> 143 </div> 144 <div class="embedIncldeParamtrs"> 145 <div class="cusCheckBox"> 146 <input type="checkbox" id="queryParamsCB" onchange="showOrHideUrlParamsDiv();"> 147 <label for="queryParamsCB">Include URL Parameters</label> 148 </div> 149 <span>Include parameters to prefill forms and add referrers to track sources</span> 150 </div> 151 <div class="embedParameterValue" id="urlParamsDiv" style="display:none;"> 152 <div class="embedField"> 153 <div class="embedFiel_Col1"> Parameter Name </div> 154 <div class="embedFiel_Col2"> Parameter Value </div> 95 <div id="zDomaindiv" class="connFormInnCont"> 96 <div class="zf-wb-innerWrapper zconnectMainCont"> 97 <label>Select the domain your Zoho account is registered on. <em>*</em></label> 98 <div class="zf-wb-dropWrapper"> 99 <select id="zf_domain" onchange="hideDomainSelctError();"> 100 <option value="-select-">-Select-</option> 101 <option value=".com">zoho.com</option> 102 <option value=".eu">zoho.eu</option> 103 <option value=".com.cn">zoho.com.cn</option> 104 <option value=".in">zoho.in</option> 105 <option value=".com.au">zoho.com.au</option> 106 <option value=".jp">zoho.jp</option> 107 <option value=".ca">zohocloud.ca</option> 108 <option value=".sa">zoho.sa</option> 109 </select> 110 </div> 111 <p id="domainErr" style="display: none;">Please choose a domain.</p> 112 </div> 113 <div class="connFormFooter"> 114 <button onclick="goToHome();">Back</button> 115 <button class="greenBtnNew" onclick="proceedToSelectFormOnTinyMce();"> 116 <em id="connectLoadingImgElem" class="newBtnLoader" style="display: none;"></em>Connect 117 </button> 118 </div> 119 </div> 120 <div id="zfRefreshDiv" class="refreshCont" style="display: none;"> 121 <img src="../images/refresh-form.png" alt=""> 122 <h3>Sign in on the Zoho page, then come back and refresh to load your forms.</h3> 123 <div class="refFormFooter"> 124 <button onclick="goToHome();">Back</button> 125 <button class="greenBtnNew" onclick="proceedToSelectFormOnTinyMce();"> 126 <em id="refreshLoadingImgElem" class="newBtnLoader" style="display: none;"></em>Refresh 127 </button> 128 </div> 129 </div> 130 <div id="zfCreateFormDiv" class="refreshCont" style="display: none;"> 131 <img src="../images/refresh-form.png" alt=""> 132 <h3>You don't have any forms.</h3> 133 <div class="refFormFooter"> 134 <button class="greenBtnNew" onclick="createForm();"> 135 <em id="createLoadingImgElem" class="newBtnLoader" style="display: none;"></em>Create a new form 136 </button> 137 </div> 138 </div> 139 </div> 140 141 <div id="embedActionsDiv" class="embedActionsDiv" style="display: none;"> 142 <div class="zconnectMainCont"> 143 <div id="formSelectionDiv" class="zf-wb-innerWrapper" style="display: none;"> 144 <div class="zf-wb-innerWrapper" id="selctContainer"> 145 <label>Choose a form <em>*</em></label> 146 <div class="zf-wb-dropWrapper"> 147 <select id="formname" onchange="showEmbedActionsDiv();hideError();"> 148 <option value="-Select-">-Select-</option> 149 </select> 150 </div> 151 <p id="formSelectionError" style="display: none;">Please select a form.</p> 152 </div> 153 </div> 154 <div id="permaLinkDiv" class="zf-wb-outerWrapper" style="display: none;"> 155 <div class="zf-wb-innerWrapper" id="permaContainer"> 156 <label>Enter your form's permalink URL <em>*</em></label> 157 <textarea id="permalink" rows="4" style="width: 100%;" onchange="hideError();"></textarea> 158 <p id="permaLinkError" style="display: none;">Please enter your form's permalink URL.</p> 159 <span>Need help finding your permalink? <a href="https://help.zoho.com/portal/en/kb/forms/sharing-forms/articles/sharing-a-form-publicly#Sharing_a_link" target="_blank">Learn more</a></span> 160 </div> 161 </div> 162 <div class="embedFormDivider"></div> 163 <div class="embedFormUsing"> 164 <div class="embedFormInputField"> 165 <span> 166 <label>Width </label> 167 <div class="embedInputCont"> 168 <input type="text" id="formWidth" placeholder="100" oninput="allowOnlyNumbers(this);"> 169 <div class="embedInputPer"> 170 <i onclick="selectWidthUnit(this);" size_symbol="px">px</i> 171 <i class="selected" onclick="selectWidthUnit(this);" size_symbol="%">%</i> 172 </div> 155 173 </div> 156 <div class="clearBoth"></div> 157 <div class="addparamsWrap" elname="paramTemplate" eltype="keyValPair" style="display:none;"> 158 <div class="addParamaFeld"> 159 <input type="text" elname="paramKey" maxlength="50" onchange="hideparamError(this);"> 160 </div> 161 <div class="intArrow"><em class="arrowImg"></em></div> 162 <div class="addParamaFeld"> 163 <input type="text" elname="value" maxlength="50"> 164 </div> 165 <div class="zf-Wp-plusminus"> 166 <span class="fiedPropPlus" onclick="addUrlParam(this);"></span> 167 <span class="fiedPropMinus" onclick="deleteParam(this);"> </span> 168 </div> 174 175 </span> 176 <div id="autoHeightDiv" class="cusCheckBox autoHeightDiv"> 177 <input type="checkbox" id="autoHeightCB" onchange="disableHeight();"> 178 <label for="autoHeightCB">Set Custom Height.</label> 179 </div> 180 <span id="formHeightDiv" style="display: none;"> 181 <label>Height </label> 182 <div class="embedInputCont"> 183 <input type="text" id="formHeight" class="formHeight" placeholder="600" oninput="allowOnlyNumbers(this);"> 184 <div class="embedInputPer"> 185 <i size_symbol="px">px</i> 169 186 </div> 170 <div elname="paramsDiv">171 187 </div> 172 </div> 173 <div id="paramError" class="errorCont" style="display:none;"> 174 <p>Parameters should contain only alphanumeric characters, underscore, and hyphen.</p> 175 </div> 176 <div class="clearBoth"></div> 177 <div class="zf-wpFooter"> 178 <button onclick="zforms_submit()">Embed</button> 179 </div> 188 189 </span> 190 </div> 191 </div> 192 <div class="embedFormDivider"></div> 193 <div class="embedIncldeParamtrs"> 194 <div class="cusCheckBox"> 195 <input type="checkbox" id="queryParamsCB" onchange="showOrHideUrlParamsDiv();"> 196 <label for="queryParamsCB">Add URL Parameters</label> 197 </div> 198 <span>Prefill form fields and track where responses come from.</span> 199 </div> 200 <div id="urlParamsDiv" class="embedParameterValue" style="display: none;"> 201 <div class="embedField"> 202 <div class="embedFiel_Col1"> 203 <label>Parameter Name</label> 204 </div> 205 <div class="embedFiel_Col2"> 206 <label>Parameter Value </label> 207 </div> 208 </div> 209 <div class="clearBoth"></div> 210 <div elname="paramsDiv"></div> 211 <div class="clearBoth"></div> 212 <div elname="paramTemplate" class="addparamsWrap" eltype="keyValPair" style="display: none;"> 213 <div class="addParamaFeld"> 214 <input type="text" elname="paramKey" maxlength="50" onchange="hideparamError(this);"> 215 </div> 216 <div class="addParamaFeld"> 217 <input type="text" elname="value" maxlength="50"> 218 </div> 219 <div class="zf-Wp-plusminus"> 220 <span class="fiedPropPlus" elname="addParam" onclick="addUrlParam(this);"></span> 221 <span class="fiedPropMinus" elname="deleteParam" onclick="deleteParam(this);"></span> 222 </div> 223 </div> 224 </div> 225 <div class="zf-wb-errorCont" id="paramError" style="display: none;"> 226 <p>Parameters should contain only alphanumeric characters, underscore, and hyphen.</p> 227 </div> 228 </div> 229 <div class="connFormFooter"> 230 <button type="button" onclick="goToHome();">Back</button> 231 <button type="button" class="greenBtnNew" onclick="zforms_submit();"> 232 <em elem="loadingImgElem" class="newBtnLoader" style="display: none;"></em>Embed Form 233 </button> 234 </div> 235 </div> 180 236 </div> 181 237 </div> … … 184 240 </body> 185 241 </html> 186 -
zoho-forms/trunk/tinymce/zforms_editor_plugin.js
r3729081 r3748754 17 17 title : 'Zoho Forms', 18 18 cmd : 'zforms_embed_window', 19 image : url+'/ zohoforms.png',19 image : url+'/../images/zohoforms.png', 20 20 }); 21 21 return false; -
zoho-forms/trunk/zohoForms.php
r3729081 r3748754 148 148 function loadZohoFormsBlockFiles() { 149 149 wp_enqueue_script( 150 'zoho-forms-select2', 151 plugin_dir_url(__FILE__) . 'lib/select2/select2.min.js', 152 array('jquery'), 153 '4.0.13', 154 true 155 ); 156 wp_enqueue_script( 150 157 'zoho-forms-block-js', 151 158 plugin_dir_url(__FILE__) . 'zohoforms-block.js', 152 array('wp-blocks', 'wp-element', 'wp-block-editor', 'wp-i18n', 'jquery' ),159 array('wp-blocks', 'wp-element', 'wp-block-editor', 'wp-i18n', 'jquery', 'zoho-forms-select2'), 153 160 ZOHO_FORMS_VERSION, 154 161 true … … 156 163 wp_localize_script( 'zoho-forms-block-js', 'zohoFormsBlock', array( 157 164 'blockCSS' => plugin_dir_url(__FILE__) . 'zohoforms-block.css', 158 'favIconPath' => plugin_dir_url(__FILE__) . 'tinymce/zFormsIcon.png' 165 'select2CSS' => plugin_dir_url(__FILE__) . 'lib/select2/select2.min.css', 166 'favIconPath' => plugin_dir_url(__FILE__) . 'images/zFormsIcon.png', 167 'accessFormIcon' => plugin_dir_url(__FILE__) . 'images/access-form.png', 168 'permalinkIcon' => plugin_dir_url(__FILE__) . 'images/icon-link.png', 169 'refreshFormIcon' => plugin_dir_url(__FILE__) . 'images/refresh-form.png', 170 'zohoFormsIcon' => plugin_dir_url(__FILE__) . 'images/zohoforms.png', 171 'completedIcon' => plugin_dir_url(__FILE__) . 'images/completed.png' 159 172 ) ); 160 173 } -
zoho-forms/trunk/zohoforms-block.css
r3729081 r3748754 1 .body{ 2 margin: 0; 3 padding: 0; 4 font-family: Arimo, Helvetica, sans-serif; 5 6 } 7 8 input:focus, textarea:focus, select:focus{ outline: none !important; border-color: #24A68A !important; box-shadow: none !important;} 9 button:focus{outline: none;} 10 button{cursor: pointer;} 11 12 .clearBoth{ 13 clear:both; 14 } 15 16 .flLeft{ 17 float:left; 18 } 19 20 .flRight{ 21 float:right; 22 } 23 24 .zf-wb-containerWrapper{ 25 letter-spacing:0.5px; 26 width: 100%; 27 padding: 0 10px; 28 padding-top: 10px; 29 } 30 31 .zf-wb-tabToggle{ 32 width: 60%; 33 margin:0 auto; 34 font-size: 14px; 35 font-weight: 400; 36 margin-bottom: 10px; 37 } 38 39 .zf-wb-tabToggle ul{ 40 display: table; 41 width: 100%; 42 padding: 0; 43 margin: 0 !important; 44 } 45 46 .zf-wb-tabToggle ul li{ 47 padding:6px 8px; 48 border-collapse: collapse; 49 border-width: 1px 0 1px 1px; 50 border-color: #d8d8d8; 51 border-style: solid; 52 overflow: hidden; 53 display: table-cell; 54 text-align: center; 55 cursor: pointer; 56 width: 50%; 57 } 58 59 .zf-wb-tabToggle ul li:last-child{ 60 border-width: 1px; 61 -webkit-border-radius:0px 25px 25px 0; 62 -moz-border-radius:0px 25px 25px 0; 63 border-radius:0px 25px 25px 0; 64 } 65 66 .zf-wb-tabToggle ul li:first-child{ 67 -webkit-border-radius:25px 0 0 25px; 68 -moz-border-radius:25px 0 0 25px; 69 border-radius:25px 0 0 25px; 70 } 71 72 .zf-wb-tabToggle ul li.active{ 73 border:1px solid #007AFF; 74 background: #007AFF; 75 color: #fff; 76 cursor: default; 77 } 78 79 .zf-wb-tabToggle ul li.active ~ li{ 80 border-width: 1px 1px 1px 0; 81 } 82 83 .zf-wb-outerWrapper{ font-size: 14px !important;} 84 .zf-wb-outerWrapper .zf-wb-desc{ font-size: 14px; color: #666; text-align: center; margin-bottom:20px;} 85 .zf-wb-outerWrapper .zf-wb-innerWrapper{ padding-bottom:20px;} 86 .zf-wb-outerWrapper .zf-wb-innerWrapper label{ display: block;margin-bottom:5px;} 87 .zf-wb-outerWrapper .zf-wb-innerWrapper label em{ color:#ff0000;font-size:16px;} 88 89 .zf-wb-outerWrapper .zf-wb-innerWrapper input, .zf-wb-outerWrapper .zf-wb-innerWrapper textarea{ width: 100%; border:1px solid #d6d6d6;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:4px; font-size: 14px;} 90 91 .zf-wb-outerWrapper .zf-wb-twoColumns .zf-wb-innerWrapper{ width: 45%;} 92 93 .zf-wb-errorCont input, .zf-wb-errorCont textarea{ border: 1px solid #ff0000 !important;} 94 95 .zf-wb-errorCont input:focus, .zf-wb-errorCont textarea:focus{ border:1px solid #ff0000 !important; -moz-box-shadow: none !important;-webkit-box-shadow: none !important;box-shadow: none !important;} 96 97 .zf-wb-errorCont p{font-size:13px !important; color:#ff0000; margin:0 !important; padding-top:3px;} 98 99 .zf-wb-Fotter{ text-align:center; border-top: 1px solid #d6d6d6; padding:20px 0; padding-bottom: 10px; margin-top: -1px;} 100 .zf-wb-Fotter button{ padding:6px 18px; border: 1px solid #d6d6d6; font-size: 14px !important; margin: 0 5px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px; line-height: 21px !important;} 101 .zf-wb-blue{border: 1px solid #24A68A;background: #24A68A;color: #fff;border-radius: 3px;font-size: 14px;cursor: pointer;padding: 10px 12px;display: inline-block;} 102 .zf-wb-red{background:#f04b2f; color:#fff !important; border:1px solid #f04b2f !important;} 103 .zf-wb-green{background:#00A552; color:#fff !important; border:1px solid #00A552 !important;} 104 .zf-wb-white{background:#fff; border:1px solid #adadad !important;} 105 106 .zf-wb-signWrapper{ text-align: center; font-size: 14px; padding: 10px 0 20px 0; margin-bottom: 10px;} 107 .zf-wb-signWrapper p{ margin: 0 !important;font-size: 15px !important;line-height: 23px !important;margin-bottom: 15px !important;} 108 .zf-wb-signWrapper button{ padding:6px 18px; border: 1px solid #d6d6d6; font-size: 14px !important; margin: 0 5px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px; margin-top: 5px;} 109 110 .zf-wb-dropWrapper{ border:1px solid #d6d6d6; position: relative; height:32px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px; overflow: hidden;} 111 .zf-wb-dropWrapper::before{ content: "";right: 12px;top: 11px; position: absolute;width: 0; height: 0; border-left: 6px solid transparent;border-right: 6px solid transparent;border-top: 7px solid #222;} 112 113 .zf-wb-dropWrapper select{ 114 position: absolute; 115 top: 0; 116 border: 0 none !important; 117 width: 100%; 118 max-width: 100%; 119 outline: none !important; 120 -moz-outline: none !important; 121 margin: 0; 122 appearance: none; 123 -moz-appearance: radio-container; 124 -webkit-appearance: none; 125 background: transparent; 126 text-overflow: ''; 127 webkit-user-select: none; 128 -moz-user-select: none; 129 -ms-user-select: none; 130 -o-user-select: none; 131 user-select: none; 132 text-indent: 2px; 133 white-space: nowrap; 134 text-overflow: ellipsis; 135 height: auto; 136 font-size: 14px !important; 137 padding-bottom: 5px; 138 line-height: inherit;; 139 } 140 .zf-wb-dropWrapper select:hover{color:#444 !important;} 141 .zf-wb-dropWrapper select:focus, .zf-wb-dropWrapper select:hover, .zf-wb-dropWrapper select option{-moz-outline: none !important; outline: none !important; border:none; -moz-box-shadow: none !important;-webkit-box-shadow: none !important;box-shadow: none !important;outline-offset: -2px !important; color: #444;} 142 select:-moz-focusring {color: transparent !important;text-shadow: 0 0 0 #000 !important;} 143 .zf-wb-infoDiv { position: relative;border-radius: 100px;border: 2px solid #1a75ef;width: 38px;height: 38px;z-index: 9999999;padding: 5px;line-height: 33px;text-align: center;display: inline-block;margin-bottom: 15px;} 144 .zf-wb-infoDiv:before { position: absolute;content: "i";color: #1a75ef;font-size: 20px;left: 15px;font-weight: 600;top: 0;} 145 .zf-wb-signWrapper a { color: #24A68A !important;cursor: pointer;text-decoration: underline !important;box-shadow: none !important;font-size: 16px;} 146 .zf-wb-signWrapper label {margin: 0 12px !important;font-size: 15px;color: #999;cursor: default;} 147 .zf-wb-headwrap { border-bottom: 1px solid #ccc; padding: 0 0 12px 0; margin-bottom: 20px;} 148 .zf-wb-heading { padding: 0 0 0 42px;font-size: 17px;font-weight: 600;} 149 .zf-wb-backIocn { position: relative; border: 1px solid #ccc; width: 23px; height: 23px; float: left; cursor: pointer; margin: 2px 0 0 0;} 150 .zf-wb-backIocn svg { display: inline-block; width: 15px; height: 17px; stroke-width: 0; stroke: currentColor; fill: #a2a2a2; position: absolute; left: 2px; top: -1px;} 151 .zf-wb-innerWrapper span { color: #777;} 152 .zf-wb-innerWrapper a:hover { box-shadow: none !important;color: #24A68A !important;} 153 .zf-wb-innerWrapper a { color: #24A68A !important;text-decoration: underline !important;box-shadow: none !important;} 154 .zf-wb-connect-btn{ text-align: center;border-top: none;} 155 .zf-wb-errorCont .zf-wb-dropWrapper { border: 1px solid #ff0000;} 156 .zf-wb-loading{ text-align: center;} 157 .zf-wb-loading p{ display: inline;padding: 0 10px 0 0px !important;} 158 .zf-wb-lightblue { background: #E3F0FF; color: #153C69; border: 1px solid #C8E1FE !important; 159 } 160 .zf-wb-dropWrapper select{height: 32px;} 161 162 /*loading animation */ 163 .zf-wb-spinner { text-align: center;display: inline;position: relative;top: 2px;} 164 .zf-wb-spinner > div { 165 width: 11px; 166 height: 11px; 167 background-color: #333; 168 169 border-radius: 100%; 170 display: inline-block; 171 -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both; 172 animation: sk-bouncedelay 1.4s infinite ease-in-out both; 173 } 174 175 .zf-wb-spinner .bounce1 { 176 -webkit-animation-delay: -0.32s; 177 animation-delay: -0.32s; 178 } 179 180 .zf-wb-spinner .bounce2 { 181 -webkit-animation-delay: -0.16s; 182 animation-delay: -0.16s; 183 } 184 185 @-webkit-keyframes sk-bouncedelay { 186 0%, 80%, 100% { -webkit-transform: scale(0) } 187 40% { -webkit-transform: scale(1.0) } 188 } 189 190 @keyframes sk-bouncedelay { 191 0%, 80%, 100% { 192 -webkit-transform: scale(0); 193 transform: scale(0); 194 } 40% { 195 -webkit-transform: scale(1.0); 196 transform: scale(1.0); 197 } 198 } 199 200 .zf-WpEmbeddedWrap { 201 padding: 0 25px; 202 } 203 .zf-WpEmbeddedWrap .zf-WpSelectFrm .cusDropArrow { 204 top: 60px; 205 } 206 .embedFormUsing label { 207 font-size: 15px; 208 margin-bottom: 12px; 209 display: inline-block; 210 } 211 .embedFormUsing { 212 padding-bottom: 15px; 213 margin-bottom: 15px; 214 } 215 .cusRadioButton span { 216 margin-right: 25px; 217 } 218 .cusRadioButton [type="radio"]:checked, .cusRadioButton [type="radio"]:not(:checked) { 1 .body{ 2 margin: 0; 3 padding: 0; 4 font-family: Arimo, Helvetica, sans-serif; 5 6 } 7 8 input:focus, textarea:focus, select:focus{ outline: none !important; border-color: #24A68A !important; box-shadow: none !important;} 9 button:focus{outline: none;} 10 button{cursor: pointer;} 11 12 .clearBoth{ 13 clear:both; 14 } 15 16 .flLeft{ 17 float:left; 18 } 19 20 .flRight{ 21 float:right; 22 } 23 24 25 .zconnectMainCont { 26 padding: 24px 32px; 27 min-height: 290px; 28 box-sizing: border-box; 29 } 30 .zf-wb-outerWrapper .zf-wb-desc{ font-size: 14px; color: #666; text-align: center; margin-bottom:20px;} 31 .zf-wb-outerWrapper .zf-wb-innerWrapper h4{ 32 font-size: 13px; 33 color: #454e5c; 34 margin: 0; 35 margin-bottom: 14px; 36 } 37 .zf-wb-innerWrapper label { 38 font-size: 14px; 39 color: #222; 40 font-weight: 500; 41 margin-bottom: 8px; 42 display: block; 43 } 44 .zf-wb-outerWrapper label em{ color:#ff0000;font-size:16px;} 45 46 .zf-wb-outerWrapper .zf-wb-innerWrapper input, .zf-wb-outerWrapper .zf-wb-innerWrapper textarea{ width: 100%; border:1px solid #d6d6d6;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;padding:4px; font-size: 14px;} 47 .zf-wb-outerWrapper .zf-wb-innerWrapper textarea { 48 height: 105px; 49 box-sizing: border-box; 50 padding: 12px; 51 } 52 53 54 .zf-wb-errorCont input, .zf-wb-errorCont textarea{ border: 1px solid #ff0000 !important;} 55 56 .zf-wb-errorCont input:focus, .zf-wb-errorCont textarea:focus{ border:1px solid #ff0000 !important; -moz-box-shadow: none !important;-webkit-box-shadow: none !important;box-shadow: none !important;} 57 58 .zf-wb-errorCont p{font-size:13px !important; color:#ff0000; margin: 0; 59 margin-bottom: 4px;} 60 .zf-wb-dropWrapper{ 61 border: 1px solid #ccd6e0; 62 position: relative; 63 height: 38px; 64 -moz-border-radius: 4px; 65 -webkit-border-radius: 4px; 66 border-radius: 4px; 67 overflow: hidden; 68 margin-bottom: 6px; 69 } 70 .zf-wb-dropWrapper::before{ content: ""; 71 right: 18px; 72 position: absolute; 73 border-left: 6px solid transparent; 74 border-right: 6px solid transparent; 75 border-top: 17px solid #222; 76 border: solid #222; 77 border-width: 0 1.5px 1.5px 0; 78 top: 17px; 79 width: 10px; 80 height: 10px; 81 box-sizing: border-box; 82 transform: rotate(45deg);} 83 84 .zf-wb-dropWrapper select{ 219 85 position: absolute; 220 left: -9999px; 221 } 222 .cusRadioButton [type="radio"]:checked + label, .cusRadioButton [type="radio"]:not(:checked) + label { 223 position: relative; 224 padding-left: 26px !important; 225 cursor: pointer; 226 line-height: 16px; 227 display: inline-block; 228 color: #444; 86 top: 0; 87 border: 0 none !important; 88 width: 100%; 89 max-width: 100%; 90 outline: none !important; 91 -moz-outline: none !important; 229 92 margin: 0; 230 font-weight: normal; 231 font-size: 15px; 232 } 233 .cusRadioButton [type="radio"]:checked + label:before, .cusRadioButton [type="radio"]:not(:checked) + label:before { 234 content: ''; 235 position: absolute; 236 left: 0; 237 top: 0; 238 width: 15px; 239 height: 15px; 240 border: 1px solid #24A68A; 241 border-radius: 100%; 242 background: #fff; 243 } 244 .cusRadioButton [type="radio"]:checked + label:after { 245 opacity: 1; 246 -webkit-transform: scale(1); 247 transform: scale(1); 248 } 249 250 .cusRadioButton [type="radio"]:checked + label:after, .cusRadioButton [type="radio"]:not(:checked) + label:after { 251 content: ''; 252 width: 9px; 253 height: 9px; 254 background: #24A68A; 255 position: absolute; 256 top: 3px; 257 left: 3px; 258 border-radius: 100%; 259 -webkit-transition: all 0.2s ease; 260 transition: all 0.2s ease; 261 } 262 .cusRadioButton [type="radio"]:not(:checked) + label { 263 color: #444; 264 } 265 .cusRadioButton [type="radio"]:not(:checked) + label:after { 266 opacity: 0; 267 -webkit-transform: scale(0); 268 transform: scale(0); 269 } 270 .cusRadioButton { 271 margin-bottom: 20px; 272 } 273 274 .cusCheckBox [type="checkbox"] { 275 border: 0; 276 clip: rect(1px, 1px, 1px, 1px); 277 -webkit-clip-path: inset(50%); 278 clip-path: inset(50%); 279 height: 1px; 280 overflow: hidden; 281 padding: 0; 282 position: absolute; 283 width: 1px; 284 white-space: nowrap; 285 } 286 .cusCheckBox [type="checkbox"] + label { 287 position: relative; 288 -webkit-user-select: none; 93 appearance: none; 94 -moz-appearance: radio-container; 95 -webkit-appearance: none; 96 background: transparent; 97 text-overflow: ''; 98 webkit-user-select: none; 289 99 -moz-user-select: none; 290 100 -ms-user-select: none; 101 -o-user-select: none; 291 102 user-select: none; 103 text-indent: 2px; 104 white-space: nowrap; 105 text-overflow: ellipsis; 106 height: auto; 107 font-size: 14px !important; 108 padding-bottom: 5px; 109 line-height: inherit;; 110 } 111 112 .zf-wb-innerWrapper a { color: #24A68A !important;text-decoration: underline !important;box-shadow: none !important;} 113 .zf-wb-innerWrapper span { color: #454e5c; 114 font-size: 13px; 115 display: flex; 116 flex-wrap: wrap; 117 gap: 4px;} 118 .zf-wb-dropWrapper select{ height: 51px; 119 padding-left: 18px; 120 color: #222; 121 font-size: 16px !important;} 122 123 124 .cusCheckBox [type="checkbox"] { 125 border: 0; 126 clip: rect(1px, 1px, 1px, 1px); 127 -webkit-clip-path: inset(50%); 128 clip-path: inset(50%); 129 height: 1px; 130 overflow: hidden; 131 padding: 0; 132 position: absolute; 133 width: 1px; 134 white-space: nowrap; 135 } 136 .cusCheckBox [type="checkbox"] + label { 137 position: relative; 138 -webkit-user-select: none; 139 -moz-user-select: none; 140 -ms-user-select: none; 141 user-select: none; 142 cursor: pointer; 143 line-height: 17px; 144 padding-left: 26px; 145 display: inline-block; 146 font-size: 14px; 147 color: #222 !important; 148 } 149 .cusCheckBox [type="checkbox"]:not(:checked) + label:before, .cusCheckBox [type="checkbox"]:not(:checked) + .decisionCusCheckBox:before { 150 border: 1px solid #afafaf; 151 background: #fff; 152 } 153 .cusCheckBox [type="checkbox"] + label::before{ 154 155 background-color: #24A68A; 156 border: 1px solid #24A68A; 157 box-sizing: content-box; 158 content: ''; 159 color: #444; 160 margin-right: 7px; 161 top: -1px; 162 left: 0; 163 width: 16px; 164 height: 16px; 165 display: inline-block; 166 vertical-align: middle; 167 position: absolute; 168 border-radius: 3px; 169 } 170 .cusCheckBox [type="checkbox"]:checked + label::after{ 171 content: ''; 172 -webkit-transform: rotate(-45deg) scale(1); 173 transform: rotate(-45deg) scale(1); 174 transition: -webkit-transform 200ms ease-out; 175 transition: transform 200ms ease-out; 176 transition: transform 200ms ease-out, -webkit-transform 200ms ease-out; 177 } 178 179 .cusCheckBox [type="checkbox"] + label::after { 180 background-color: transparent; 181 top: 9.5px; 182 left: 4px; 183 position: absolute; 184 width: 9.2px; 185 height: 3px; 186 margin-top: calc(24px / -2 / 2 * 0.8); 187 border-style: solid; 188 border-color: #fff; 189 border-width: 0 0 2px 2px; 190 border-radius: 0; 191 -o-border-image: none; 192 border-image: none; 193 -webkit-transform: rotate(-45deg) scale(0); 194 transform: rotate(-45deg) scale(0); 195 transition: none; 196 } 197 198 .cusCheckBox { 199 margin-bottom: 3px; 200 display: flex; 201 } 202 .autoHeightDiv.cusCheckBox [type="checkbox"] + label { 203 color: #475568 !important; 204 font-weight: 400; 205 margin-bottom: 0; 206 } 207 .embedInputCont { 208 position: relative; 209 display: inline-flex; 210 align-items: center; 211 } 212 .embedInputCont input { 213 padding-right: 40px; 214 } 215 .embedInputCont input[type="text"].formHeight { 216 padding-right: 50px; 217 } 218 .embedInputPer { 219 display: flex; 220 position: absolute; 221 right: 3px; 222 background: #f0f4fb; 223 border-radius: 4px; 224 } 225 .embedInputPer i { 226 font-size: 13px; 227 color: #222; 228 border: 1px solid transparent; 229 width: 36px; 230 height: 29px; 231 display: flex; 232 justify-content: center; 292 233 cursor: pointer; 293 line-height: 17px; 294 padding-left: 30px; 295 display: inline-block; 296 font-size: 15px; 297 } 298 .cusCheckBox [type="checkbox"]:not(:checked) + label:before, .cusCheckBox [type="checkbox"]:not(:checked) + .decisionCusCheckBox:before { 299 border: 1px solid #ddd; 234 font-style: normal; 235 line-height: 28px; 236 } 237 .embedInputPer i.selected { 238 background: #fafffe; 239 border: 1px solid #7acab8; 240 border-radius: 4px; 241 cursor: default; 242 } 243 244 .embedFormInputField { 245 display: flex; 246 flex-flow: column; 247 width: 100%; 248 margin-bottom: 10px; 249 gap: 16px; 250 } 251 .embedFormInputField span { 252 253 } 254 .embedFormInputField label { 255 font-size: 13px; 256 display: block; 257 margin-bottom: 8px; 258 color: #222; 259 font-weight: 600; 260 } 261 .embedFormInputField span:last-child { 262 float: right; 263 } 264 .embedFormInputField input[type="text"] { 265 width: 140px; 266 box-sizing: border-box; 267 border-radius: 4px; 268 border: 1px solid #ccd6e0; 269 padding: 7px 87px 7px 10px; 270 font-size: 13px; 271 height: 38px; 272 } 273 .embedIncldeParamtrs span { 274 font-size: 14px; 275 color: #6b6b6b; 276 line-height: 23px; 277 margin-bottom: 15px; 278 margin-top: 10px; 279 display: flex; 280 flex-wrap: wrap; 281 } 282 .embedParameterValue { 283 border: 1px solid #eaeaea; 284 display: inline-block; 285 width: 100%; 286 padding-bottom: 7px; 287 border-radius: 4px; 288 margin-bottom: 10px; 289 } 290 .embedField { 291 background: #f3f5f9; 292 border-bottom: 1px solid #eaeaea; 293 padding: 10px 20px; 294 display: inline-block; 295 width: 100%; 296 box-sizing: border-box; 297 border-radius: 3px 3px 0 0; 298 } 299 .embedIncldeParamtrs label { 300 font-size: 15px; 301 font-weight: 500; 302 } 303 304 .embedFiel_Col1 { 305 width: 270px; 306 float: left; 307 font-size: 14px; 308 color: #000; 309 font-weight: 500; 310 } 311 .embedFiel_Col2 { 312 width: 270px; 313 float: left; 314 font-size: 14px; 315 color: #000; 316 font-weight: 500; 317 margin-left: 25px; 318 } 319 .addparamsWrap { 320 display: flex; 321 align-items: center; 322 gap: 16px; 323 width: 100%; 324 float: left; 325 padding: 14px 20px; 326 border-bottom: 1px solid #eaeaea; 327 box-sizing: border-box; 328 } 329 .addparamsWrap:last-of-type { 330 border-bottom: none; 331 } 332 .fiedPropPlus, .fiedPropMinus{ 333 width: 24px; 334 height: 24px; 335 background: url(./images/fieldprop-plus.png) no-repeat; 336 background-size: contain; 337 margin-top: 2px; 338 float: left; cursor: pointer; 339 left: 0px !important; 340 } 341 .fiedPropMinus { 342 background: url(./images/fieldprop-minus.png) no-repeat; 343 background-size: contain; 344 margin-left: 8px; 345 } 346 .addParamaFeld { 347 flex-grow: 1; 348 width: 220px; 349 } 350 .addParamaFeld input[type="text"] { 351 width: 100%; 352 border-radius: 3px; 353 border: 1px solid #ccd6e0; 354 box-sizing: border-box; 355 padding: 7px 10px; 356 font-size: 13px; 357 height: 36px; 358 } 359 input[type="text"]:disabled { 360 background: #ececec; 361 } 362 363 364 365 366 /* Rewamp UI Css Start */ 367 .connFormCont { 368 background: #fff; 369 border: 1px solid #ddd; 370 border-radius: 8px; 371 } 372 .connFormHeader { 373 width: 100%; 374 box-sizing: border-box; 375 padding: 20px 32px; 376 display: flex; 377 align-items: center; 378 border-bottom: 1px solid rgba(230, 230, 230, 0.6); 379 border-radius: 8px 8px 0 0; 380 flex-shrink: 0; 381 position: relative; 382 background: #fff; 383 overflow: hidden; 384 } 385 .connFormHeader i { 386 width: 32px; 387 height: 32px; 388 } 389 .connFormHeader i img { 390 width: 32px; 391 height: 32px; 392 } 393 .connFormHeader h4 { 394 font-size: 18px; 395 color: #000; 396 font-weight: bold; 397 overflow: hidden; 398 text-overflow: ellipsis; 399 text-align: left; 400 margin: 0; 401 margin-left: 12px; 402 padding: 0; 403 } 404 .connFormHeader i { 405 width: 22px; 406 height: 22px; 407 } 408 .connFormHeader i img { 409 width: 22px; 410 height: 22px; 411 } 412 .connFormFooter { 413 width: 100%; 414 grid-gap: 16px; 415 padding: 18px 32px; 416 border-top: 1px solid #ddd; 417 box-sizing: border-box; 418 display: flex; 419 justify-content: end; 420 align-items: center; 421 } 422 .connFormFooter button { 423 border-radius: 50px; 424 padding: 12px 32px; 425 background: #fff; 426 border: 1px solid #d3dce0; 427 font-size: 14px; 428 min-width: 105px; 429 position: relative; 430 } 431 .connFormFooter button:hover { 432 border: 1px solid #d3dce0; 433 background: rgb(241 244 247 / 50%); 434 } 435 .connFormFooter .greenBtnNew { 436 background: #24a68a; 437 color: #fff; 438 border: 1px solid #24a68a; 439 } 440 .connFormFooter .greenBtnNew:hover, 441 .refFormFooter .greenBtnNew:hover { 442 box-shadow: 0px 6px 45px 0px rgba(0, 0, 0, 0.18) inset; 443 background: #24a68a; 444 border: 1px solid #24a68a; 445 } 446 .customAddMapping { 447 display: flex; 448 align-items: center; 449 justify-content: space-evenly; 450 padding: 10px 0; 451 border-bottom: 1px solid rgba(230, 230, 230, 0.6); 452 background: #f6f8fb; 453 position: relative; 454 } 455 .customAddMapping::before { 456 content: ""; 457 position: absolute; 458 width: 50%; 459 border-top: 1px dashed #a3a6b0; 460 } 461 .customAddMapping a { 462 background: #f6f8fb; 463 position: relative; 464 padding: 0 10px; 465 display: flex; 466 align-items: center; 467 } 468 .customAddMapping span { 469 display: inline-flex; 470 align-items: center; 471 justify-content: center; 472 width: 27px; 473 height: 27px; 474 border-radius: 10px; 475 background: #fff; 476 border: 1px solid #e3dddd; 477 font-size: 12px; 478 color: #444; 479 font-weight: 500; 480 margin-right: 8px; 481 } 482 .customAddMapping a.is-selected span { 483 border: 1px solid transparent; 484 background: #24a68a; 485 color: #fff; 486 } 487 .customAddMapping span img { 488 width: 14px; 489 } 490 .customAddMapping em { 491 color: #222; 492 font-size: 14px; 493 font-weight: 500; 494 max-width: 200px; 495 overflow: hidden; 496 text-overflow: ellipsis; 497 white-space: nowrap; 498 display: inline-block; 499 padding-right: 2px; 500 font-style: normal; 501 } 502 .customAddMapping a.is-selected em { 503 color: #23a689; 504 } 505 .zf-wb-signWrapper { 506 display: flex; 507 box-sizing: border-box; 508 width: 100%; 509 padding: 32px; 510 text-align: left; 511 flex-direction: column; 512 overflow: hidden; 513 overflow-y: auto; 514 position: relative; 515 } 516 .zf-wb-signWrapper h2 { 517 font-size: 15px; 518 color: #000; 519 font-weight: 500; 520 margin: 0; 521 margin-bottom: 12px; 522 } 523 .accCardCont { 524 display: flex; 525 flex-flow: column; 526 gap: 20px; 527 } 528 .accConectCard { 529 border: 1px solid #e2e8ef; 530 border-radius: 12px; 531 padding: 20px; 532 cursor: pointer; 533 display: flex; 534 align-items: center; 535 gap: 20px; 536 } 537 .accConectCard:hover { 538 border: 1px solid #c2c8ce; 539 } 540 .accConectCard.selected { 541 border: 1px solid #23a689; 542 background: #fafffe; 543 } 544 .accConectCard i { 545 width: 50px; 546 height: 50px; 547 border: 1px solid #e2e8ef; 548 border-radius: 12px; 300 549 background: #fff; 301 } 302 .cusCheckBox [type="checkbox"] + label::before{ 303 304 background-color: #fff; 305 border: 1px solid #24A68A; 306 box-sizing: content-box; 307 content: ''; 308 color: #444; 309 margin-right: 7px; 310 top: 0; 311 left: 0; 312 width: 15px; 313 height: 15px; 314 display: inline-block; 315 vertical-align: middle; 316 position: absolute; 317 } 318 .cusCheckBox [type="checkbox"]:checked + label::after{ 319 content: ''; 320 -webkit-transform: rotate(-45deg) scale(1); 321 transform: rotate(-45deg) scale(1); 322 transition: -webkit-transform 200ms ease-out; 323 transition: transform 200ms ease-out; 324 transition: transform 200ms ease-out, -webkit-transform 200ms ease-out; 325 } 326 327 .cusCheckBox [type="checkbox"] + label::after { 328 background-color: transparent; 329 box-sizing: content-box; 330 content: ''; 331 position: absolute; 332 top: 9px; 333 left: 4px; 334 width: 7px; 335 height: 4px; 336 margin-top: calc(24px / -2 / 2 * 0.8); 337 border-style: solid; 338 border-color: #24A68A; 339 border-width: 0 0 2px 2px; 340 border-radius: 0; 341 -o-border-image: none; 342 border-image: none; 343 -webkit-transform: rotate(-45deg) scale(0); 344 transform: rotate(-45deg) scale(0); 345 transition: none; 346 } 347 348 .cusCheckBox { 349 margin-bottom: 3px; 350 } 351 352 .embedFormInputField { 353 display: inline-block; 354 width: 100%; 355 margin-bottom: 10px; 356 margin-top: 10px; 357 } 358 .embedFormInputField span { 359 width: 45%; 360 float: left; 550 display: flex; 551 align-items: center; 552 justify-content: center; 553 box-sizing: border-box; 554 flex-shrink: 0; 555 } 556 .accConectCard i img { 557 width: 18px; 558 } 559 .accConectCard h4 { 560 font-size: 15px; 561 color: #000; 562 font-weight: 500; 563 margin: 0; 564 margin-bottom: 6px; 565 } 566 .accConectCard p { 567 color: #454e5c; 568 font-size: 14px; 569 line-height: 150%; 570 margin: 0; 571 font-weight: 400; 572 } 573 .embedFormDivider { 574 width: 100%; 575 height: 1px; 576 background: #e2e8ef; 577 margin: 24px 0; 578 } 579 .tabs { 580 display: inline-flex; 581 width: auto; 582 border: 1px solid #d0d8e2; 583 border-radius: 3px; 584 height: 38px; 585 margin-bottom: 24px; 586 box-sizing: border-box; 587 } 588 589 .tab { 590 background: #fff; 591 border-radius: 3px; 592 color: #46546a; 593 font-size: 14px; 594 cursor: pointer; 595 padding: 10px 24px; 596 border: none; 597 outline: none; 598 width: 119px; 599 } 600 601 .tab.active { 602 color: #24a68a; 603 border-radius: 0 0 0 0; 604 background: #fbfffe; 605 position: relative; 606 } 607 .tab.active:before { 608 position: absolute; 609 left: -1px; 610 top: -1px; 611 right: -1px; 612 bottom: -1px; 613 content: ""; 614 border: 1px solid #24a68a; 615 border-radius: 3px; 616 } 617 618 .refreshCont { 619 padding: 24px 32px; 620 display: flex; 621 flex-flow: column; 622 align-items: center; 623 justify-content: center; 624 min-height: 360px; 625 } 626 .refreshCont img { 627 width: 120px; 628 height: 120px; 629 margin-bottom: 16px; 630 } 631 .refreshCont h3 { 632 font-size: 14px; 633 color: #222; 634 margin-bottom: 28px; 635 font-weight: 600; 636 } 637 .refFormFooter { 638 display: flex; 639 align-items: center; 640 justify-content: center; 641 gap: 16px; 642 } 643 .refFormFooter button { 644 border-radius: 50px; 645 padding: 12px 32px; 646 background: #fff; 647 border: 1px solid #d3dce0; 648 font-size: 14px; 649 min-width: 105px; 650 position: relative; 651 } 652 .refFormFooter .greenBtnNew { 653 background: #24a68a; 654 color: #fff; 655 border: 1px solid #24a68a; 656 } 657 .newBtnLoader { 658 font-size: 7px; 659 float: left; 660 margin: 2px 6px 0 0; 661 text-indent: -9999em; 662 width: 2em; 663 height: 2em; 664 border-radius: 50%; 665 background: #ffffff; 666 background: -moz-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%); 667 background: -webkit-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%); 668 background: -o-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%); 669 background: -ms-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%); 670 background: linear-gradient(to right, #ffffff 10%, rgba(255, 255, 255, 0) 42%); 671 -webkit-animation: newload 0.8s infinite linear; 672 animation: newload 0.8s infinite linear; 673 -webkit-transform: translateZ(0); 674 -ms-transform: translateZ(0); 675 transform: translateZ(0); 676 /* display: none; */ 677 position: absolute; 678 left: 13px; 679 } 680 .newBtnLoader:before { 681 width: 50%; 682 height: 50%; 683 background: #ffffff; 684 border-radius: 100% 0 0 0; 685 position: absolute; 686 top: 0; 687 left: 0; 688 content: ''; 689 } 690 .newBtnLoader:after { 691 background: rgb(36 166 138); 692 width: 75%; 693 height: 75%; 694 border-radius: 50%; 695 content: ''; 696 margin: auto; 697 position: absolute; 698 top: 0; 699 left: 0; 700 bottom: 0; 701 right: 0; 702 } 703 .greenBtnNew:hover .newBtnLoader:after { 704 background: #209479; 705 } 706 707 .embedFormUsing label { 708 font-size: 14px; 709 color: #222; 710 font-weight: 500; 711 margin-bottom: 8px; 712 display: block; 713 } 714 .embedFormUsing { 715 margin-bottom: 15px; 361 716 } 362 717 .embedFormInputField label { 363 font-size: 14px; 364 display: block; 365 margin-bottom: 10px; 366 } 367 .embedFormInputField span:last-child { 368 float: right; 369 } 370 .embedFormInputField input[type="text"] { 371 width: 100%; 372 box-sizing: border-box; 373 border-radius: 3px; 374 border: 1px solid #ccc; 375 padding: 7px 10px; 376 font-size: 13px; 377 } 378 .embedIncldeParamtrs span { 379 font-size: 14px; 380 color: #6b6b6b; 381 line-height: 23px; 382 position: relative; 383 left: 30px; 384 margin-bottom: 15px; 385 display: inline-block; 386 } 387 .embedParameterValue { 388 border: 1px solid #ccc; 389 display: inline-block; 390 width: 100%; 391 padding-bottom: 7px; 392 } 393 .embedField { 394 background: #f6f6f6; 395 padding: 10px 20px; 396 margin-bottom: 15px; 397 display: inline-block; 398 width: 100%; 399 box-sizing: border-box; 400 } 401 .embedFiel_Col1 { 402 width: 240px; 403 float: left; 404 font-size: 14px; 405 } 406 .embedFiel_Col2 { 407 width: 200px; 408 float: left; 409 font-size: 14px; 410 margin-left: 67px; 411 } 412 .addparamsWrap { 413 display: inline-block; 414 width: 100%; 415 margin-bottom: 16px; 416 float: left; 417 padding: 0 20px; 418 } 419 .intArrow { 420 border-bottom: 1px dashed #afafaf; 421 font-size: 13px; 422 font-weight: 300; 423 width: 75px; 424 position: relative; 425 margin-left: 15px; 426 margin-right: 15px; 427 display: inline-block; 428 float: left; 429 vertical-align: middle; 430 top: 15px; 431 margin-left: 20px; 432 margin-right: 20px; 433 } 434 .intArrow .arrowImg { 435 background: url(./tinymce/paramtrArrow.jpg) no-repeat; 436 width: 5px; 437 height: 10px; 438 display: block; 439 top: -4px; 440 position: absolute; 441 right: 0; 442 opacity: 0.8; 443 } 444 .fiedPropPlus, .fiedPropMinus{ 445 width: 24px; 446 height: 24px; 447 background: url(./tinymce/fieldprop-plus.png) no-repeat; 448 background-size: contain; 449 margin-top: 2px; 450 float: left; cursor: pointer; 451 margin-left: 15px; 452 left: 0px !important; 453 } 454 .fiedPropMinus { 455 background: url(./tinymce/fieldprop-minus.png) no-repeat; 456 background-size: contain; 457 margin-left: 8px; 458 } 459 .addParamaFeld { 460 width: 190px; 461 float: left; 462 } 463 .addParamaFeld input[type="text"] { 464 width: 100%; 465 border-radius: 3px; 466 border: 1px solid #ccc; 467 box-sizing: border-box; 468 padding: 7px 10px; 469 font-size: 13px; 470 } 471 input[type="text"]:disabled { 472 background: #ececec; 473 } 718 color: #222; 719 font-weight: 500; 720 } 721 .zf-Wp-plusminus { 722 display: flex; 723 } 724 .block-editor-block-list__layout.is-root-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { 725 max-width: 750px; 726 } 727 .zf-wb-dropWrapper::before { 728 display: none; 729 } 730 .zf-wb-innerWrapper .select2-container .selection { 731 width: 100%; 732 display: block; 733 height: 38px; 734 border: none; 735 } 736 .zf-wb-innerWrapper .select2-container--default .select2-selection--single { 737 background-color: #fff; 738 border: none; 739 border-radius: 4px; 740 height: 38px; 741 line-height: 41px; 742 } 743 .zf-wb-innerWrapper .select2-container--default .select2-selection--single .select2-selection__rendered { 744 color: #444; 745 line-height: 38px; 746 font-size: 13px; 747 font-weight: 400; 748 padding-left: 12px; 749 } 750 .zf-wb-containerWrapper .select2-dropdown { 751 z-index: 100000; 752 background: #fff; 753 border: 1px solid #d3dce0; 754 -webkit-border-radius: 0px 0px 8px 8px; 755 -moz-border-radius: 0px 0px 8px 8px; 756 border-radius: 8px; 757 box-shadow: 0px 1px 15px 0px #0000001A; 758 box-sizing: border-box; 759 } 760 .zf-wb-containerWrapper .select2-results__option { 761 padding: 9px 12px; 762 border-radius: 4px; 763 margin-bottom: 2px; 764 position: relative; 765 line-height: 150%; 766 font-size: 13px; 767 color: #222 !important; 768 } 769 770 .zf-wb-containerWrapper .select2-container--default .select2-results__option--highlighted[aria-selected] { 771 background: rgb(241 244 247 / 70%); 772 color: #222 !important; 773 } 774 .zf-wb-containerWrapper .select2-container--default .select2-results__option[aria-selected=true] { 775 background: rgb(233 246 243) !important; 776 color: rgb(36 166 138) !important; 777 } 778 .zf-wb-containerWrapper .select2-container--default .select2-results > .select2-results__options { 779 margin: 4px; 780 } 781 .zf-wb-containerWrapper .select2-container--default .select2-selection--single .select2-selection__arrow b { 782 border-color: #888 transparent transparent transparent; 783 border-style: solid; 784 left: 3px; 785 margin-left: -4px; 786 margin-top: -2px; 787 position: absolute; 788 top: 50%; 789 width: 7px; 790 height: 7px; 791 border-width: 0; 792 border-top: 1.5px solid rgb(34 34 34); 793 border-left: 1.5px solid rgb(34 34 34); 794 transform: rotate(223deg); 795 } 796 797 .zf-wb-containerWrapper .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { 798 transform: rotate(47deg); 799 width: 7px; 800 height: 7px; 801 border-width: 0; 802 border-top: 1.5px solid #222; 803 border-left: 1.5px solid #222; 804 top: 57%; 805 } 806 807 @-webkit-keyframes newload { 808 0% { 809 -webkit-transform: rotate(0deg); 810 transform: rotate(0deg); 811 } 812 813 100% { 814 -webkit-transform: rotate(360deg); 815 transform: rotate(360deg); 816 } 817 } 818 819 @keyframes newload { 820 0% { 821 -webkit-transform: rotate(0deg); 822 transform: rotate(0deg); 823 } 824 825 100% { 826 -webkit-transform: rotate(360deg); 827 transform: rotate(360deg); 828 } 829 } 830 /* Rewamp UI Css End */ 831 832 -
zoho-forms/trunk/zohoforms-block.js
r3729081 r3748754 7 7 alt: "Zoho Forms" 8 8 }); 9 var backSvgIcon = wpCreateElem('svg', null,10 wpCreateElem('path', { d: "M21 11.016v1.969h-14.156l3.563 3.609-1.406 1.406-6-6 6-6 1.406 1.406-3.563 3.609h14.156z"} )11 );12 9 var zohoFormsAttributes = { 13 10 zf_short_code: {type: 'string'}, … … 38 35 return jQuery(blockRef.current).find(selector); 39 36 } 37 wpElem.useEffect(function(){ 38 if(!blockRef.current || !jQuery.fn.select2){ 39 return; 40 } 41 var $block = jQuery(blockRef.current); 42 var ownerDoc = blockRef.current.ownerDocument; 43 function setupSelect(selector, onChange){ 44 var $el = $block.find(selector); 45 if(!$el.length || $el.data("select2")){ 46 return; 47 } 48 $el.select2({ 49 width: "100%", 50 dropdownParent: $block, 51 minimumResultsForSearch: Infinity 52 }); 53 $el.on("change.zfSelect2", onChange); 54 } 55 setupSelect("#zf_domain", hideDomainError); 56 setupSelect("#zf_formslist", formSelectOnchange); 57 function closeSelect2OnOutsideClick(event){ 58 if(jQuery(event.target).closest(".select2-container").length){ 59 return; 60 } 61 $block.find("#zf_domain, #zf_formslist").each(function(){ 62 var $el = jQuery(this); 63 if($el.data("select2")){ 64 $el.select2("close"); 65 } 66 }); 67 } 68 jQuery(ownerDoc).on("mousedown.zfSelect2", closeSelect2OnOutsideClick); 69 return function(){ 70 jQuery(ownerDoc).off("mousedown.zfSelect2", closeSelect2OnOutsideClick); 71 $block.find("#zf_domain, #zf_formslist").each(function(){ 72 var $el = jQuery(this); 73 $el.off("change.zfSelect2"); 74 if($el.data("select2")){ 75 $el.select2("destroy"); 76 } 77 }); 78 }; 79 }, []); 80 var isAutoHeight = props.attributes.autoheight === true || props.attributes.autoheight === "true"; 81 wpElem.useEffect(function(){ 82 if(!isAutoHeight || !blockRef.current){ 83 return; 84 } 85 var ownerWindow = blockRef.current.ownerDocument.defaultView; 86 if(!ownerWindow){ 87 return; 88 } 89 function onFormResize(event){ 90 var evntData = event.data; 91 if(!evntData || evntData.constructor != String || !blockRef.current){ 92 return; 93 } 94 var zf_ifrm_data = evntData.split("|"); 95 if(zf_ifrm_data.length != 2 && zf_ifrm_data.length != 3){ 96 return; 97 } 98 var iframe = blockRef.current.querySelector("iframe"); 99 if(!iframe){ 100 return; 101 } 102 var zf_perma = zf_ifrm_data[0]; 103 if(iframe.src.indexOf("formperma") < 0 || iframe.src.indexOf(zf_perma) < 0){ 104 return; 105 } 106 var zf_ifrm_ht_nw = (parseInt(zf_ifrm_data[1], 10) + 15) + "px"; 107 var prevIframeHeight = iframe.style.height; 108 var zf_tout = false; 109 if(zf_ifrm_data.length == 3){ 110 iframe.scrollIntoView(); 111 zf_tout = true; 112 } 113 if(prevIframeHeight != zf_ifrm_ht_nw){ 114 if(zf_tout){ 115 ownerWindow.setTimeout(function(){ 116 iframe.style.height = zf_ifrm_ht_nw; 117 }, 500); 118 }else{ 119 iframe.style.height = zf_ifrm_ht_nw; 120 } 121 } 122 } 123 ownerWindow.addEventListener("message", onFormResize, false); 124 return function(){ 125 ownerWindow.removeEventListener("message", onFormResize, false); 126 }; 127 }, [isAutoHeight, props.attributes.formPerma]); 40 128 if(isEmbedded){ 41 return wpCreateElem("div", blockProps, wpCreateElem("iframe", {src: props.attributes.formPerma, width: props.attributes.width, height: props.attributes.height, frameborder:"0", allow : "geolocation;microphone;camera", "aria-label" : props.attributes.formtitle})); 129 var iframeSrc = props.attributes.formPerma; 130 if(isAutoHeight && iframeSrc && iframeSrc.indexOf("zf_rszfm=") === -1){ 131 iframeSrc += (iframeSrc.indexOf("?") === -1 ? "?" : "&") + "zf_rszfm=1"; 132 } 133 return wpCreateElem("div", blockProps, wpCreateElem("iframe", {src: iframeSrc, width: props.attributes.width, height: props.attributes.height, style: { border: "none", width: props.attributes.width, height: props.attributes.height, transition: "all 0.5s ease" }, frameborder:"0", allow : "geolocation;microphone;camera", "aria-label" : props.attributes.formtitle})); 42 134 } 43 135 var $ = jQuery; … … 56 148 var newParam = $(urlParamsDiv).find("div[elname=paramTemplate]").clone(); 57 149 $(newParam).removeAttr("elname"); 58 $(newParam). show();150 $(newParam).css("display", ""); 59 151 bindParamRow(newParam); 60 152 $(newParam).insertAfter($(elem).parent().parent("div[eltype=keyValPair]")); … … 74 166 getElem("#formPermaLinkPasteDiv").hide(); 75 167 getElem("#chooseZohoFormDiv").hide(); 168 getElem("#blockEditShortCodeDiv").hide(); 76 169 getElem("#zfHomeDiv").show(); 77 170 getElem("#embedActionsDiv").hide(); 171 selectMappingStep("choose"); 172 } 173 function selectMappingStep(step){ 174 if(step == "embed"){ 175 getElem("#chooseFormStep").addClass("is-selected"); 176 getElem("#configureEmbedStep").addClass("is-selected"); 177 setStepCompleted("#chooseFormStep", true); 178 setStepCompleted("#configureEmbedStep", false); 179 }else{ 180 getElem("#configureEmbedStep").removeClass("is-selected"); 181 getElem("#chooseFormStep").addClass("is-selected"); 182 setStepCompleted("#chooseFormStep", false); 183 setStepCompleted("#configureEmbedStep", false); 184 } 185 } 186 function setStepCompleted(stepSelector, completed){ 187 var $step = getElem(stepSelector); 188 if(completed){ 189 $step.find("span[elname=stepNumber]").hide(); 190 $step.find("span[elname=tickIcon]").css("display", ""); 191 }else{ 192 $step.find("span[elname=stepNumber]").css("display", ""); 193 $step.find("span[elname=tickIcon]").hide(); 194 } 195 } 196 function selectConnectionCard(event){ 197 getElem("#accessZohoFormsCard, #embedUsingPermalinkCard").removeClass("selected"); 198 $(event.currentTarget).addClass("selected"); 199 } 200 function proceedFromHome(){ 201 if(getElem("#accessZohoFormsCard").hasClass("selected")){ 202 getElem("#blockEditShortCodeDiv").hide(); 203 chooseForm(); 204 }else if(getElem("#embedUsingPermalinkCard").hasClass("selected")){ 205 getElem("#blockEditShortCodeDiv").hide(); 206 embedPerma(); 207 } 78 208 } 79 209 … … 92 222 if(formName!="-select-"){ 93 223 getElem("#embedActionsDiv").show(); 94 }else{ 95 getElem("#embedActionsDiv").hide(); 224 selectMappingStep("embed"); 96 225 } 97 226 } … … 100 229 var formPerma='', formTitle = ''; 101 230 if(getElem("#embedCatogory").val()=="formPerma"){ 102 formPerma = getElem("#permalink").val(); 231 formPerma = String(getElem("#permalink").val()).trim(); 232 var permaLinkErrElem = getElem('#permaLinkError'); 103 233 if(formPerma.length==0){ 104 var permaLinkErrElem = getElem('#permaLinkError'); 234 $(permaLinkErrElem).text("Please enter your form's permalink URL."); 235 $(permaLinkErrElem).parent().addClass("zf-wb-errorCont"); 236 $(permaLinkErrElem).show(); 237 return; 238 } 239 if(formPerma.toLowerCase().indexOf("https://") !== 0){ 240 $(permaLinkErrElem).text("Enter a valid permalink Url"); 105 241 $(permaLinkErrElem).parent().addClass("zf-wb-errorCont"); 106 242 $(permaLinkErrElem).show(); … … 117 253 formTitle = getElem("#zf_formslist").find(":selected").text(); 118 254 } 119 var height = getElem("#formHeight").val();120 var width = getElem("#formWidth").val();121 if( height== ""){122 height = '600px';123 } 124 if(width == ""){125 width= '100%';126 }127 var embedType= "iframe";128 if(getElem("#jsEmbed").is(":checked")){129 embedType ='js';130 } 131 var autoHeight = false;132 if(getElem("#autoHeightCB").is(":checked")){ 133 autoHeight =true;134 }255 var widthVal = getElem("#formWidth").val(); 256 var widthUnit = getElem("#formWidth").closest(".embedInputCont").find("i.selected").attr("size_symbol") || "%"; 257 if(widthVal == ""){ 258 widthVal = "100" + widthUnit; 259 }else if(!/(px|%)$/.test(widthVal)){ 260 widthVal = widthVal + widthUnit; 261 } 262 var heightVal = getElem("#formHeight").val(); 263 var heightUnit = getElem("#formHeight").closest(".embedInputCont").find("i").attr("size_symbol") || "px"; 264 if(heightVal == ""){ 265 heightVal = "600" + heightUnit; 266 }else if(!/(px|%)$/.test(heightVal)){ 267 heightVal = heightVal + heightUnit; 268 } 269 var embedType = "js"; 270 var autoHeight = !getElem("#autoHeightCB").is(":checked"); 135 271 var urlParams = ''; 136 272 if(getElem("#queryParamsCB").is(":checked")){ … … 157 293 } 158 294 } 159 saveShortCode(formPerma,width ,height,embedType,autoHeight,urlParams, formTitle);295 saveShortCode(formPerma,widthVal,heightVal,embedType,autoHeight,urlParams, formTitle); 160 296 } 161 297 //form select error … … 189 325 getElem("#chooseZohoFormDiv").hide(); 190 326 getElem("#formPermaLinkPasteDiv").show(); 327 getElem("#zFormSelectDiv").hide(); 191 328 getElem("#permalink").focus(); 192 329 getElem("#embedActionsDiv").show(); 193 330 getElem("#embedCatogory").val("formPerma"); 331 selectMappingStep("embed"); 194 332 } 195 333 //while choosing embed form threw formslist … … 212 350 //Getting zoho forms and adding to list 213 351 function getZohoForms(){ 214 getElem("#zfRefreshDiv").hide(); 352 var refreshVisible = getElem("#zfRefreshDiv").is(":visible"); 353 var domainVisible = getElem("#zDomaindiv").is(":visible"); 354 if(!refreshVisible){ 355 getElem("#zfRefreshDiv").hide(); 356 } 215 357 var newScript = document.createElement("script"); 216 358 var inlineScript = document.createTextNode("var a='';"); … … 222 364 resetFormsList(); 223 365 if(zohoFormsURL != ""){ 224 getElem("#zDomaindiv").hide(); 225 getZohoFormsList(zohoFormsURL); 366 if(domainVisible){ 367 getElem("#connectLoadingImgElem").show(); 368 getZohoFormsList(zohoFormsURL, "connect"); 369 }else if(refreshVisible){ 370 getElem("#refreshLoadingImgElem").show(); 371 getZohoFormsList(zohoFormsURL, "refresh"); 372 }else{ 373 getElem("#zDomaindiv").hide(); 374 getZohoFormsList(zohoFormsURL, false); 375 } 226 376 }else{ 227 377 getElem("#zFormSelectDiv").hide(); … … 243 393 } 244 394 //reset forms list 395 function syncSelect2(selector){ 396 var $el = getElem(selector); 397 if($el.length && $el.data("select2")){ 398 $el.trigger("change.select2"); 399 } 400 } 245 401 function resetFormsList(){ 246 402 hideFormSelectError(); 247 getElem('#zf_formslist').find('option').remove(); 248 getElem('#zf_formslist').append("<option value='-select-'>-Select-</option>"); 403 var $list = getElem("#zf_formslist"); 404 if($list.data("select2")){ 405 $list.select2("close"); 406 } 407 $list.find("option").remove(); 408 $list.append("<option value='-select-'>-Select-</option>"); 409 $list.val("-select-"); 410 syncSelect2("#zf_formslist"); 249 411 } 250 412 //constructing url based on domain extention … … 261 423 } 262 424 //calling api and adding to dropdown 263 function getZohoFormsList(formsUrl ){425 function getZohoFormsList(formsUrl, loader){ 264 426 var apiURL = formsUrl+"/api/getforms?type=plugin"; 265 getElem("#loadingDiv").show(); 266 getFormsAndIncludeScript(apiURL,addToFormListDropDown); 267 } 268 function showiframeOrJsChange(){ 269 if(getElem("#jsEmbed").is(":checked")){ 270 getElem("#autoHeightDiv").slideDown(); 271 }else{ 272 getElem("#autoHeightDiv").slideUp(); 273 } 274 getElem("#autoHeightCB").prop("checked",false); 275 getElem("#formHeight").prop("disabled",false); 276 getElem("#formHeight").prop("placeholder","600px"); 427 if(!loader){ 428 getElem("#loadingDiv").show(); 429 } 430 getFormsAndIncludeScript(apiURL, function(){ 431 if(loader == "connect"){ 432 getElem("#connectLoadingImgElem").hide(); 433 getElem("#zDomaindiv").hide(); 434 }else if(loader == "refresh"){ 435 getElem("#refreshLoadingImgElem").hide(); 436 getElem("#zfRefreshDiv").hide(); 437 } 438 addToFormListDropDown(); 439 }); 277 440 } 278 441 function showOrHideUrlParamsDiv(){ … … 285 448 $(newParam).removeAttr("elname"); 286 449 bindParamRow(newParam); 287 $(newParam). show();450 $(newParam).css("display", ""); 288 451 $(paramsDiv).append($(newParam)); 289 452 $(urlParamsDiv).slideDown(); … … 293 456 } 294 457 458 function selectWidthUnit(event){ 459 var $unit = jQuery(event.currentTarget); 460 $unit.siblings("i").removeClass("selected"); 461 $unit.addClass("selected"); 462 } 463 function allowOnlyNumbers(event){ 464 var value = event.target.value.replace(/[^0-9]/g, ""); 465 if(event.target.value !== value){ 466 event.target.value = value; 467 } 468 } 295 469 function disableOrEnableHeight(){ 296 470 if(getElem("#autoHeightCB").is(":checked")){ 297 getElem("#formHeight").prop("disabled",true); 298 getElem("#formHeight").prop("placeholder",""); 299 getElem("#formHeight").val(''); 471 getElem("#formHeightDiv").css("display", ""); 300 472 }else{ 301 getElem("#formHeight").prop("disabled",false); 302 getElem("#formHeight").prop("placeholder","600px"); 473 getElem("#formHeightDiv").hide(); 303 474 } 304 475 } … … 333 504 document.getElementsByTagName("head")[0].appendChild(script); 334 505 } 506 function getFormsWithFetch(){ 507 fetch("/wp-json/zohoforms/v1/getforms") 508 .then(function(response){ return response.json(); }) 509 .then(function(data){ 510 a = data; 511 addToFormListDropDown(); 512 }); 513 } 335 514 function addToFormListDropDown(){ 336 515 getElem("#zfRefreshDiv").hide(); … … 349 528 formList.options.add(option); 350 529 } 530 syncSelect2("#zf_formslist"); 351 531 getElem("#zFormSelectDiv").show(); 532 getElem("#formPermaLinkPasteDiv").hide(); 352 533 getElem("#embedActionsDiv").show(); 534 selectMappingStep("embed"); 353 535 } 354 536 }else{ … … 373 555 var domainDropDownElem = wpCreateElem("div", 374 556 { 375 id: "zDomaindiv", 376 class: "zf-wb-innerWrapper" 557 id: "zDomaindiv" 377 558 }, 378 wpCreateElem("label",null,"Choose the domain where you've registered your Zoho account.",wpCreateElem("em",null,"*")), 559 wpCreateElem("div", 560 { 561 class: "zf-wb-innerWrapper zconnectMainCont" 562 }, 563 wpCreateElem("label",null,"Select the domain your Zoho account is registered on.",wpCreateElem("em",null,"*")), 379 564 wpCreateElem("div", 380 565 { … … 442 627 ) 443 628 ), 444 wpCreateElem("p",{ id:"domainErr", style:{display:'none'}},"Please choose a domain."), 445 wpCreateElem("div",{class:"zf-wb-connect-btn zf-wb-Fotter"},wpCreateElem("button", { onClick: getZohoForms, class: "zf-wb-blue" },"Connect")) 629 wpCreateElem("p",{ id:"domainErr", style:{display:'none'}},"Please choose a domain.") 630 ), 631 wpCreateElem("div", 632 { 633 class: "connFormFooter" 634 }, 635 wpCreateElem("button", { onClick: goToHomeDiv }, "Back"), 636 wpCreateElem("button", 637 { 638 class: "greenBtnNew", 639 onClick: getZohoForms 640 }, 641 wpCreateElem("em", { id: "connectLoadingImgElem", class: "newBtnLoader", style: { display: "none" } }), 642 "Connect" 643 ) 644 ) 446 645 ); 447 646 var formListEmbedDiv = wpCreateElem("div", … … 451 650 display: 'none', 452 651 }, 453 class: "zf-wb-innerWrapper "652 class: "zf-wb-innerWrapper zf-wb-outerWrapper" 454 653 }, 455 654 wpCreateElem("div", … … 480 679 { 481 680 id: "zfRefreshDiv", 681 class: "refreshCont", 482 682 style: { 483 683 display: 'none' 484 }, 485 class: "zf-wb-signWrapper" 684 } 486 685 }, 487 wpCreateElem("p", null,"Click 'Refresh' to choose a form."), 488 wpCreateElem("button", { id: "refreshLink", onClick: getZohoForms, class: "zf-wb-lightblue" },"Refresh") 686 wpCreateElem("img", { src: zohoFormsBlock.refreshFormIcon }), 687 wpCreateElem("h3", null, "Sign in on the Zoho page, then come back and refresh to load your forms."), 688 wpCreateElem("div", { class: "refFormFooter" }, 689 wpCreateElem("button", { onClick: goToHomeDiv }, "Back"), 690 wpCreateElem("button", { class: "greenBtnNew", onClick: getZohoForms }, 691 wpCreateElem("em", { id: "refreshLoadingImgElem", class: "newBtnLoader", style: { display: "none" } }), 692 "Refresh" 693 ) 694 ) 489 695 ); 490 696 var createFormDiv = wpCreateElem("div", 491 697 { 492 698 id: "zfCreateFormDiv", 699 class: "refreshCont", 493 700 style: { 494 701 display: 'none' 495 }, 496 class: "zf-wb-signWrapper" 702 } 497 703 }, 498 wpCreateElem("p", null,"You don't have any forms."), 499 wpCreateElem("button", { id: "createFormLink", onClick: openSigninOrCreateForm, class: "zf-wb-green"},"CREATE A NEW FORM") 704 wpCreateElem("img", { src: zohoFormsBlock.refreshFormIcon }), 705 wpCreateElem("h3", null, "You don't have any forms."), 706 wpCreateElem("div", { class: "refFormFooter" }, 707 wpCreateElem("button", { class: "greenBtnNew", onClick: openSigninOrCreateForm }, 708 wpCreateElem("em", { id: "createLoadingImgElem", class: "newBtnLoader", style: { display: "none" } }), 709 "Create a new form" 710 ) 711 ) 500 712 ); 501 713 var chooseZFormDiv = wpCreateElem("div", … … 507 719 } 508 720 }, 509 wpCreateElem("div",510 {class: "zf-wb-headwrap"},511 wpCreateElem("span",{class: "zf-wb-backIocn", onClick:goToHomeDiv},backSvgIcon),512 wpCreateElem("div",{class: "zf-wb-heading"},"Choose your form")513 ),514 721 wpCreateElem("div",{id: "loadingDiv", class: "zf-wb-loading" ,style: {display: 'none'}},wpCreateElem("p",null,"loading"),wpCreateElem("div",{class: "zf-wb-spinner"},wpCreateElem("div",{class:"bounce1"}),wpCreateElem("div",{class:"bounce2"}),wpCreateElem("div",{class:"bounce3"}))), 515 722 domainDropDownElem, 516 formListEmbedDiv,517 723 refreshDiv, 518 724 createFormDiv … … 525 731 style: { display:'none'} 526 732 }, 527 wpCreateElem("div",528 {class: "zf-wb-headwrap"},529 wpCreateElem("span",{class: "zf-wb-backIocn", onClick:goToHomeDiv},backSvgIcon),530 wpCreateElem("div",{class: "zf-wb-heading"},"Enter form permalink")531 ),532 733 wpCreateElem("div", 533 734 { … … 543 744 } 544 745 ), 545 wpCreateElem("p", { id: "permaLinkError", style: {display:'none'} },"Please enter your form'spermalink URL."),546 wpCreateElem("span",null,"N ot sure where to find the permalink URL? ",wpCreateElem("a",{href: "https://www.zoho.com/forms/help/share/public-sharing.html#link", target: "_blank"},"Click here "),wpCreateElem("span",null,"to learn more."))746 wpCreateElem("p", { id: "permaLinkError", style: {display:'none'} },"Please enter the permalink URL."), 747 wpCreateElem("span",null,"Need help finding your permalink? ",wpCreateElem("a",{href: "https://help.zoho.com/portal/en/kb/forms/sharing-forms/articles/sharing-a-form-publicly#Sharing_a_link", target: "_blank"},"Learn more")) 547 748 ),); 548 var embedTypeDIv = wpCreateElem("div", {549 class: "cusRadioButton",550 id: "embedTypeDiv"551 },552 wpCreateElem("span", {553 class: ""554 },555 wpCreateElem("input", {556 type: "radio",557 id: "iframeEmbed",558 name: "embedType",559 onClick: showiframeOrJsChange,560 value: "iframe",561 defaultChecked: true562 },),563 wpCreateElem("label", {564 for: "iframeEmbed"565 }, "iFrame")),566 wpCreateElem("span", {567 class: ""568 },569 wpCreateElem("input", {570 type: "radio",571 id: "jsEmbed",572 name: "embedType",573 onClick: showiframeOrJsChange,574 value: "iframe",575 },),576 wpCreateElem("label", {577 for: "jsEmbed"578 }, "Java Script"))579 );580 749 var urlParamsCBDiv = wpCreateElem("div",{ 581 750 class: "embedIncldeParamtrs" … … 587 756 }), wpCreateElem("label", { 588 757 for: "queryParamsCB" 589 }, "Add URL params")),590 wpCreateElem("span",null," Include parameters to prefill forms and add referrers to track sources"));758 }, "Add URL Parameters")), 759 wpCreateElem("span",null,"Prefill form fields and track where responses come from.")); 591 760 var urlParamDiv = wpCreateElem("div", 592 761 { … … 609 778 class: "embedFiel_Col2" 610 779 }, 611 wpCreateElem("label", null, "Parameter Value ")780 wpCreateElem("label", null, "Parameter Value") 612 781 ), 613 782 … … 644 813 maxlength: "50" 645 814 })), 646 wpCreateElem("div",{647 class: "intArrow"648 },649 wpCreateElem("em",{class: "arrowImg"})),650 815 wpCreateElem("div", { 651 816 class: "addParamaFeld" … … 671 836 { 672 837 id: "autoHeightDiv", 673 class: "cusCheckBox", 674 onChange : disableOrEnableHeight , 675 style: { display:'none'} 838 class: "cusCheckBox autoHeightDiv" 676 839 }, wpCreateElem("input", { 677 840 type: "checkbox", 678 841 id: "autoHeightCB", 842 onChange: disableOrEnableHeight 679 843 }), wpCreateElem("label", { 680 844 for: "autoHeightCB" 681 }, "Set form height automatically."));845 }, "Set custom height")); 682 846 var embedActionDiv = wpCreateElem("div", 683 847 { 684 848 id: "embedActionsDiv", 685 //class: "zf-WpEmbeddedWrap",849 class: "embedActionsDiv", 686 850 style: { display:'none'} 687 851 }, 852 wpCreateElem("div", { class: "zconnectMainCont" }, 853 formListEmbedDiv, 854 permaLinkEmbedDiv, 855 wpCreateElem("div", { class: "embedFormDivider" }), 688 856 wpCreateElem("div", 689 857 { 690 858 class: "embedFormUsing", 691 859 }, 692 wpCreateElem("label", null, "Embed form using", ),693 embedTypeDIv,694 autoHeightCBDiv,695 860 wpCreateElem("div", 696 861 { 697 862 class: "embedFormInputField" 698 863 }, 699 wpCreateElem("span", 700 { 701 702 }, 864 wpCreateElem("span", null, 703 865 wpCreateElem("label", null, "Width "), 704 wpCreateElem(" input",705 {866 wpCreateElem("div", { class: "embedInputCont" }, 867 wpCreateElem("input", { 706 868 type: "text", 707 869 id: "formWidth", 708 placeholder: "100%" 709 } 710 ) 870 placeholder: "100", 871 onInput: allowOnlyNumbers 872 }), 873 wpCreateElem("div", { class: "embedInputPer" }, 874 wpCreateElem("i", { onClick: selectWidthUnit, size_symbol: "px" }, "px"), 875 wpCreateElem("i", { class: "selected", onClick: selectWidthUnit, size_symbol: "%" }, "%") 876 ) 877 ) 711 878 ), 879 autoHeightCBDiv, 712 880 wpCreateElem("span", 713 881 { 714 882 id: "formHeightDiv", 883 style: { display: "none" } 715 884 }, 716 885 wpCreateElem("label", null, "Height "), 717 wpCreateElem(" input",718 {886 wpCreateElem("div", { class: "embedInputCont" }, 887 wpCreateElem("input", { 719 888 type: "text", 720 889 id: "formHeight", 721 placeholder: "600px" 722 } 723 ) 724 ), 725 //wpCreateElem("div",{class:"clearBoth"},null) 890 class: "formHeight", 891 placeholder: "600", 892 onInput: allowOnlyNumbers 893 }), 894 wpCreateElem("div", { class: "embedInputPer" }, 895 wpCreateElem("i", { size_symbol: "px" }, "px") 896 ) 897 ) 898 ) 726 899 )), 900 wpCreateElem("div", { class: "embedFormDivider" }), 727 901 urlParamsCBDiv, 728 902 urlParamDiv, … … 731 905 id: "paramError", 732 906 style: {display:'none'} 733 },wpCreateElem("p", null,"Parameters should contain only alphanumeric characters, underscore, and hyphen.")), 734 wpCreateElem("div",{class:"zf-wb-Fotter"},wpCreateElem("button",{class:"zf-wb-blue", onClick: zf_block_embed},"Embed")) 907 },wpCreateElem("p", null,"Parameters should contain only alphanumeric characters, underscore, and hyphen.")) 908 ), 909 wpCreateElem("div", { class: "connFormFooter" }, 910 wpCreateElem("button", { onClick: goToHomeDiv }, "Back"), 911 wpCreateElem("button", { class: "greenBtnNew", onClick: zf_block_embed }, 912 wpCreateElem("em", { elem: "loadingImgElem", class: "newBtnLoader", style: { display: "none" } }), 913 "Embed Form" 914 ) 915 ) 735 916 ); 736 917 return wpCreateElem("div", … … 742 923 } 743 924 ), 925 wpCreateElem("link", 926 { 927 href: zohoFormsBlock.select2CSS, 928 rel: "stylesheet" 929 } 930 ), 744 931 wpCreateElem("input",{ 745 932 id:"embedCatogory", … … 747 934 value:"formPerma" 748 935 }), 749 wpCreateElem("div", 936 wpCreateElem("div", { class: "connFormCont" }, 937 wpCreateElem("div", null, 938 wpCreateElem("div", { class: "connFormHeader" }, 939 wpCreateElem("i", null, 940 wpCreateElem("img", { src: zohoFormsBlock.zohoFormsIcon }) 941 ), 942 wpCreateElem("h4", null, "Zoho Forms") 943 ), 944 wpCreateElem("div", { class: "customAddMapping" }, 945 wpCreateElem("a", { id: "chooseFormStep", class: "is-selected" }, 946 wpCreateElem("span", { elname: "stepNumber" }, "1"), 947 wpCreateElem("span", { elname: "tickIcon", style: { display: "none" } }, 948 wpCreateElem("img", { src: zohoFormsBlock.completedIcon, alt: "" }) 949 ), 950 wpCreateElem("em", null, "Choose Form") 951 ), 952 wpCreateElem("a", { id: "configureEmbedStep" }, 953 wpCreateElem("span", { elname: "stepNumber" }, "2"), 954 wpCreateElem("span", { elname: "tickIcon", style: { display: "none" } }, 955 wpCreateElem("img", { src: zohoFormsBlock.completedIcon, alt: "" }) 956 ), 957 wpCreateElem("em", null, "Embed Settings") 958 ) 959 ) 960 ), 961 wpCreateElem("div", 750 962 { 751 963 id: "zfHomeDiv", 752 753 class: "zf-wb-signWrapper" 964 class: "connFormInnCont" 754 965 }, 755 wpCreateElem("p", null,"You can choose a form from your Zoho forms account or enter your form's permalink URL and embed it."), 756 wpCreateElem("button", { class:"zf-wb-blue", onClick: chooseForm },"Access Zoho Forms"), 757 wpCreateElem("label",null,"or"), 758 wpCreateElem("a",{onClick: embedPerma},"Embed using permalink") 759 ), 760 permaLinkEmbedDiv, 761 chooseZFormDiv, 762 embedActionDiv, 763 wpCreateElem("div", { id: "blockEditShortCodeDiv"} ) 966 wpCreateElem("div", { class: "zf-wb-signWrapper zconnectMainCont" }, 967 wpCreateElem("h2", null, "Choose a way to embed your form"), 968 wpCreateElem("div", { class: "accCardCont" }, 969 wpCreateElem("div", { id: "accessZohoFormsCard", class: "accConectCard", onClick: selectConnectionCard }, 970 wpCreateElem("i", null, wpCreateElem("img", { src: zohoFormsBlock.accessFormIcon })), 971 wpCreateElem("div", { class: "accCardRight" }, 972 wpCreateElem("h4", null, "Access Zoho Forms"), 973 wpCreateElem("p", null, "Sign in to Zoho Forms and choose a form.") 974 ) 975 ), 976 wpCreateElem("div", { id: "embedUsingPermalinkCard", class: "accConectCard", onClick: selectConnectionCard }, 977 wpCreateElem("i", null, wpCreateElem("img", { src: zohoFormsBlock.permalinkIcon })), 978 wpCreateElem("div", { class: "accCardRight" }, 979 wpCreateElem("h4", null, "Use a Permalink"), 980 wpCreateElem("p", null, "Embed a form using its permalink URL.") 981 ) 982 ) 983 ) 984 ), 985 wpCreateElem("div", { class: "connFormFooter" }, 986 wpCreateElem("button", { class: "greenBtnNew", onClick: proceedFromHome }, "Next") 987 ) 988 ), 989 chooseZFormDiv, 990 embedActionDiv 991 ), 992 wpCreateElem("div", { id: "blockEditShortCodeDiv", style: { display: "none" } }) 764 993 ); 765 994 }, //End of edit function
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)