X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fpart_pkg_fcc_options.html;h=a5ecb12bcd2c612a95d40c0f0c59ebfee0269335;hb=0f359d5480aa1621d73ee802f420e8951abc620d;hp=1f5d4a8bf1fefbae4ae02ddc3d662ec31b94ddea;hpb=447f1a906b47868497485edc3ba190a808539956;p=freeside.git diff --git a/httemplate/misc/part_pkg_fcc_options.html b/httemplate/misc/part_pkg_fcc_options.html index 1f5d4a8bf..a5ecb12bc 100644 --- a/httemplate/misc/part_pkg_fcc_options.html +++ b/httemplate/misc/part_pkg_fcc_options.html @@ -90,8 +90,10 @@ <& .checkbox, 'is_voip' &> <LABEL FOR="is_voip">This package provides VoIP telephone service</LABEL> <FIELDSET ID="voip"> - <LABEL FOR="voip_ott">Do you also provide last-mile connectivity?</LABEL> - <& .checkbox, 'voip_ott' &> + <LABEL FOR="voip_sessions">Number of simultaneous calls possible</LABEL> + <INPUT NAME="voip_sessions" ID="voip_sessions"> + <& .checkbox, 'voip_lastmile' &> + <LABEL FOR="voip_lastmile">Do you also provide last-mile connectivity?</LABEL> </FIELDSET> </P> <DIV WIDTH="100%" STYLE="text-align:center"> @@ -103,8 +105,8 @@ // this form is invoked as a popup; the current values of the parent // object are in the form field ID passed as the 'id' param -var parent_id = window.parent.document.getElementById('<% $parent_id %>'); -var curr_values = JSON.parse(window.parent_id.value); +var parent_input = window.parent.document.getElementById('<% $parent_id %>'); +var curr_values = JSON.parse(window.parent_input.value); var form = document.forms['fcc_option_form']; var media_types = <% encode_json($media_types) %> var technology_labels = <% encode_json($technology_labels) %> @@ -129,6 +131,9 @@ function save_changes() { var form = document.forms['fcc_option_form']; var data = {}; for (var i = 0; i < form.elements.length; i++) { + if (form.elements[i].type == 'submit') + continue; + // quick and dirty test for whether the element is displayed if (form.elements[i].clientHeight > 0) { if (form.elements[i].type == 'checkbox') { @@ -140,7 +145,9 @@ function save_changes() { } } } - parent_id.value = JSON.stringify(data); + parent_input.value = JSON.stringify(data); + // update the display + parent.show_fcc_options(parent_input.id); parent.cClick(); //overlib } @@ -174,6 +181,11 @@ function enable_fieldset(fieldset_id) { form.elements['phone1'].disabled = (this.value == ''); } ); + addEventListener(form.elements['is_phone'], 'change', + function() { + form.elements['phone_wholesale'].dispatchEvent( new Event('change') ); + } + ); // load data from the parent form and trigger handlers for(var i = 0; i < form.elements.length; i++) {