Permalink
Browse files

Added missing error string for picker property

  • Loading branch information...
1 parent a9fdf77 commit 6da8209b8ac06b707fe158c9d1540b595e7365a8 @mmrwoods committed Aug 14, 2010
Showing with 3 additions and 2 deletions.
  1. +1 −0 config/system/strings.cfg
  2. +2 −2 tags/properties/Picker.cfm
@@ -220,6 +220,7 @@ T_DEFAULT_PICKER_MOVE_BOTTOM_CAPTION = Move item to bottom
; Picker
P_PICKER_NOT_MULTISELECT = Only one content item allowed in non-multiselect property
P_PICKER_NOT_UUID = '%1' is not a UUID
+P_PICKER_TOO_MANY_SELECTED = Too many items have been selected. Max allowed is %1.
; Asset
P_ASSET_NOT_AUTHORISED = You are not authorised to access this file.
@@ -352,7 +352,7 @@ Licensed under the Academic Free License version 2.1
so we'll lash out a JavaScript alert onclick instead rather than disable the button.
--->
<cfscript>
- if ( stPD.maxSelect eq listLen(value) ) {
+ if ( stPD.maxSelect gte listLen(value) ) {
addOnClick = "alert('#request.speck.buildString("A_PICKER_MAX_SELECTED_ALERT")#')";
selectOnClick = addOnClick; // don't need a different warning for adding and selecting
} else if (stPD.dependent) {
@@ -524,7 +524,7 @@ Licensed under the Academic Free License version 2.1
<cfif listLen(newValue) gt stPD.maxSelect>
- <cfset lErrors = request.speck.buildString("P_PICKER_TOO_MANY_SELECTED","")>
+ <cfset lErrors = request.speck.buildString("P_PICKER_TOO_MANY_SELECTED",stPD.maxSelect)>
</cfif>

0 comments on commit 6da8209

Please sign in to comment.