Changeset 693 for trunk/phpbms/modules/base/reports_addedit.php
- Timestamp:
- 12/31/09 13:36:45 (2 years ago)
- Files:
-
- 1 modified
-
trunk/phpbms/modules/base/reports_addedit.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/base/reports_addedit.php
r574 r693 46 46 $therecord = $thetable->processAddEditPage(); 47 47 48 if($therecord["id"]){ 49 50 $reportSettings = new reportSettings($db, $therecord["uuid"]); 51 $reportSettings->get(); 52 53 }//endif 54 48 55 if(isset($therecord["phpbmsStatus"])) 49 56 $statusmessage = $therecord["phpbmsStatus"]; … … 51 58 $pageTitle="Report"; 52 59 53 $phpbms->cssIncludes[] = "pages/reports.css"; 60 $phpbms->cssIncludes[] = "pages/base/reports.css"; 61 $phpbms->jsIncludes[] = "modules/base/javascript/reports.js"; 54 62 55 63 //Form Elements 56 64 //============================================================== 57 $theform = new phpbmsForm(); 65 $theform = new phpbmsForm(NULL, "post", "record", NULL); 66 $theform->id = "record"; 58 67 59 68 $theinput = new inputField("name",$therecord["name"],NULL,true,NULL,32,64); … … 70 79 $theform->addField($theinput); 71 80 72 $theinput = new inputField("reportfile",$therecord["reportfile"],"report file",true,NULL,64,128); 73 $theform->addField($theinput); 81 if($therecord["id"]){ 82 83 $theinput = new inputField("reportfile",$therecord["reportfile"],"report file",true,NULL,64,128); 84 $theinput->setAttribute("readonly","readonly"); 85 $theinput->setAttribute("class","uneditable"); 86 87 $theform->addField($theinput); 88 89 }//endif 90 91 $theinput = new inputTextarea("description", $therecord["description"], NULL, false, 3, 48); 92 $theform->addField($theinput); 74 93 75 94 $thetable->getCustomFieldInfo(); … … 82 101 83 102 ?><div class="bodyline"> 84 <?php $theform->startForm($pageTitle)?> 85 103 <?php $theform->startForm($pageTitle) ?> 86 104 <fieldset id="fsAttributes"> 87 105 <legend>Attributes</legend> 106 107 <p><?php $theform->showField("type")?></p> 88 108 89 109 <p> 90 110 <label for="tabledefid">report table</label><br /> 91 111 <?php $thetable->displayTables("tabledefid",$therecord["tabledefid"]);?><br /> 92 <span class="notes">Note: Use the global option to associate the report with every table in the system.</span>93 112 </p> 94 113 95 114 <p> 96 115 <?php $theform->showField("displayorder"); ?><br /> 97 <span class="notes">Lower numbers are displayed first. Reports with the same order are grouped together.</span>98 116 </p> 99 117 … … 108 126 <p class="big"><?php $theform->showField("name"); ?></p> 109 127 110 <p><?php $theform->showField("type")?></p>111 112 <p><?php $theform->showField("reportfile")?></p>113 128 114 129 <p> 115 <label for="description">description</label><br /> 116 <textarea id="description" name="description" cols="61" rows="5" tabindex="35"><?php echo htmlQuotes($therecord["description"])?></textarea> 117 </p> 130 <?php 131 if($therecord["id"]) 132 $theform->showField("reportfile"); 133 else 134 $thetable->displayRerportFiles(); 135 ?> 136 </p> 137 138 <p class="big"><?php $theform->showField("description"); ?></p> 139 118 140 </fieldset> 141 142 <fieldset> 143 <legend>settings</legend> 144 <?php if(!$therecord["id"]) { 145 ?><p class="notes">Report settings are available after initial record creation.</p><?php 146 } else { 147 ?> 148 149 150 <textarea class="hiddenTextAreas" id="rsUpdates" name="rsUpdates" rows="1" cols="5"></textarea> 151 <textarea class="hiddenTextAreas" id="rsDelList" name="rsDelList" rows="1" cols="5"></textarea> 152 <textarea class="hiddenTextAreas" id="rsAdds" name="rsAdds" rows="1" cols="5"></textarea> 153 <table class="querytable simple" id="settingsTable" cellspacing="0" cellpadding="0" border="0" summary="report settings"> 154 <thead> 155 <tr> 156 <th align="right">name</th> 157 <th>value</th> 158 <th>type</th> 159 <th width="100%">description</th> 160 <th> </th> 161 </tr> 162 </thead> 163 <tbody id="rsTbody"> 164 <tr id="addNewRow"> 165 <td> 166 <input type="text" id="rsAddName"/> 167 </td> 168 <td> 169 <input type="text" id="rsAddValue" size="32"/> 170 </td> 171 <td>string</td> 172 <td>user added setting</td> 173 <td> 174 <button title="Add Setting" class="graphicButtons buttonPlus" id="rsButtonAdd" type="button"><span>+</span></button> 175 </td> 176 </tr> 177 <?php 178 $reportSettings->display(); 179 ?> 180 <tr class="queryfooter" id="rsFooterTr"> 181 <td colspan="5"> </td> 182 </tr> 183 </tbody> 184 </table> 185 <?php 186 }//endif 187 ?> 188 </fieldset> 119 189 120 190 <?php $theform->showCustomFields($db, $thetable->customFieldsQueryResult) ?> … … 124 194 <?php 125 195 $theform->showGeneralInfo($phpbms,$therecord); 126 $theform->endForm();196 $theform->endForm(); 127 197 ?> 128 198 </div>