Skip to content

Genericatt 138 : add scale to entry type radio #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class GenericAttributeError implements Serializable, ErrorMessage
private boolean _bMandatoryError;
private String _strUrl;
private boolean _bDisplayableError = true;
private String _strErrorFieldMessage = "";

/**
* return true if the error is a mandatory error
Expand Down Expand Up @@ -157,4 +158,28 @@ public void setIsDisplayableError( boolean bDisplayableError )
{
_bDisplayableError = bDisplayableError;
}

@Override
public String getFieldName() {
return getErrorFieldMessage( );
}

/**
* Gets the field error Message
*
* @return the error field Message
*/
public String getErrorFieldMessage( ) {
return _strErrorFieldMessage;
}

/**
* set the field error message
*
* @param strErrorFieldMessage
* the error field message
*/
public void setErrorFieldMessage( String strErrorFieldMessage ) {
this._strErrorFieldMessage = strErrorFieldMessage;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ public String getRequestData( Entry entry, HttpServletRequest request, Locale lo
String strFieldInLine = request.getParameter( PARAMETER_FIELD_IN_LINE );
String strCSSClass = request.getParameter( PARAMETER_CSS_CLASS );
String strOnlyDisplayInBack = request.getParameter( PARAMETER_ONLY_DISPLAY_IN_BACK );
String strFieldAlignment = request.getParameter( PARAMETER_ALIGNMENT_TEXT );
String strFieldTextLeft = request.getParameter( PARAMETER_TEXT_LEFT );
String strFieldTextRight = request.getParameter( PARAMETER_TEXT_RIGHT );

int nFieldInLine = -1;

Expand Down Expand Up @@ -104,6 +107,10 @@ public String getRequestData( Entry entry, HttpServletRequest request, Locale lo

entry.setMandatory( strMandatory != null );
entry.setOnlyDisplayInBack( strOnlyDisplayInBack != null );

GenericAttributesUtils.createOrUpdateField( entry, FIELD_ALIGNMENT, null, String.valueOf( strFieldAlignment != null ) );
GenericAttributesUtils.createOrUpdateField( entry, FIELD_TEXT_LEFT, null, strFieldTextLeft );
GenericAttributesUtils.createOrUpdateField( entry, FIELD_TEXT_RIGHT, null, strFieldTextRight );

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ public interface IEntryTypeService
String PARAMETER_USE_REF_LIST = "use_ref_list";
String PARAMETER_REF_LIST_SELECT = "select_ref_list";
String PARAMETER_PLACEHOLDER = "placeholder";
String PARAMETER_ALIGNMENT_TEXT = "alignment_text";
String PARAMETER_TEXT_LEFT = "left_text";
String PARAMETER_TEXT_RIGHT = "right_text";

// Fields codes
String FIELD_DATE_VALUE = "default_date_value";
Expand Down Expand Up @@ -133,6 +136,9 @@ public interface IEntryTypeService
String FIELD_USE_REF_LIST = "use_ref_list";
String FIELD_ANONYMIZABLE = "anonymizable";
String FIELD_PLACEHOLDER = "placeholder";
String FIELD_ALIGNMENT = "alignment_text";
String FIELD_TEXT_LEFT = "left_text";
String FIELD_TEXT_RIGHT = "right_text";

// attribute
String ATTRIBUTE_RESPONSE_ITERATION_NUMBER = "response_iteration_number";
Expand Down