Changeset 235
- Timestamp:
- 01/13/12 18:11:16 (13 years ago)
- Location:
- Dev/branches/jos-branch
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/jos-branch/classes/widgets/SurveyEditorWidget.php
r233 r235 57 57 " /> 58 58 </div> 59 <input type="button" id="vertControls_Add" class="bigButton vertical" value="+" onClick=" addQuestion_Click();" />59 <input type="button" id="vertControls_Add" class="bigButton vertical" value="+" onClick="questionEditor.createNewQuestion()" /> 60 60 </div> 61 61 <div id="surveyEditorControls" class="controls"> … … 93 93 <script type="text/javascript" src="js/generalscripts.js"></script> 94 94 <script type="text/javascript" src="js/jquery.js"></script> 95 <script type="text/javascript" src="js/questionEditorScripts.js"></script> 95 96 <script type="text/javascript"> 96 97 $(document).ready(function() { -
Dev/branches/jos-branch/css/visualeditors.css
r233 r235 489 489 } 490 490 491 /****************************/ 492 /* QUESTION EDITOR SPECIFIC */ 493 /****************************/ 494 495 .smallFrame.questionEditor { 496 /* Nothing yet... */ 497 } 498 499 .qeBodyTextField { 500 width: 600px; 501 height: 100px; 502 } 503 504 #qeQuestionParamsDiv label { 505 float: left; 506 width: 150px; 507 margin: 5px 5px; 508 } 509 510 #qeQuestionParamsDiv .qeParamField { 511 float: left; 512 } 513 514 #qeQuestionParamsDiv .l { 515 clear: left; 516 } 517 518 491 519 /**************************/ 492 /* SurveyEditor Specific */520 /* Cartis Editor Specific */ 493 521 /**************************/ 494 522 -
Dev/branches/jos-branch/index.php
r233 r235 6 6 * 7 7 */ 8 9 10 if (isset($_SESSION['userUid'])) {11 redirect("logout.php");12 }13 8 14 9 $errorMessage[] = ""; … … 20 15 if (strlen($_POST['password']) > 6) { 21 16 $user = new User(null, $_POST['username'], $_POST['password']); 22 17 $user->save(); 23 18 $_SESSION['userUid'] = $user->uid; 24 19 } else { … … 37 32 if (isset($user_results[0])) { 38 33 if ($user_results[0]->password == $_POST['password']) { 34 39 35 $_SESSION['userUid'] = $user_results[0]->uid; 36 var_dump($user_results[0]); 40 37 } else { 41 38 $errorMessage[] = "Incorrect password!"; … … 47 44 48 45 if (isset($_SESSION['userUid'])) { // User just registered a new account 49 redirect(' selectSession.php');46 redirect('mainmenu.php'); 50 47 } 51 48 ?> … … 56 53 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 57 54 <title>Facilitator</title> 58 <?php new StyleSheet(" awesome"); ?>55 <?php new StyleSheet("visualeditors"); ?> 59 56 <script type="text/javascript" src="js/menu.js"></script> 60 57 <script type="text/javascript"> … … 72 69 73 70 <div id="content"> 74 <div class="menu"> 75 <form action="index.php" method="POST"> 76 <h3>Username</h3> 77 <input type="text" name="username"><br /> 78 <h3>Password</h3> 79 <input type="password" name="password"><br/><br /> 80 <div id="errorDisplay"> 81 <?php 82 foreach ($errorMessage as $message) { 83 echo "<h3 style='color: #FF0000;'>$message</h3>"; 84 } 85 ?> 86 </div> 87 <br/> 88 <input type="submit" name="login" class="surveyButton bigSurveyButton" value="Log in"> 89 </form> 90 <form action="register.php" method="POST"> 91 <input type="submit" name="register" class="surveyButton bigSurveyButton" value="Register"> 92 </form> 71 <div class="largeFrame"> 72 <div class="largeTitle">Log in</div> 73 <div class="content"> 74 <form action="index.php" method="POST"> 75 <h3>Username</h3> 76 <input type="text" name="username"><br /> 77 <h3>Password</h3> 78 <input type="password" name="password"><br/><br /> 79 <div id="errorDisplay"> 80 <?php 81 foreach ($errorMessage as $message) { 82 echo "<h3 style='color: #FF0000;'>$message</h3>"; 83 } 84 ?> 85 </div> 86 <br/> 87 <input type="submit" name="login" class="bigButton vertical" value="Log in"> 88 </form> 89 <form action="register.php" method="POST"> 90 <input type="submit" name="register" class="bigButton vertical" value="Register" style="margin-bottom: 0.25em;"> 91 </form> 92 </div> 93 93 94 </div> 94 95 </div> -
Dev/branches/jos-branch/js/questionEditorScripts.js
r233 r235 1 // Old, should not be used anymore after class-based QuestionEditor() is finished!!!!! 1 2 var qUID, parentObjectUID, qName, qTag, qType, qAnswerLength; 3 4 var questionEditor = new QuestionEditor(); 2 5 3 6 function selectAnswerType(){ … … 42 45 } 43 46 44 function createNewInputLabel(text, target ) {47 function createNewInputLabel(text, target, side) { 45 48 var newLabel = document.createElement("label"); 46 49 if (target) newLabel.setAttribute("for",target); 47 50 newLabel.innerHTML = text; 51 if (side) newLabel.className = side; 48 52 return newLabel; 49 53 } … … 64 68 } 65 69 66 67 ///////////////////68 /* INT SELECTION */69 ///////////////////70 71 function selectIntType() {72 var selectBox = document.getElementById("questionType");73 var content = document.getElementById("questionEditor_questionParams");74 // Add minimum value input75 var minValueBox = createNewElement("input","text","minValueBox", "questionParamField", null);76 var minValueBoxLabel = createNewInputLabel("Minimum value:", "minValueBox");77 addClass(minValueBoxLabel, "formLineBreak");78 content.appendChild(minValueBoxLabel);79 content.appendChild(minValueBox);80 // Add maximum value input81 var maxValueBox = createNewElement("input", "text", "maxValueBox", "questionParamField", null);82 var maxValueBoxLabel = createNewInputLabel("Maximum value:","maxValueBox");83 addClass(maxValueBoxLabel, "formLineBreak");84 content.appendChild(maxValueBoxLabel);85 content.appendChild(maxValueBox);86 }87 70 88 71 ///////////////////// … … 171 154 } 172 155 156 ////////////////////////////////////////// 157 /* QUESTION EDITOR CLASS BASED APPROACH */ 158 ////////////////////////////////////////// 159 173 160 function QuestionEditor() { 174 161 // Properties 175 this.uid = null; 176 this.element = null; 177 this.paramsElement = null; 178 162 this.uid = null; // The uid of the question contained in this editor 163 var me = this; // Retarded self-reference because: Javascript 164 this.element = null; // The parent div element containing the questionEditor 165 this.paramsElement = null; // The parent parameters element where all the input sets will be located 166 this.paramSets = null; // The currently enabled input sets to be displayed in the paramsElement 167 168 // Methods 179 169 // Basic functionality 180 170 this.setValues = function(arguments) { 181 // Query question information from database, then fill element fields with correct information. 182 171 var question = JSON.parse(arguments); 183 172 } 184 173 this.init = function() { 185 174 // Outer div 186 this.element = ce("div");187 this.element.className = "smallFrame questionEditor";188 this.element.id = sequencer.state.selectedObject.uid;189 this.uid = sequencer.state.selectedObject.uid;175 me.element = ce("div"); 176 me.element.className = "smallFrame questionEditor"; 177 me.element.id = sequencer.state.selectedObject.uid; 178 me.uid = sequencer.state.selectedObject.uid; 190 179 // Header 191 180 var titleDiv = ce("div"); … … 193 182 var numberDiv = ce("div"); 194 183 numberDiv.className = "listNumber"; 195 numberDiv.innerHTML = "4"; 184 numberDiv.innerHTML = "4"; //TODO 196 185 var nameSpan = ce("span"); 197 nameSpan.id = "q TitleField";186 nameSpan.id = "qeTitleField"; 198 187 nameSpan.innerHTML = "New question"; 199 188 titleDiv.appendChild(numberDiv); 200 189 titleDiv.innerHTML += "Editing: "; 201 190 titleDiv.appendChild(nameSpan); 202 this.element.appendChild(titleDiv);191 me.element.appendChild(titleDiv); 203 192 204 193 //Content area 205 194 var contentDiv = ce("div"); 206 195 contentDiv.className = "content"; 207 var bodyText = createNewElement("textarea", null, "q BodyTextField", "qBodyTextField", null);196 var bodyText = createNewElement("textarea", null, "qeBodyTextField", "qeBodyTextField", null); 208 197 bodyText.value = "Question body text goes here"; 209 210 198 contentDiv.appendChild(bodyText); 199 211 200 // The dynamic questionParams div, where all the control elements and inputs will be located 212 201 var questionParams = ce("div"); 213 this.paramsElement = questionParams;202 me.paramsElement = questionParams; 214 203 questionParams.className = "questionParams"; 215 contentDiv.appendChild(bodyText); 216 var qIdentField = createNewElement("input", "text", "qIdentField", "questionParamField", null); 217 var qIdentField_lbl = createNewInputLabel("Question code:","qIdentField", "l"); 218 questionParams.appendChild(qIdentField_lbl); 219 questionParams.appendChild(qIdentField); 220 221 var qTypeField = createNewElement("select", null, "qTypeField", "questionParamField", null); 222 var qTypeField_lbl = createNewInputLabel("Answer type:","qTypeField", "l"); 223 questionParams.appendChild(qTypeField_lbl); 224 questionParams.appendChild(qTypeField); 225 qTypeField.addEventListener("change", function(){ 226 debugger; 227 selectAnswerType(); 204 questionParams.id = "qeQuestionParamsDiv"; 205 206 var basicContainer = ce("div"); 207 basicContainer.className = "basicInputs"; 208 209 var qeCodeField = createNewElement("input", "text", "qeCodeField", "qeParamField", null); 210 var qeCodeField_lbl = createNewInputLabel("Question code:","qeCodeField", "l"); 211 basicContainer.appendChild(qeCodeField_lbl); 212 basicContainer.appendChild(qeCodeField); 213 214 var qeTypeField = createNewElement("select", null, "qeTypeField", "qeParamField", null); 215 var qeTypeField_lbl = createNewInputLabel("Answer type:","qeTypeField", "l"); 216 basicContainer.appendChild(qeTypeField_lbl); 217 basicContainer.appendChild(qeTypeField); 218 questionParams.appendChild(basicContainer); 219 qeTypeField.addEventListener("change", function(){ 220 //debugger; 221 me.selectAnswerType(); 228 222 }, false); 229 223 // Add the select options. Do this in a block scope to prevent the o1 var from messing things up. … … 233 227 o1.value = null; 234 228 o1.text = ""; 235 q TypeField.appendChild(o1);229 qeTypeField.appendChild(o1); 236 230 237 231 o1 = ce("option"); 238 232 o1.value = "int"; 239 233 o1.text = "Integer"; 240 q TypeField.appendChild(o1);234 qeTypeField.appendChild(o1); 241 235 242 236 o1 = ce("option"); 243 237 o1.value = "scale"; 244 238 o1.text = "Scale"; 245 q TypeField.appendChild(o1);239 qeTypeField.appendChild(o1); 246 240 247 241 o1 = ce("option"); 248 242 o1.value = "choice"; 249 243 o1.text = "Multiple choice"; 250 q TypeField.appendChild(o1);244 qeTypeField.appendChild(o1); 251 245 252 246 o1 = ce("option"); 253 247 o1.value = "text"; 254 248 o1.text = "Text"; 255 q TypeField.appendChild(o1);249 qeTypeField.appendChild(o1); 256 250 } 257 251 258 252 contentDiv.appendChild(questionParams); 259 this.element.appendChild(contentDiv);253 me.element.appendChild(contentDiv); 260 254 261 255 // Controls bar … … 267 261 controlsDiv.appendChild(btnSave); 268 262 btnSave.addEventListener("click", function(){ 269 swapQuestionState(true);263 me.save(); 270 264 }, false); 271 265 btnDiscard.addEventListener("click", function(){ 272 swapQuestionState(false);266 me.discard(); 273 267 }, false); 274 this.element.appendChild(controlsDiv); 268 me.element.appendChild(controlsDiv); 269 me.paramSets = new Array(); 270 me.paramSets.push("basic"); 271 } 272 this.save = function() { 275 273 var request = { 276 "uid": this.uid, 277 "type": "Question" 278 } 279 var requestString = "args="+JSON.stringify(request); 280 newAjaxRequest(requestString, "returnObjectDisplay.php", function(result){ 281 // Fill in the element with the correct values 282 // Result is sent to setValues in object form already, perhaps better idea to send in string format and parse within the target method? 283 this.setValues(JSON.parse(result.responseText)); 284 }, true); 285 } 286 this.submit = function() { 287 var request = { 288 "title": ge("qTitleField").value, 289 "type": ge("qTypeField").value 274 "title": ge("qeTitleField").value, 275 "type": ge("qeTypeField").value 290 276 } 291 277 … … 294 280 }, true); 295 281 } 282 this.reset = function() { 283 me.init(); 284 } 296 285 297 286 // Updating input fields 298 this.selectAnswer type = function () {287 this.selectAnswerType = function () { 299 288 // Switch statement, call this.type_x where x is the relevant answer type. 300 289 // For all this.type_X funtions: … … 304 293 // Important: use the this.paramsElement to access the questionParams div! 305 294 // To fully make use of this class-based approach, the editor should be added to a global variable. This global variable should be removed on page unload! 295 296 var type = ge("qeTypeField").value; 297 switch (type) { 298 case "int": 299 me.type_Integer(); 300 break; 301 case "scale": 302 me.type_Scale(); 303 break; 304 case "choice": 305 me.type_Choice(); 306 break; 307 case "text": 308 me.type_Text(); 309 break; 310 default: 311 //Do nothing 312 break; 313 314 } 315 316 } 317 this.checkInputSets = function () { 318 // Loop through all input containers in the paramsField 319 for (var n = 0; n < me.paramsElement.childNodes.length; n++) { 320 if (me.paramsElement.childNodes[n].className == "basicInputs") continue; 321 // Check if the class (inputSet) is currently in paramSets 322 if (me.paramSets.indexOf(me.paramsElement.childNodes[n].className) < 0) { 323 me.paramsElement.childNodes[n].parentNode.removeChild(me.paramsElement.childNodes[n]); 324 n--; 325 } 326 327 } 328 } 329 330 this.type_Integer = function () { 331 if (me.paramSets.indexOf("int_basic") < 0) { 332 me.paramSets = new Array("int_basic"); 333 } 334 else return; 335 336 me.checkInputSets(); 337 338 var qeMinValueField = createNewElement("input", "text", "qeMinValueField", "qeParamField", null); 339 var qeMinValueField_lbl = createNewInputLabel("Minimum value: ", "qeMinValueField", "l"); 340 var qeMaxValueField = createNewElement("input", "text", "qeMaxValueField", "qeParamField", null); 341 var qeMaxValueField_lbl = createNewInputLabel("Maximum value: ", "qeMaxValueField", "l"); 342 var container = ce("div"); 343 container.className = "int_basic"; 344 container.appendChild(qeMinValueField_lbl); 345 container.appendChild(qeMinValueField); 346 container.appendChild(qeMaxValueField_lbl); 347 container.appendChild(qeMaxValueField); 348 me.paramsElement.appendChild(container); 349 306 350 } 307 351 this.type_Scale = function () { 308 309 } 310 this.type_Integer = function () { 311 352 if (me.paramSets.indexOf("scale_basic") < 0) { 353 me.paramSets = new Array("scale_basic"); 354 } 355 else return; 356 // Clear any input sets that should not be there 357 me.checkInputSets(); 358 359 var container = ce("div"); 360 container.className = "scale_basic"; 361 362 // Number of choices SELECT 363 var numChoicesField = createNewElement("select", null, "qeNumChoicesField", "qeParamField", null); 364 var numChoicesField_lbl = createNewInputLabel("Number of choices", "qeNumChoicesField", "l"); 365 // SELECT options 366 for (var n = 2; n < 11; n++) { 367 var o = ce("option"); 368 o.value = n-1; 369 o.text = n-1; 370 numChoicesField.appendChild(o); 371 } 372 container.appendChild(numChoicesField_lbl); 373 container.appendChild(numChoicesField); 374 375 // Scale labels CHECKBOX and TEXTs 376 var legendsEnabledField = createNewElement("input", "checkbox", "qeLegendsEnabledField", "qeParamField", null); 377 var legendsEnabledField_lbl = createNewInputLabel("Enable legends", "qeLegendsEnabledField", "l"); 378 container.appendChild(legendsEnabledField_lbl); 379 container.appendChild(legendsEnabledField); 380 381 var upperLegendText = createNewElement("input", "text", "qeUpperLegendField", "qeParamField", null); 382 var lowerLegendText = createNewElement("input", "text", "qeLowerLegendField", "qeParamField", null); 383 var upperLegendText_lbl = createNewInputLabel("Upper legend", "qeUpperLegendField", "l"); 384 var lowerLegendText_lbl = createNewInputLabel("Lower legend", "qeLowerLegendField", "l"); 385 container.appendChild(lowerLegendText_lbl); 386 container.appendChild(lowerLegendText); 387 container.appendChild(upperLegendText_lbl); 388 container.appendChild(upperLegendText); 389 390 me.paramsElement.appendChild(container); 312 391 } 313 392 this.type_Text = function () { … … 315 394 } 316 395 this.type_Choice = function() { 317 318 } 319 320 } 321 322 function newEditor() { 323 // Get variables, ofc not null... 324 var arguments = null; 325 var editor = new QuestionEditor(arguments); 326 editor.setValues(arguments); 327 ge("seqContentWrapper").appendChild(editor.element); 328 // Etc. We can put the switchModes() command in here as well, I'd say... 329 // Or should that be in the QuestionEditor class? That's probably better, since it has direct access to all the internal variables. 330 } 331 332 function startEditingQuestion(uid) { 333 if (sequencer.state.editing == true) return; 334 335 var element = ge(uid); 336 var editor = new QuestionEditor(); 337 var newElement = editor.createElement(); 338 // Query parameters 339 editor.setValues(parameters); 340 element.parentNode.replaceChild(newElement, element); 341 sequencer.state.editing = true; 342 } 396 debugger; 397 if (me.paramSets.indexOf("choice_basic")) { 398 me.paramSets = new Array("choice_basic"); 399 } 400 else return; 401 402 me.checkInputSets(); 403 404 var container = ce("div"); 405 container.className = "choice_basic"; 406 // num options SELECT 407 var numOptionsSelect = createNewElement("select", null, "qeNumOptionsField", "qeParamField", null); 408 var numOptionsSelect_lbl = createNewInputLabel("Number of options", "qeNumOptionsField", "l"); 409 for (var n = 2; n < 11; n++) { 410 var o = ce("option"); 411 o.value = n-1; 412 o.text = n-1; 413 numOptionsSelect.appendChild(o); 414 } 415 container.appendChild(numOptionsSelect_lbl); 416 container.appendChild(numOptionsSelect); 417 418 me.paramsElement.appendChild(container); 419 } 420 421 // Editing 422 this.editQuestion = function(uid) { 423 if (sequencer.state.editing == true) return; 424 if (sequencer.state.loaded == false) return; 425 sequencer.state.editing = true; 426 427 var request = { 428 "type": "Question", 429 "uid": uid 430 } 431 432 var requestString = "args="+JSON.stringify(request); 433 sequencer.state.loaded = false; 434 newAjaxRequest(requestString, getObject.php, function(result){ 435 // Once results are in 436 questionEditor.setValues(result.responseText); 437 sequencer.state.loaded = true; 438 }, true); 439 } 440 this.createNewQuestion = function() { 441 if (sequencer.state.editing == true) return; 442 if (sequencer.state.loading == true) return; 443 sequencer.state.editing = true; 444 445 me.reset(); 446 var container = ge("seqContentWrapper"); 447 container.appendChild(me.element); 448 } 449 } -
Dev/branches/jos-branch/mainmenu.php
r116 r235 1 1 <?php 2 require 'classes/master.php'; //should be at top of every page 3 4 if (isset($_POST['login'])) { 5 if ($_POST['username'] == '') 6 die("Please log in!"); 7 else { 8 $userDBI = new UserDatabaseInterface(); 9 $user_exists = $userDBI->checkUserName($_POST['username']); 10 if ($user_exists) { 11 $correct_password = $userDBI->checkUserPassword($_POST); 12 /* session remembers login */ 13 if (!$correct_password) 14 die("The password you entered is not correct!"); 15 else 16 $_SESSION['username'] = $_POST['username']; 17 } 18 else 19 die("Unknown user name"); 20 } 21 } 22 else if (is_null($_SESSION['username'])) 23 redirect('index.php'); 24 25 $surveys = Loader::loadSurveys(); 26 $applications = Loader::loadApplications(); 2 require 'classes/master.php'; //should be at top of every page 27 3 ?> 28 4 … … 32 8 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 33 9 <title>Facilitator</title> 34 <?php new StyleSheet( ); ?>35 <script type="text/javascript" src="js/ menu.js"></script>10 <?php new StyleSheet("visualeditors"); ?> 11 <script type="text/javascript" src="js/generalScripts.js"></script> 36 12 </head> 37 13 <body> … … 41 17 42 18 <div id="wrapper"> 19 <div id="content"> 20 <div class="largeFrame side" id="adminPanel"> 21 <div class="largeTitle">Administrator</div> 22 <div class="innerLargeFrame"> 23 <p>Use the below buttons to access, edit and create new sessions and content.</p><br /> 24 <input type="button" class="bigButton vertical" value="Browse Sessions" id="btnEditSessions" onClick="window.location='selectSession.php'" /><br /> 25 <input type="button" class="bigButton vertical" value="Browse Surveys" id="btnEditSessions" onClick="window.location='selectSurvey.php'" /><br /> 26 <input type="button" class="bigButton vertical" value="Browse Questions" id="btnEditSessions" onClick="window.location='selectQuestion.php'" /><br /> 27 <input type="button" class="bigButton vertical" value="Browse Applications" id="btnEditSessions" onClick="window.location='selectApplication.php'" /><br /> 43 28 44 <div id="content"> 45 46 <?php new SessionMenu(); ?> 47 48 <?php new ApplicationMenu($applications); ?> 49 50 <?php new SurveyMenu($surveys); ?> 51 52 <?php new QuestionMenu(); ?> 53 29 </div> 30 <div class="controls"></div> 31 </div> 32 <div class="largeFrame side" id="facilitatorPanel"> 33 <div class="largeTitle">Facilitator</div> 34 <div class="innerLargeFrame"> 35 <p>Use the Start button below to start hosting a session.</p> 36 <input type="button" class="bigButton vertical" value="Start" id="btnFacStart" onClick="window.location='facpanel.php'" style="margin-top: 0.25em;"/> 37 </div> 38 <div class="controls"></div> 39 </div> 54 40 </div> 55 41 </div> -
Dev/branches/jos-branch/selectSession.php
r230 r235 63 63 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 64 64 <title>Select a session</title> 65 <?php new StyleSheet(" awesome"); ?>65 <?php new StyleSheet("visualeditors"); ?> 66 66 <script type="text/javascript" src="js/sequencerScripts.js"></script> 67 67 <script type="text/javascript" src="js/generalScripts.js"></script> … … 74 74 <div id="wrapper"> 75 75 <div id="content"> 76 <form action="selectSession.php" method="POST"> 77 <fieldset name="selectionMenu"> 78 <!-- onchange van volgende select linkt deze aan de ajax-based info panel, script staat in sequencerScripts.js --> 79 <select name="sessionUid" style="float: left;" onChange="ajaxInfoRequest(this.value, document.getElementById('infoPanelContent'), 'Session');"> 80 <option value="" disabled="true" selected>Please select a session</option> 81 <?php 82 foreach ($sessions as $session) { 83 $selected = ""; 84 if ($session->title == $_POST['newSessionName']) { 85 $selected = ' selected="true"'; 86 } 76 <div class="largeFrame" id="sessionSelector" style="width: 400px;"> 77 <div class="largeTitle">Select session</div> 78 <div class="content"> 79 <form action="selectSession.php" method="POST"> 80 <div style="float: left; clear: left;"> 81 <select name="sessionUid" style="float: left;" onChange="ajaxInfoRequest(this.value, document.getElementById('infoPanelContent'), 'Session');"> 82 <option value="" disabled="true" selected>Please select a session</option> 83 <?php 84 foreach ($sessions as $session) { 85 $selected = ""; 86 if ($session->title == $_POST['newSessionName']) { 87 $selected = ' selected="true"'; 88 } 87 89 88 echo '<option value="' . $session->uid . '"' . $selected . '>' . $session->title . '</option>' . "\n"; 89 } 90 ?> 91 </select> 92 <br /><br /> 93 <input type="hidden" name="updateNeeded" value="true" /> 94 <input type="text" name="newSessionName" value="Name..." style="float: left;" /><br /> 95 <input type="submit" name="createSession" value="Create new session" class="surveybutton" style="float: left;" /> 96 <input type="submit" name="editSession" value="Edit session" class="surveybutton" style="float: left;" /> 97 <input type="submit" name="deleteSession" value="Delete session" class="surveybutton" style="float: left;" /> 98 <br /><br /><br /> 99 <div id="errorDisplay"><?php 100 if (isset($errorMessage)) { 101 foreach ($errorMessage as $message) { 102 echo $message; 103 } 104 } 105 ?></div> 106 </fieldset> 107 <fieldset id="sessionDescription"> 108 <div class="fieldsetTitle"> 109 Info 110 </div> 111 <div id="infoPanelContent"> 112 </div> 113 </fieldset> 90 echo '<option value="' . $session->uid . '"' . $selected . '>' . $session->title . '</option>' . "\n"; 91 } 92 ?> 93 </select> 94 <input type="hidden" name="updateNeeded" value="true" /> 95 <input type="text" name="newSessionName" value="Name..." style="float: left; clear: left;" /><br /> 96 </div> 97 <div style="float: left; clear: none;"> 98 <input type="submit" name="createSession" value="Create new session" class="smallButton vertical" style="float: left;" /> 99 <input type="submit" name="editSession" value="Edit session" class="smallButton vertical" style="float: left;" /> 100 <input type="submit" name="deleteSession" value="Delete session" class="smallButton vertical" style="float: left;" /> 101 </div> 102 <div id="errorDisplay"><?php 103 if (isset($errorMessage)) { 104 foreach ($errorMessage as $message) { 105 echo $message; 106 } 107 } 108 ?> 109 </div> 110 </div> 111 </div> 112 113 <div id="sessionInfoPanel" class="largeFrame" style="margin-top: 10px; width: 400px; height: 100px;"> 114 <div class="largeTitle">Info</div> 115 <div id="infoPanelContent" class="content" style="float: left; clear: left;"> 116 </div> 117 </div> 114 118 </form> 115 119 </div> 116 120 </div> 117 </body> 121 </div> 122 </div> 123 </body> 118 124 </html> -
Dev/branches/jos-branch/surveyEditor.php
r208 r235 21 21 </head> 22 22 <body> 23 <div id="header"> 24 <?php new Logo(); ?> 25 </div> 23 26 <div id="wrapper"> 24 27 <div id="content">
Note: See TracChangeset
for help on using the changeset viewer.