diff --git a/src/java/fr/paris/lutece/plugins/genericattributes/business/GenericAttributeError.java b/src/java/fr/paris/lutece/plugins/genericattributes/business/GenericAttributeError.java index a942add..ff397ad 100644 --- a/src/java/fr/paris/lutece/plugins/genericattributes/business/GenericAttributeError.java +++ b/src/java/fr/paris/lutece/plugins/genericattributes/business/GenericAttributeError.java @@ -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 @@ -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; + } } diff --git a/src/java/fr/paris/lutece/plugins/genericattributes/service/entrytype/AbstractEntryTypeRadioButton.java b/src/java/fr/paris/lutece/plugins/genericattributes/service/entrytype/AbstractEntryTypeRadioButton.java index fc354d8..406b613 100644 --- a/src/java/fr/paris/lutece/plugins/genericattributes/service/entrytype/AbstractEntryTypeRadioButton.java +++ b/src/java/fr/paris/lutece/plugins/genericattributes/service/entrytype/AbstractEntryTypeRadioButton.java @@ -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; @@ -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 { diff --git a/src/java/fr/paris/lutece/plugins/genericattributes/service/entrytype/IEntryTypeService.java b/src/java/fr/paris/lutece/plugins/genericattributes/service/entrytype/IEntryTypeService.java index 9284d25..3f30243 100644 --- a/src/java/fr/paris/lutece/plugins/genericattributes/service/entrytype/IEntryTypeService.java +++ b/src/java/fr/paris/lutece/plugins/genericattributes/service/entrytype/IEntryTypeService.java @@ -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"; @@ -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";