summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 43fc77c)
raw | patch | inline | side by side (parent: 43fc77c)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 15 Jun 2005 13:31:18 +0000 (13:31 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 15 Jun 2005 13:31:18 +0000 (13:31 +0000) |
html/include/calendar.js | patch | blob | history | |
plugins/personal/generic/generic.tpl | patch | blob | history | |
plugins/personal/posix/class_posixAccount.inc | patch | blob | history |
index b6f7296c0a97ef7c07a03d07c209ac65ed9350c8..830deb078ff93b63c6d001ff7961bde105e02fd7 100644 (file)
--- a/html/include/calendar.js
+++ b/html/include/calendar.js
function populate(objForm,resultForm) {
- yearSel=objForm.year.options[objForm.year.selectedIndex].text;
- monthIx=objForm.month.selectedIndex;
- nextMonthIx=0;
- if(monthIx!=11)
- nextMonthIx=monthIx+1;
-
- nextMonthSel=objForm.month.options[nextMonthIx].value;
- monthSel=objForm.month.options[monthIx].value;
-
- daySel=1;
- if(objForm.day.selectedIndex!=-1)
- daySel=objForm.day.options[objForm.day.selectedIndex].value;
-
- timeOfDayOne = new Date(yearSel, nextMonthSel, 1);
- timeDifference = timeOfDayOne - 86400000;
- timeOfLastDay = new Date(timeDifference);
-
- var daysInMonth = timeOfLastDay.getDate();
-
- if(daySel>daysInMonth) daySel=daysInMonth;
-
- selectedDate= new Date(yearSel,monthSel,daySel);
- for (var i = 0; i < objForm.day.length; i++) {
- objForm.day.options[0] = null;
- }
- for (var i = 0; i < daysInMonth; i++) {
- objForm.day.options[i] = new Option(i+1);
+ if(objForm.year) {
+ yearSel=objForm.year.options[objForm.year.selectedIndex].text;
+
+ monthIx=objForm.month.selectedIndex;
+ nextMonthIx=0;
+ if(monthIx!=11)
+ nextMonthIx=monthIx+1;
+
+ nextMonthSel=objForm.month.options[nextMonthIx].value;
+ monthSel=objForm.month.options[monthIx].value;
+
+ daySel=1;
+ if(objForm.day.selectedIndex!=-1)
+ daySel=objForm.day.options[objForm.day.selectedIndex].value;
+
+ timeOfDayOne = new Date(yearSel, nextMonthSel, 1);
+ timeDifference = timeOfDayOne - 86400000;
+ timeOfLastDay = new Date(timeDifference);
+
+ var daysInMonth = timeOfLastDay.getDate();
+
+ if(daySel>daysInMonth) daySel=daysInMonth;
+
+ selectedDate= new Date(yearSel,monthSel,daySel);
+ for (var i = 0; i < objForm.day.length; i++) {
+ objForm.day.options[0] = null;
+ }
+ for (var i = 0; i < daysInMonth; i++) {
+ objForm.day.options[i] = new Option(i+1);
+ }
+ objForm.day.selectedIndex=daySel-1;
+ saveResult(selectedDate,resultForm);
}
- objForm.day.selectedIndex=daySel-1;
- saveResult(selectedDate,resultForm);
}
function createResult(objForm,resultForm){
index fde78d2529b6a5d736eac8aa8b81d2f0ab5077e2..69ffecd4d15f0d6122a9218a3c03a04e0fcfbc50 100644 (file)
<script language="JavaScript" type="text/javascript">
<!-- // First input field on page
document.mainform.sn.focus();
- if (yearSel != "") populate(document.mainform,document.mainform.dob);
+ if (document.mainform.yearSel != "")
+ populate(document.mainform,document.mainform.dob);
-->
</script>
diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc
index 55e8e9626d53cf76f2b7670ba8301cfe040abf11..f4755d3dadf7f434e0bda29be707d8b1e09c459a 100644 (file)
/* Checkboxes */
if ($this->force_ids == 1){
$smarty->assign("force_ids", "checked");
+ if ($_SESSION['js']){
+ $smarty->assign("forceMode", "");
+ }
} else {
- if ($_SESSION["js"]){
+ if ($_SESSION['js']){
$smarty->assign("forceMode", "disabled");
}
$smarty->assign("force_ids", "");
$message[]= _("Value specified as 'GID' is too small.");
}
}
-
}
/* Check shadow settings, well I like spaghetties... */