20
20
if (Eventum.getField('project').val() == -1) {
21
21
Validation.selectField('project');
22
alert('{/literal}{t escape=js}Please choose the project for this FAQ entry.{/t}{literal}');
22
alert('{t escape=js}Please choose the project for this FAQ entry.{/t}');
25
25
var field = Eventum.getField('support_levels[]');
26
26
if (field.length > 0) {
27
27
if (!Validation.hasOneSelected('support_levels[]')) {
28
28
Validation.selectField('support_levels[]');
29
alert('{/literal}{t escape=js}Please assign the appropriate support levels for this FAQ entry.{/t}{literal}');
29
alert('{t escape=js}Please assign the appropriate support levels for this FAQ entry.{/t}');
33
33
var rank = Eventum.getField("rank").val();
34
34
if (Validation.isWhitespace(rank)) {
35
35
Validation.selectField('rank');
36
alert('{/literal}{t escape=js}Please enter the rank of this FAQ entry.{/t}{literal}');
36
alert('{t escape=js}Please enter the rank of this FAQ entry.{/t}');
39
39
if (!Validation.isNumberOnly(rank)) {
40
40
Validation.selectField('rank');
41
alert('{/literal}{t escape=js}Please enter a number for the rank of this FAQ entry.{/t}{literal}');
41
alert('{t escape=js}Please enter a number for the rank of this FAQ entry.{/t}');
44
44
if (Validation.isFieldWhitespace('title')) {
45
45
Validation.selectField('title');
46
alert('{/literal}{t escape=js}Please enter the title of this FAQ entry.{/t}{literal}');
46
alert('{t escape=js}Please enter the title of this FAQ entry.{/t}');
49
49
if (Validation.isFieldWhitespace('message')) {
50
50
Validation.selectField('message');
51
alert('{/literal}{t escape=js}Please enter the content of this FAQ entry.{/t}{literal}');
51
alert('{t escape=js}Please enter the content of this FAQ entry.{/t}');
56
56
function checkDelete(f)
58
58
if (!Validation.hasOneChecked('items[]')) {
59
alert('{/literal}{t escape=js}Please select at least one of the FAQ entries.{/t}{literal}');
59
alert('{t escape=js}Please select at least one of the FAQ entries.{/t}');
62
if (!confirm('{/literal}{t escape=js}This action will permanently remove the selected FAQ entries.{/t}{literal}')) {
62
if (!confirm('{t escape=js}This action will permanently remove the selected FAQ entries.{/t}')) {