alert('{/literal}{t escape=js}Please enter the title of this custom field.{/t}{literal}');
12
alert('{t escape=js}Please enter the title of this custom field.{/t}');
13
13
Validation.selectField('title');
14
14
return false;
15
15
}
16
16
if (!Validation.hasOneSelected('projects[]')) {
17
alert('{/literal}{t escape=js}Please assign the appropriate projects for this custom field.{/t}{literal}');
17
alert('{t escape=js}Please assign the appropriate projects for this custom field.{/t}');
18
18
Validation.selectField('projects[]');
19
19
return false;
20
20
}
37
37
}
38
38
}
39
39
if (removed_projects.length > 0) {
40
var answer = confirm('{/literal}{t escape=js}WARNING: You have removed project(s){/t}{literal} ' + removed_projects + ' {/literal}{t}from the list{/t}{literal} ' +
41
'{/literal}{t escape=js}of associated projects. This will remove all data for this field from the selected project(s).{/t}{literal} ' +
42
'{/literal}{t escape=js}Do you want to continue?{/t}{literal}');
40
var answer = confirm('{t escape=js}WARNING: You have removed project(s){/t} ' + removed_projects + ' {t}from the list{/t} ' +
41
'{t escape=js}of associated projects. This will remove all data for this field from the selected project(s).{/t} ' +
42
'{t escape=js}Do you want to continue?{/t}');
43
43
if (answer == false) {
44
44
return false;
45
45
}
55
55
var val_field = $('input[name=new_value]');
56
56
var value = val_field.val();
57
57
if (Validation.isWhitespace(value)) {
58
alert('{/literal}{t escape=js}Please enter the new value for the combo box.{/t}{literal}');
58
alert('{t escape=js}Please enter the new value for the combo box.{/t}');
59
59
val_field.val('');
60
60
val_field.focus();
61
61
return false;
70
70
// check for an existing option with the same value
71
71
for (var i = 0; i < field.options.length; i++) {
72
72
if (field.options[i].text == value) {
73
alert('{/literal}{t escape=js}The specified value already exists in the list of options.{/t}{literal}');
73
alert('{t escape=js}The specified value already exists in the list of options.{/t}');
74
74
val_field.focus();
75
75
return false;
76
76
}
91
91
{
92
92
var new_value = Eventum.getField('new_value').val();
93
93
if (Validation.isWhitespace(new_value)) {
94
alert('{/literal}{t escape=js}Please enter the updated value.{/t}{literal}');
94
alert('{t escape=js}Please enter the updated value.{/t}');
95
95
return false;
96
96
}
97
97
var option = Eventum.getField('field_options[]').children('option').filter("[value='" + editing_option_id + "']'");
105
105
{
106
106
var options = Eventum.getField('field_options[]').children(':selected');
107
107
if (options.length == 0) {
108
alert('{/literal}{t escape=js}Please select an option from the list.{/t}{literal}');
108
alert('{t escape=js}Please select an option from the list.{/t}');
109
109
return false;
110
110
}
111
111
editing_option_id = options[0].value;
115
115
function removeFieldOption(e)
116
116
{
117
117
if (!Validation.hasOneSelected('field_options[]')) {
118
alert('{/literal}{t escape=js}Please select an option from the list.{/t}{literal}');
118
alert('{t escape=js}Please select an option from the list.{/t}');