Enforce default currency to tick when no value is present

dejamuse - May 11, 2009 - 02:13
Project:Money CCK field
Version:6.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Enforce the default selection of currency to stick even when no amount is entered.

I noticed that if the money field is not marked required and if there is no value entered, the form throws a warning on form save telling the user:

A valid amount is required when a currency is specified

Sometimes there is no value to be entered, yet we still want the default currency to be shown.

#1

markus_petrux - May 11, 2009 - 16:27

Ideally, it should be implemented as an option in the widget settings, where the default makes the widget work as it does now, so that we don't break the current functionality of the sites that are using this module.

I'm pretty busy, so I'm not sure to have the time to work on this. I would be open to review patches, though.

#2

markus_petrux - May 13, 2009 - 10:31
Status:active» postponed

Postponing until I have the time, or someone else can come with a patch we can review.

#4

Bodo Maass - November 25, 2009 - 10:13
Version:6.x-1.1» 6.x-1.x-dev
Status:postponed» needs review

Attached is a patch that addresses this problem.
Specifically:

1. The selected default currency is shown when existing nodes are edited. Previously, the default currency was shown only for new nodes, but not when editing existing nodes

2. The warning message that a valid amount is required when the currency is specified is not shown when a currency is selected but the value is empty.

AttachmentSize
money.module.patch 1.12 KB
 
 

Drupal is a registered trademark of Dries Buytaert.