boxs.tpl 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. {if $existingdomains}
  2. <div class="field-row clearfix">
  3. <label class="radio-inline product-radio"><input type="radio" onclick="chooseDomainReg('existing_domain')" name="domainoption" value="incart" id="selexisting_domain"{if $domainoption eq "existing_domain"} checked{/if} />{$EDLANG.UseaDomainIhaveAlreadyPurchased}</label>
  4. <div class="row domain-option line-padded{if $domainoption neq "existing_domain"} hidden{/if}" id="domopt-existing_domain">
  5. <div class="col-sm-1 col-sm-offset-2 col-xs-3"><p class="form-control-static text-right">www.</p></div>
  6. <div class="col-sm-5 col-xs-6">
  7. <select id="existing_domainsld" name="incartdomain" class="form-control">
  8. {foreach key=num item=existingdomain from=$existingdomains}
  9. <option value="{$existingdomain}">{$existingdomain}</option>
  10. {/foreach}
  11. </select>
  12. </div>
  13. </div>
  14. </div>
  15. {if $WSEXISTING.subdomain}
  16. <div class="field-row clearfix">
  17. <label class="radio-inline product-radio"><input type="radio" onclick="chooseDomainReg('subexisting_domain')" name="domainoption" value="incart" id="selsubexisting_domain"{if $domainoption eq "subexisting_domain"} checked{/if} />{$EDLANG.UseaSubDomainIhaveAlreadyPurchased}</label>
  18. <div class="row domain-option line-padded{if $domainoption neq "subexisting_domain"} hidden{/if}" id="domopt-subexisting_domain">
  19. <div class="col-sm-1 col-sm-offset-2 col-xs-3"><p class="form-control-static text-right">www.</p></div>
  20. <div class="col-sm-8 col-xs-6">
  21. <div class="row domains-row">
  22. <div class="col-xs-2 text-right">
  23. <input name="subdomainexisting_domaindomain" autocapitalize="none" data-toggle="tooltip" data-placement="top" data-trigger="manual" title="{$EDLANG.UseaSubDomainTooltip}" id="subdomainexisting_domaindomains" class="form-control">
  24. </div>
  25. <div class="col-xs-1 text-right" style="padding-right: 0px;padding-left: 0px;width: 2%;">
  26. <p class="form-control-static">.</p>
  27. </div>
  28. <div class="col-xs-6">
  29. <input name="incartdomain" type="hidden" value="" id="subexisting_domaindomainid">
  30. <select id="subexisting_domainsld" name="subexisting_domaindomain" class="form-control">
  31. {foreach key=num item=existingdomain from=$existingdomains}
  32. <option data-oldv="{$existingdomain}" value="{$existingdomain}">{$existingdomain}</option>
  33. {/foreach}
  34. </select>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. {/if}
  41. <script>
  42. $(document).ready(function () {
  43. $("#subdomainexisting_domaindomains").on("keyup", function () {
  44. if ($("#subdomainexisting_domaindomains").val() !== '') {
  45. $('#subdomainexisting_domaindomains').tooltip('hide');
  46. var oldvv = $("#subexisting_domainsld").find("option:selected").data("oldv");
  47. $("#subexisting_domaindomainid").val($("#subdomainexisting_domaindomains").val() + '.' + oldvv);
  48. } else {
  49. $("#subexisting_domaindomainid").val('');
  50. }
  51. });
  52. $("#subexisting_domainsld").on("change", function () {
  53. if ($("#subdomainexisting_domaindomains").val() !== '') {
  54. var oldvv = $("#subexisting_domainsld").find("option:selected").data("oldv");
  55. $("#subexisting_domaindomainid").val($("#subdomainexisting_domaindomains").val() + '.' + oldvv);
  56. } else {
  57. $("#subexisting_domaindomainid").val('');
  58. }
  59. });
  60. });
  61. </script>
  62. {/if}