Skip to content
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

Updated ticket type and saved replies form validation criterias #530

Merged
merged 1 commit into from
Dec 24, 2021
Merged
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
4 changes: 4 additions & 0 deletions Resources/views/savedReplyForm.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@
,{
pattern: '^(?!.*[!@#$%^&*()<_+])',
msg: "{{ 'Name must have characters only' }}"
},
{
maxLength:100,
msg: "{{ 'This field contain maximum 100 characters.'|trans }}"
}
],
}
Expand Down
2 changes: 1 addition & 1 deletion Resources/views/ticket.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@

<ul class="uv-search-list type" data-action="type">
{% for type in ticketTypeCollection %}
<li data-index="{{ type.id }}"><a href="#">{{ type.description }}</a></li>
<li data-index="{{ type.id }}"><a href="#">{{ type.code }}</a></li>
{% endfor %}
</ul>
</div>
Expand Down
17 changes: 15 additions & 2 deletions Resources/views/ticketTypeAdd.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,27 @@
$(function () {
var TypeModel = Backbone.Model.extend({
validation: {
'code': {
'code': [{
required: true,
msg: "{{ 'This field is mandatory'|trans }}"
}
,{
pattern: '^(?!.*[!@#$%^&*()<_+])',
msg: "{{ 'Name must have characters only' }}"
},
'description': {
,{
maxLength:200,
msg: "{{ 'This field contain maximum 100 characters.'|trans }}"
}],
'description': [{
required: true,
msg: "{{ 'This field is mandatory'|trans }}"
}
,{
maxLength:200,
msg: "{{ 'This field contain maximum 200 characters.'|trans }}"
}
],
}
});

Expand Down