diff options
author | ivan <ivan> | 2008-10-05 06:07:36 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-10-05 06:07:36 +0000 |
commit | 5e5c408ded395ae70c4ce3878ed260674253cccd (patch) | |
tree | 6a0eef801b4ae6c23f5f894f8f2893f775976796 /httemplate/edit | |
parent | aa8d3305bddaca26d9222ebfa48af191d28f8230 (diff) |
finish UI improvements wrt refunds: now you have to post a check or cash refund explicitly, no more implicit creation by 'applying' credits. don't show useless application links. don't enable apply button until you pick an invoice/refund. RT#3812
Diffstat (limited to 'httemplate/edit')
-rw-r--r-- | httemplate/edit/elements/ApplicationCommon.html | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/httemplate/edit/elements/ApplicationCommon.html b/httemplate/edit/elements/ApplicationCommon.html index 0e6c49975..a485d37de 100644 --- a/httemplate/edit/elements/ApplicationCommon.html +++ b/httemplate/edit/elements/ApplicationCommon.html @@ -43,7 +43,7 @@ Examples: <% include('/elements/error.html') %> -<FORM ACTION="<% $p1. $opt{'form_action'} %>" METHOD=POST> +<FORM ACTION="<% $p1. $opt{'form_action'} %>" NAME="ApplicationForm" ID="ApplicationForm" METHOD=POST> <% $src_thing %> #<B><% $src_pkeyvalue %></B><BR> <INPUT TYPE="hidden" NAME="<% $src_pkey %>" VALUE="<% $src_pkeyvalue %>"> @@ -79,6 +79,13 @@ Examples: function changed(what) { dst = what.options[what.selectedIndex].value; + if ( dst == '' ) { + what.form.submit.disabled=true; + return true; + } + + what.form.submit.disabled=false; + % foreach my $dst ( @dst ) { if ( dst == <% $dst->$dst_pkey %> ) { @@ -97,7 +104,7 @@ Apply to: <TR> <TD ALIGN="right"><% $dst_thing %>: </TD> <TD><SELECT NAME="<% $dst_pkey %>" SIZE=1 onChange="changed(this)"> -<OPTION VALUE=""> +<OPTION VALUE="">Select <% $dst_thing %> % foreach my $dst ( @dst ) { <OPTION<% $dst->$dst_pkey eq $dst_pkeyvalue ? ' SELECTED' : '' %> VALUE="<% $dst->$dst_pkey %>">#<% $dst->$dst_pkey %> - <% time2str("%D", $dst->_date) %> - $<% $dst->$dst_unapplied %> @@ -115,7 +122,7 @@ Apply to: </TABLE> <BR> -<CENTER><INPUT TYPE="submit" VALUE="Apply"></CENTER> +<CENTER><INPUT TYPE="submit" VALUE="Apply" NAME="submit" ID="submit" DISABLED></CENTER> </FORM> |