9
9
checkLeadSelection();
10
10
if (Validation.isFieldWhitespace('title')) {
11
11
Validation.selectField('title');
12
alert('{/literal}{t escape=js}Please enter the title of this project.{/t}{literal}');
12
alert('{t escape=js}Please enter the title of this project.{/t}');
15
15
if (!Validation.hasOneSelected('users[]')) {
16
16
Validation.selectField('users[]');
17
alert('{/literal}{t escape=js}Please assign the users for this project.{/t}{literal}');
17
alert('{t escape=js}Please assign the users for this project.{/t}');
20
20
if (!Validation.hasOneSelected('statuses[]')) {
21
21
Validation.selectField('statuses[]');
22
alert('{/literal}{t escape=js}Please assign the statuses for this project.{/t}{literal}');
22
alert('{t escape=js}Please assign the statuses for this project.{/t}');
26
26
// the selected initial status should be one of the selected assigned statuses
27
27
if ($.inArray(Eventum.getField('initial_status').val(), Eventum.getField('statuses[]').val()) == -1) {
28
28
Validation.selectField('initial_status');
29
alert('{/literal}{t escape=js}Please choose the initial status from one of the assigned statuses of this project.{/t}{literal}');
29
alert('{t escape=js}Please choose the initial status from one of the assigned statuses of this project.{/t}');
32
32
if (!Validation.isEmail(Eventum.getField('outgoing_sender_email').val())) {
33
33
Validation.selectField('outgoing_sender_email');
34
alert('{/literal}{t escape=js}Please enter a valid outgoing sender address for this project.{/t}{literal}');
34
alert('{t escape=js}Please enter a valid outgoing sender address for this project.{/t}');
37
37
if (!Validation.isFieldWhitespace('mail_aliases')) {
40
40
$.each(aliases, function(index) {
41
41
if (!Validation.isEmail(this)) {
42
42
Validation.selectField('mail_aliases');
43
alert('{/literal}{t escape=js}Please enter a comma separated list of valid mail address aliases for this project{/t}{literal}');
43
alert('{t escape=js}Please enter a comma separated list of valid mail address aliases for this project{/t}');
44
44
return_false = true;
62
62
var total_selected = $('[name="items[]"]:checked').length;
63
63
var total = $('[name="items[]"]').length
64
64
if (total == total_selected) {
65
alert('{/literal}{t escape=js}You cannot remove all of the projects in the system.{/t}{literal}');
65
alert('{t escape=js}You cannot remove all of the projects in the system.{/t}');
68
68
if (total_selected == 0) {
69
alert('{/literal}{t escape=js}Please select at least one of the projects.{/t}{literal}');
69
alert('{t escape=js}Please select at least one of the projects.{/t}');
72
if (!confirm('{/literal}{t escape=js}WARNING: This action will remove the selected projects permanently.{/t}{literal}\n{/literal}{t}It will remove all of its associated entries as well (issues, notes, attachments,\netc), so please click OK to confirm.{/t}{literal}')) {
72
if (!confirm('{t escape=js}WARNING: This action will remove the selected projects permanently.{/t}\n{t}It will remove all of its associated entries as well (issues, notes, attachments,\netc), so please click OK to confirm.{/t}')) {