{foreach from=$ERRORS item="error_message" key="error"} {if $error == 0} {assign var="error" value="1"} {/if} {if $error eq "INVALID_REQUEST"}
{$error_message}
{elseif $error eq "INVALID_DATA"}{$error_message}
{elseif $error eq "REQUEST_FORM_NOT_EXIST"}[[Provided request form does not exist, please contact administrator]]
{elseif $error eq "INPUT_FORM_NOT_EXIST"}[[Provided input form does not exist, please contact administrator]]
{elseif $error eq "PARAMETERS_MISSED"} [[The system cannot proceed as some key parameters are missed]] {elseif $error eq "MYSQL_ERROR"} {$error_message} {elseif $error eq "NOT_LOGGED_IN" or $error_message eq 'NOT_LOGGED_IN'}[[No logged in user found]]
{elseif $error eq 'DEFAULT_VALUE_NOT_SET'}Default value for {$error_message} is not set
{elseif $error eq 'PERIOD_FROM_IS_EMPTY' or $error_message eq 'PERIOD_FROM_IS_EMPTY'}[[the beginning of the period is not specified (empty)]]
{elseif $error eq 'PERIOD_TO_IS_EMPTY' or $error_message eq 'PERIOD_TO_IS_EMPTY'}[[The end of the period is not specified (empty)]]
{elseif $error eq 'LISTING_SID_IS_EMPTY' or $error_message eq 'LISTING_SID_IS_EMPTY'}[[Listing ID is not specified]]
{elseif $error eq 'FIELD_SID_IS_EMPTY' or $error_message eq 'FIELD_SID_IS_EMPTY'}[[Calendar ID is not specified]]
{elseif $error eq 'UNKNOWN_DATE_FORMAT_IN_PERIOD_FROM' or $error_message eq 'UNKNOWN_DATE_FORMAT_IN_PERIOD_FROM'}[[The beginning of the period contains unknown date format. Please put your date in the yyyy-mm-dd]]
{elseif $error eq 'UNKNOWN_DATE_FORMAT_IN_PERIOD_TO' or $error_message eq 'UNKNOWN_DATE_FORMAT_IN_PERIOD_TO'}[[The end of the period contains unknown date format. Please put your date in the yyyy-mm-dd]]
{elseif $error eq 'LISTING_NOT_FOUND' or $error_message eq 'LISTING_NOT_FOUND'}[[Listing was not found]]
{elseif $error eq 'FIELD_NOT_FOUND' or $error_message eq 'FIELD_NOT_FOUND'}[[Calendar was not found]]
{elseif $error eq 'DATE_FROM_INTERSECTS' or $error_message eq 'DATE_FROM_INTERSECTS'}[[The beginning of the period conflicts with another period]]
{elseif $error eq 'DATE_TO_INTERSECTS' or $error_message eq 'DATE_TO_INTERSECTS'}[[The end of the period conflicts with another period]]
{elseif $error eq 'PERIODS_INTERSECTS' or $error_message eq 'PERIODS_INTERSECTS'}[[Period conflicts with another period]]
{elseif $error eq 'FROM_MUST_BE_BEFORE_TO' or $error_message eq 'FROM_MUST_BE_BEFORE_TO'}[[Start date of the period exceed the end date]]
{elseif $error eq 'AUTHORIZATION_FAILED' or $error_message eq 'AUTHORIZATION_FAILED'}[[You have no rights to create the period]]
{elseif $error eq 'DELETE_AUTHORIZATION_FAILED' or $error_message eq 'DELETE_AUTHORIZATION_FAILED'}[[You have no rights to remove period]]
{elseif $error eq 'PERIOD_NOT_EXISTS' or $error_message eq 'PERIOD_NOT_EXISTS'}[[Removed period does not exist]]
{elseif $error eq 'EMAIL_IS_EMPTY' or $error_message eq 'EMAIL_IS_EMPTY'}[[The email field is empty. Please type in your email address]]
{elseif $error eq 'EMAIL_NOT_VALID' or $error_message eq 'EMAIL_NOT_VALID'}[[Your email address is not properly formatted. Please type your email address in an appropriate format (yourname@email.com)]]
{elseif $error eq 'NAME_IS_EMPTY' or $error_message eq 'NAME_IS_EMPTY'}[[Your NAME field is empty]]
{elseif $error eq 'RATE_IS_NOT_VALID' or $error_message eq 'RATE_IS_NOT_VALID'}[[Your rating value is invalid. Value must be between 1 and 5]]
{else}{$error_message} {$error}
{/if} {/foreach}