A lot CSS classes rewritten, please update all your themes.
[mailer.git] / templates / de / html / js / js_surfbar_member_edit.tpl
1 var limit = document.getElementById('limit');
2 var span = document.getElementById('span_limit');
3 var old_limit = {%pipe,bigintval=$content[views_max]%};
4
5 function FocusLimitedNo () {
6         if ((limit.value > 0) && (limit.value != '-')) {
7                 old_limit = limit.value;
8         }
9         limit.disabled = true;
10         limit.setAttribute('class', 'disabled');
11         limit.style.textAlign = 'center';
12         limit.value = '-';
13 }
14
15 function FocusLimitedYes () {
16         limit.disabled = false;
17         limit.setAttribute('class', 'form_field');
18         limit.style.textAlign = 'left';
19         if (old_limit > 0) {
20                 limit.value = old_limit;
21         } else {
22                 limit.value = '';
23         }
24         limit.focus();
25 }
26
27 function SubmitForm () {
28         if (limit.value == '-') {
29                 limit.value = 0;
30         }
31         return true;
32 }
33
34 function ResetForm () {
35         old_limit = 0;
36         FocusLimitedNo();
37         return false;
38 }
39
40 if ({%pipe,bigintval=$content[limited]%} == true) {
41         FocusLimitedYes();
42 } else {
43         FocusLimitedNo();
44 }