From b6260b4f39cf34b9e0e5b8560ef88c8881ba0766 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 14 Jun 2015 13:59:11 -0700 Subject: UI spring cleaning: customer edit --- httemplate/edit/cust_main/basics.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'httemplate/edit/cust_main/basics.html') diff --git a/httemplate/edit/cust_main/basics.html b/httemplate/edit/cust_main/basics.html index 1c5023de9..2ca6f65a5 100644 --- a/httemplate/edit/cust_main/basics.html +++ b/httemplate/edit/cust_main/basics.html @@ -110,7 +110,7 @@ - <% mt('Agent') |h %> + <% mt('Agent') |h %> <% $cust_main->agent->agent |h %> @@ -118,7 +118,7 @@ <& /elements/tr-select-agent.html, 'curr_value' => $cust_main->agentnum, - 'label' => "${r}".emt('Agent')."", + 'label' => $r. emt('Agent'), 'empty_label' => emt('Select agent'), 'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ), 'viewall_right' => emt('None'), @@ -131,7 +131,7 @@ % if ( $conf->exists('cust_main-edit_agent_custid') ) { - <% mt('Customer identifier') |h %> + <% mt('Customer identifier') |h %> @@ -157,6 +157,7 @@ %#sales person <& /elements/tr-select-sales.html, 'curr_value' => $cust_main->salesnum, + 'th' => 1, &> %# referral (advertising source) @@ -169,7 +170,7 @@ <& /elements/tr-select-part_referral.html, 'curr_value' => $refnum, - 'label' => "${r}".emt('Advertising source')."" + 'label' => $r. emt('Advertising source'), &> % } @@ -183,7 +184,7 @@ %) { - <% mt('Referring customer') |h %> + <% mt('Referring customer') |h %> <% $cust_main->referral_custnum %>: <% $referring_cust_main->name |h %> @@ -193,7 +194,7 @@ % } elsif ( ! $conf->exists('disable_customer_referrals') ) { - <% mt('Referring customer') |h %> + <% mt('Referring customer') |h %> <& /elements/search-cust_main.html, 'field_name' => 'referral_custnum', -- cgit v1.2.1 From 9bee11036c3bf8e7905bbebf77a77792660186ac Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 16 Jun 2015 17:11:30 -0700 Subject: UI spring cleaning: animate company/spouse/contact hide/unhide --- httemplate/edit/cust_main/basics.html | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'httemplate/edit/cust_main/basics.html') diff --git a/httemplate/edit/cust_main/basics.html b/httemplate/edit/cust_main/basics.html index 2ca6f65a5..e484c732d 100644 --- a/httemplate/edit/cust_main/basics.html +++ b/httemplate/edit/cust_main/basics.html @@ -25,15 +25,21 @@ function rescom_changed(what) { if ( what.checked == (what.value == 'Commercial' ) ) { - document.getElementById('company_row').style.display = ''; - document.getElementById('contacts_div').style.display = ''; - document.getElementById('spouse_row').style.display = 'none'; + $('#company_label').slideDown(); + $('#company_input').slideDown(); + $('#contacts_div').slideDown(); + $('#spouse_label').slideUp(); + $('#spouse_last_input').slideUp(); + $('#spouse_first_input').slideUp(); } else { if ( document.getElementById('company').value.length == 0 ) { - document.getElementById('company_row').style.display = 'none'; + $('#company_label').slideUp(); + $('#company_input').slideUp(); } - document.getElementById('contacts_div').style.display = 'none'; - document.getElementById('spouse_row').style.display = ''; + $('#contacts_div').slideUp(); + $('#spouse_label').slideDown(); + $('#spouse_last_input').slideDown(); + $('#spouse_first_input').slideDown(); } } -- cgit v1.2.1 From c6ab4d567c978cbe616c8cb5201c61bde212b3a0 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Wed, 17 Jun 2015 17:44:23 -0700 Subject: fix interaction of agent choice, agent-ship_address, and "same" checkbox, #21327 and #27545 --- httemplate/edit/cust_main/basics.html | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/cust_main/basics.html') diff --git a/httemplate/edit/cust_main/basics.html b/httemplate/edit/cust_main/basics.html index e484c732d..e16aafafc 100644 --- a/httemplate/edit/cust_main/basics.html +++ b/httemplate/edit/cust_main/basics.html @@ -56,6 +56,7 @@ % # unlock/lock service location var f = what.form; + var was_same = f['same'].checked; if ( ship_locked_agents[agentnum] ) { % # For this agent, the service location (except address2) % # should be locked to the agent's location. @@ -72,16 +73,25 @@ % # disabled, then they contain some agent's address, which is % # no longer meaningful. So set them back to the customer's % # current location. + var is_same = true; for(var i=0; i rescom_changed(document.getElementById('residential_commercial_Residential')); agent_changed(document.getElementById('agentnum')); - samechanged(document.getElementById('same')); + + if ( $('#same').prop('checked') ) { + $('#div_ship_location').hide(); + } else { + $('#div_ship_location').show(); + } + -- cgit v1.2.1 From d13dae1c37c36c27f1ac9fd134c5d8b3a4fb9754 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Tue, 30 Jun 2015 03:24:08 -0500 Subject: RT#29285: State field not needed for New Zealand --- httemplate/edit/cust_main/basics.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'httemplate/edit/cust_main/basics.html') diff --git a/httemplate/edit/cust_main/basics.html b/httemplate/edit/cust_main/basics.html index e16aafafc..32a03bbe6 100644 --- a/httemplate/edit/cust_main/basics.html +++ b/httemplate/edit/cust_main/basics.html @@ -46,7 +46,7 @@ var ship_locked_agents = <% encode_json(\%ship_locked_agents) %>; var ship_fields = [ - 'locationname', 'address1', 'city', 'state', 'zip', 'country', + 'locationname', 'address1',<% $conf->exists('cust_main-no_city_in_address') ? '' : q( 'city',) %> 'state', 'zip', 'country', 'latitude', 'longitude', 'district' ]; @@ -307,7 +307,10 @@ foreach (qsearch('agent',{})) { my $agent_ship_location = $cust_main->ship_location; $ship_locked_agents{$agentnum} = +{ map { $_ => $agent_ship_location->$_ } - qw(locationname address1 city state zip country latitude longitude district) + ( + qw(locationname address1 state zip country latitude longitude district), + ($conf->exists('cust_main-no_city_in_address') ? () : 'city') + ) }; } -- cgit v1.2.1