Changeset 485 for trunk/phpbms/modules/base/notes_addedit.php
- Timestamp:
- 04/07/09 11:44:18 (3 years ago)
- Files:
-
- 1 modified
-
trunk/phpbms/modules/base/notes_addedit.php (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/base/notes_addedit.php
r384 r485 1 <?php 1 <?php 2 2 /* 3 3 $Rev$ | $LastChangedBy$ … … 37 37 +-------------------------------------------------------------------------+ 38 38 */ 39 40 require_once("../../include/session.php"); 39 //var_dump($_POST); 40 //exit; 41 require_once("../../include/session.php"); 41 42 require_once("include/fields.php"); 42 43 require_once("include/tables.php"); 43 44 require_once("include/notes.php"); 44 45 45 if(isset($_GET["backurl"])){ 46 if(isset($_GET["backurl"])){ 46 47 $backurl=$_GET["backurl"]; 47 48 if(isset($_GET["refid"])) … … 49 50 } else 50 51 $backurl = NULL; 51 52 52 53 $thetable = new notes($db,12,$backurl); 53 54 $therecord = $thetable->processAddEditPage(); 54 55 55 56 if(isset($therecord["phpbmsStatus"])) 56 $statusmessage = $therecord["phpbmsStatus"]; 57 $statusmessage = $therecord["phpbmsStatus"]; 57 58 58 59 … … 69 70 $theform->onsubmit = "return submitForm(this)"; 70 71 $theform->id = "record"; 71 72 72 73 $temparray = array("Note"=>"NT","Task"=>"TS","Event"=>"EV","System Message"=>"SM"); 73 74 $theinput = new inputBasicList("thetype",$therecord["type"],$temparray,"type"); … … 75 76 $theinput->setAttribute("onchange","changeType()"); 76 77 $theform->addField($theinput); 77 78 78 79 $theinput = new inputField("subject",$therecord["subject"], "title" ,true); 79 $theform->addField($theinput); 80 $theform->addField($theinput); 80 81 81 82 $temparray = array("Highest"=>3,"High"=>2,"Medium"=>1,"Normal"=>0,"Low"=>-1,"Lowest"=>-2); 82 83 $theinput = new inputBasicList("importance",$therecord["importance"],$temparray,"importance",false); 83 84 $theform->addField($theinput); 84 85 85 86 $theinput = new inputCheckbox("private",$therecord["private"]); 86 87 $theform->addField($theinput); 87 88 88 89 $theinput = new inputDatePicker("startdate",$therecord["startdate"], "start date" ,false, 11, 15, false); 89 $theinput->setAttribute("onchange","checkEndDate();"); 90 $theinput->setAttribute("onchange","checkEndDate();"); 90 91 $theform->addField($theinput); 91 92 92 93 $theinput = new inputTimePicker("starttime",$therecord["starttime"], "start time" ,false,11, 15, false); 93 $theinput->setAttribute("onchange","checkEndDate();"); 94 $theform->addField($theinput); 95 94 $theinput->setAttribute("onchange","checkEndDate();"); 95 $theform->addField($theinput); 96 96 97 $theinput = new inputDatePicker("enddate",$therecord["enddate"], "end date" ,false, 11, 15, false); 97 98 $theform->addField($theinput); 98 99 99 100 $theinput = new inputTimePicker("endtime",$therecord["endtime"], "end time" ,false,11, 15, false); 100 $theform->addField($theinput); 101 $theform->addField($theinput); 101 102 102 103 $theinput = new inputCheckbox("completed",$therecord["completed"],"completed",false,false); … … 110 111 $theinput = new inputChoiceList($db, "status",$therecord["status"],"notestatus"); 111 112 $theform->addField($theinput); 112 113 113 114 $theinput = new inputSmartSearch($db, "assignedtoid", "Pick Active User", $therecord["assignedtoid"], "assigned to", false, 18, 255, false); 114 115 $theform->addField($theinput); 115 116 116 117 $theinput = new inputDatePicker("assignedtodate",$therecord["assignedtodate"], "follow up date"); 117 118 $theform->addField($theinput); 118 119 119 120 $theinput = new inputTimePicker("assignedtotime",$therecord["assignedtotime"], "follow up time" ,false,11, 15, false); 120 $theform->addField($theinput); 121 $theform->addField($theinput); 121 122 122 123 $theinput = new inputChoiceList($db, "category",$therecord["category"],"notecategories"); … … 129 130 else 130 131 $repeatBase = mktime(); 131 132 132 133 $theinput = new inputCheckbox("repeating",$therecord["repeating"],"repeat"); 133 134 $theinput->setAttribute("onchange","checkRepeat();"); 134 135 $theform->addField($theinput); 135 136 136 137 $temparray = array("Daily"=>"Daily", "Weekly"=>"Weekly", "Monthly"=>"Monthly", "Yearly"=>"Yearly"); 137 138 $theinput = new inputBasiclist("repeattype",$therecord["repeattype"],$temparray,"frequency"); 138 139 $theinput->setAttribute("onchange","changeRepeatType();"); 139 140 $theform->addField($theinput); 140 141 141 142 $theinput = new inputField("repeatevery",$therecord["repeatevery"],"frequency of repeating",false,"integer",2,4,false); 142 143 $theform->addField($theinput); 143 144 144 145 $theinput = new inputBasiclist("monthlyontheweek",$therecord["repeatontheweek"],$thetable->weekArray,"on the week of",false); 145 146 $theinput2 = new inputBasiclist("yearlyontheweek",$therecord["repeatontheweek"],$thetable->weekArray,"on the week of",false); … … 150 151 $weekNumber = ceil(date("d",$repeatBase)/7); 151 152 if($weekNumber > 4) $weekNumber = 5; 152 153 153 154 $theinput->value = $weekNumber; 154 155 $theinput2->value = $weekNumber; 155 156 156 157 } 157 158 $theform->addField($theinput); 158 159 $theform->addField($theinput2); 159 160 160 161 $temparray = array(); 161 162 for($i=1; $i<8; $i++) … … 186 187 $theinput = new inputField("repeattimes",$therecord["repeattimes"],"repeat until number of times",false,"integer",3,5,false); 187 188 $theform->addField($theinput); 188 189 189 190 if(!$therecord["repeatuntil"]) 190 191 $therecord["repeatuntil"] = dateToString(mktime(),"SQL"); … … 193 194 $theform->addField($theinput); 194 195 //end repeat fields 195 196 196 197 $theform->jsMerge(); 197 198 //============================================================== 198 //End Form Elements 199 199 //End Form Elements 200 200 201 include("header.php"); 201 202 202 203 ?><div class="bodyline"> 203 204 <?php $theform->startForm($pageTitle)?> … … 211 212 <input name="thebackurl" id="thebackurl" type="hidden" value="<?php if(isset($_GET["backurl"])) echo $_GET["backurl"]; ?>" /> 212 213 </p> 213 214 214 215 <p> 215 216 <?php $theform->showField("thetype")?> 216 <input type="hidden" id="typeCheck" name="typeCheck" value="<?php echo $therecord["type"]?>" /> 217 <input type="hidden" id="typeCheck" name="typeCheck" value="<?php echo $therecord["type"]?>" /> 217 218 </p> 218 219 219 220 <p><?php $theform->showField("subject") ?></p> 220 221 </fieldset> 221 222 222 223 <div id="leftSideDiv"> 223 224 <fieldset> … … 234 235 <label for="startdate" id="starttext">start</label><br /> 235 236 <input name="dostart" id="startcheck" type="checkbox" value="1" <?php if($therecord["startdate"]) echo "checked=\"checked\"" ?> onclick="dateChecked('start')" class="radiochecks" /> 236 <?php $theform->showField("startdate");?> 237 <?php $theform->showField("startdate");?> 237 238 <?php $theform->showField("starttime");?> 238 239 </p> … … 240 241 <label for="enddate" id="endtext">end</label><br /> 241 242 <input name="doend" id="endcheck" type="checkbox" value="1" <?php if($therecord["enddate"]) echo "checked=\"checked\"" ?> onclick="dateChecked('end')" class="radiochecks" /> 242 <?php $theform->showField("enddate");?> 243 <?php $theform->showField("enddate");?> 243 244 <?php $theform->showField("endtime");?> 244 245 </p> 245 246 </fieldset> 246 247 247 248 <div id="thecompleted" class="fauxP"> 248 249 <p> … … 251 252 <?php $theform->showField("completeddate")?> 252 253 </p> 253 <p id="thestatus"><?php $theform->showField("status") ?></p> 254 <p id="thestatus"><?php $theform->showField("status") ?></p> 254 255 </div> 255 256 256 257 <fieldset> 257 258 <legend><label for="ds-assignedtoid">assigned to</label></legend> … … 275 276 <p><?php $theform->showField("assignedtodate");?> <?php $theform->showField("assignedtotime")?></p> 276 277 </fieldset> 277 278 278 279 <input id="attachedtabledefid" name="attachedtabledefid" type="hidden" value="<?php echo $therecord["attachedtabledefid"]?>" /> 279 280 <fieldset id="theassociated"> … … 283 284 <input id="assocarea" type="text" readonly="readonly" class="uneditable" value="<?php echo $attachedtableinfo["displayname"];?>" /> 284 285 </p> 285 286 286 287 <p> 287 288 <label for="attachedid">record id</label><br /> … … 296 297 <input name="location" id="location" type="text" value="<?php echo $therecord["location"]?>"/> 297 298 </p> 298 299 <p><?php $theform->showField("category") ?></p> 300 </fieldset> 301 299 300 <p><?php $theform->showField("category") ?></p> 301 </fieldset> 302 302 303 </div> 303 304 … … 316 317 317 318 <div id="repeatDiv"> 318 319 319 320 <div <?php if($therecord["parentid"]) echo 'style="display:none;"'?>> 320 321 <input type="hidden" id="bypass" name="bypass" value=""/> … … 325 326 <fieldset> 326 327 <legend>repeat</legend> 327 328 328 329 <p><?php $theform->showField("repeating")?></p> 329 330 330 331 <div id="repeatOptions" <?php if(!$therecord["repeating"]) echo 'style="display:none"'?>> 331 332 332 333 <p><?php $theform->showField("repeattype")?></p> 333 334 334 335 <p>every <?php $theform->showField("repeatevery")?> <span id="repeatTypeText">day(s)</span></p> 335 336 336 337 <div id="DailyDiv"></div> 337 338 338 339 <div id="WeeklyDiv"> 339 340 <p><?php $thetable->showWeeklyOptions($therecord,$repeatBase)?></p> 340 341 </div> 341 342 342 343 <div id="MonthlyDiv"> 343 344 <p><input type="radio" id="monthlyEach" name="monthlyWhat" onchange="monthlyChange();" value="1" <?php if(!$therecord["repeatontheday"]) echo 'checked="checked"'?> /><label for="monthlyEach"> each</label></p> 344 345 345 346 <p><?php $thetable->showMonthlyOptions($therecord,$repeatBase)?></p> 346 347 347 348 <p><input type="radio" id="monthlyOnThe" name="monthlyWhat" onchange="monthlyChange();" value="2" <?php if($therecord["repeatontheday"]) echo 'checked="checked"'?> /><label for="monthlyOnThe"> on the</label></p> 348 349 <p> … … 351 352 </p> 352 353 </div> 353 354 354 355 <div id="YearlyDiv"> 355 356 <p><?php $thetable->showYearlyOptions($therecord,$repeatBase)?></p> 356 357 357 358 <p><input id="yearlyOnThe" type="checkbox" name="yearlyOnThe" onclick="yearlyOnTheChecked();" value="1" <?php if($therecord["repeattype"]=="Yearly" && $therecord["repeatontheday"]) echo 'checked="checked"'?>/><label for="yearlyOnThe"> on the</label></p> 358 359 <p> … … 360 361 <?php $theform->showField("yearlyontheday");?> 361 362 </p> 362 363 363 364 </div> 364 365 </div> 365 366 </fieldset> 366 367 367 368 <fieldset id="repeatEnding" <?php if(!$therecord["repeating"]) echo 'style="display:none"'?>> 368 369 <legend>end</legend> … … 383 384 <p>This record was created from a repeated task/event.</p> 384 385 <p>Click the <strong>Edit Repeating Options</strong> button to edit the options for the repeatable parent record.</p> 385 <p class="notes">Any unsaved changes with the current record will be lost.</p> 386 <p class="notes">Any unsaved changes with the current record will be lost.</p> 386 387 <p><input id="goparent" name="goparent" type="button" value="Edit Repeating Options..." onclick="goParent('<?php echo getAddEditFile($db,12) ?>')" class="Buttons" /></p> 387 388 </fieldset> 388 389 <?php }//endif ?> 389 390 </div> 390 <?php 391 <?php 391 392 $theform->showCreateModify($phpbms,$therecord); 392 393 $theform->endForm();