summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 690686b)
raw | patch | inline | side by side (parent: 690686b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 Sep 2005 06:31:41 +0000 (06:31 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 15 Sep 2005 06:31:41 +0000 (06:31 +0000) |
Fixed date of birth to allow a value below 1971
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1363 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1363 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/generic/class_user.inc | patch | blob | history | |
plugins/personal/generic/main.inc | patch | blob | history |
index 254b506010514e744515471695ff96501b977e6c..9f216a9575fa82dec047d274cdf18a5de813796d 100644 (file)
if (isset ($this->attrs['dateOfBirth'])){
/* This entry is ISO 8601 conform */
list($year, $month, $day)= split("-", $this->attrs['dateOfBirth'][0], 3);
- $this->dob= mktime ( 0, 0, 0, $month, $day, $year);
+
+ $this->dob=array( 'mon'=> $month,"mday"=> $day,"year"=> $year);
$this->use_dob= "1";
} else {
$this->use_dob= "0";
if ($this->dob == "0"){
$date= getdate();
} else {
- $date= getdate($this->dob);
+ if(is_array($this->dob)){
+ $date = $this->dob;
+ }else{
+ $date = getdate($this->dob);
+ }
}
$days= array();
$days[$d]= $d;
}
$years= array();
- for($y= $date['year']-100; $y<=$date['year']+100; $y++){
+
+ if(($date['year']-100)<1901){
+ $start = 1901;
+ }else{
+ $start = $date['year']-100;
+ }
+
+ $end = $start +100;
+
+ for($y= $start; $y<=$end; $y++){
$years[]= $y;
}
$years['-']= "- ";
index f3826f4d3ca59d89d8e51469e05297453573c272..037274a9ce35a194f03d346511085dae2b504379 100644 (file)
$display.= "<input type=submit name=\"edit_finish\" value=\""._("Finish")."\">\n";
$display.= " ";
$display.= "<input type=submit name=\"edit_cancel\" value=\""._("Cancel")."\">\n";
+ $display.="<script language='javascript'>
+ $display.=" <!-- Place cursor -->
+ <script language=\"JavaScript\" type=\"text/javascript\">
+ document.mainform.edit_finish.select();
+ document.mainform.edit_finish.focus();
+ </script>";
+
$info= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/closedlock.png').
"\"> ".$ui->dn." ";
} else {