mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-31 01:35:15 +02:00
[DEV-302] Fix custom filed error message padding (#1190)
* add en translation * add margin * add i18n to error * add minor changes * add en translations
This commit is contained in:
parent
f2adb160be
commit
41d7aa5406
@ -63,7 +63,7 @@ class AdminPanelCustomFieldForm extends React.Component {
|
||||
|
||||
return (
|
||||
<Message showMessage={showErrorMessage} onCloseMessage={this.onCloseMessage.bind(this, "showErrorMessage")} type="error">
|
||||
{error}
|
||||
{i18n(error)}
|
||||
</Message>
|
||||
);
|
||||
}
|
||||
|
@ -26,5 +26,6 @@
|
||||
&__buttons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
@ -412,7 +412,10 @@ export default {
|
||||
'INVALID_SUPERVISED_USERS': 'Invalid supervised users',
|
||||
'SUPERVISOR_CAN_NOT_SUPERVISE_HIMSELF': 'Supervisor can not supervise himself',
|
||||
'NAME_ALREADY_USED': 'Name already used',
|
||||
'PAGESIZE_ERROR': 'Invalid page size',
|
||||
'INVALID_PAGE_SIZE': 'Invalid page size',
|
||||
'INVALID_CUSTOM_FIELD_TYPE': 'Invalid custom field type',
|
||||
'INVALID_CUSTOM_FIELD_OPTIONS': 'Invalid custom field options',
|
||||
'CUSTOM_FIELD_ALREADY_EXISTS': 'Custom field already exists',
|
||||
|
||||
//MESSAGES
|
||||
'SIGNUP_SUCCESS': 'You have registered successfully in our support system.',
|
||||
|
@ -19,6 +19,7 @@ use Respect\Validation\Validator as DataValidator;
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_PAGE
|
||||
* @apiUse INVALID_PAGE_SIZE
|
||||
*
|
||||
* @apiSuccess {Object} data Information about a tickets and quantity of pages.
|
||||
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)[]} data.tickets Array of new tickets of the current page.
|
||||
@ -41,7 +42,7 @@ class GetNewTicketsStaffController extends Controller {
|
||||
],
|
||||
'pageSize' => [
|
||||
'validation' => DataValidator::oneOf(DataValidator::intVal()->between(5, 50),DataValidator::nullType()),
|
||||
'error' => ERRORS::PAGESIZE_ERROR
|
||||
'error' => ERRORS::INVALID_PAGE_SIZE
|
||||
]
|
||||
]
|
||||
];
|
||||
|
@ -19,6 +19,7 @@ use Respect\Validation\Validator as DataValidator;
|
||||
*
|
||||
* @apiUse NO_PERMISSION
|
||||
* @apiUse INVALID_PAGE
|
||||
* @apiUse INVALID_PAGE_SIZE
|
||||
*
|
||||
* @apiSuccess {Object} data Information about a tickets and quantity of pages.
|
||||
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)[]} data.tickets Array of tickets assigned to the staff of the current page.
|
||||
@ -40,8 +41,8 @@ class GetTicketStaffController extends Controller {
|
||||
'error' => ERRORS::INVALID_PAGE
|
||||
],
|
||||
'pageSize' => [
|
||||
'validation' => DataValidator::oneOf(DataValidator::intVal()->between(5, 50),DataValidator::nullType()),
|
||||
'error' => ERRORS::PAGESIZE_ERROR
|
||||
'validation' => DataValidator::oneOf(DataValidator::intVal()->between(5, 50),DataValidator::nullType()),
|
||||
'error' => ERRORS::INVALID_PAGE_SIZE
|
||||
]
|
||||
]
|
||||
];
|
||||
|
@ -101,7 +101,7 @@ class SearchController extends Controller {
|
||||
],
|
||||
'pageSize' => [
|
||||
'validation' => DataValidator::oneOf(DataValidator::intVal()->between(5, 50),DataValidator::nullType()),
|
||||
'error' => ERRORS::PAGESIZE_ERROR
|
||||
'error' => ERRORS::INVALID_PAGE_SIZE
|
||||
]
|
||||
]
|
||||
];
|
||||
|
@ -410,5 +410,5 @@ class ERRORS {
|
||||
const INVALID_SUPERVISED_USERS = 'INVALID_SUPERVISED_USERS';
|
||||
const INVALID_USER_SEARCH_OPTION = 'INVALID_USER_SEARCH_OPTION';
|
||||
const TICKET_CONTENT_CANNOT_BE_EDITED = 'TICKET_CONTENT_CANNOT_BE_EDITED';
|
||||
const PAGESIZE_ERROR = 'PAGESIZE_ERROR';
|
||||
const INVALID_PAGE_SIZE = 'INVALID_PAGE_SIZE';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user