{*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
{literal}
<script type="text/Javascript">
function option_html_type(form) {
- var html_type = document.getElementById("html_type");
- var html_type_name = html_type.options[html_type.selectedIndex].value;
+ var html_type_name = cj('#html_type').val();
if (html_type_name == "Text") {
- document.getElementById("price-block").style.display="block";
- document.getElementById("showoption").style.display="none";
+ cj("#price-block").show();
+ cj("#showoption").hide();
}
else {
- document.getElementById("price-block").style.display="none";
- document.getElementById("showoption").style.display="block";
+ cj("#price-block").hide();
+ cj("#showoption").show();
}
if (html_type_name == 'Radio' || html_type_name == 'CheckBox') {
var radioOption, checkBoxOption;
for (var i=1; i<=15; i++) {
- radioOption = 'radio'+i;
- checkBoxOption = 'checkbox'+i
+ radioOption = '#radio'+i;
+ checkBoxOption = '#checkbox'+i;
if (html_type_name == 'Radio' || html_type_name == 'CheckBox' || html_type_name == 'Select') {
if (html_type_name == "CheckBox") {
- document.getElementById(checkBoxOption).style.display="block";
- document.getElementById(radioOption).style.display="none";
+ cj(checkBoxOption).show();
+ cj(radioOption).hide();
}
else {
- document.getElementById(radioOption).style.display="block";
- document.getElementById(checkBoxOption).style.display="none";
+ cj(radioOption).show();
+ cj(checkBoxOption).hide();
}
}
}
}
</script>
{/literal}
-<h3>{if $action eq 1}{ts}Add Field{/ts}{elseif $action eq 2}{ts}Edit Field{/ts}{/if}</h3>
<div class="crm-block crm-form-block crm-price-field-form-block">
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
<table class="form-layout">