Changeset 1131
- Timestamp:
- Sep 3, 2008 9:14:51 AM (5 years ago)
- File:
-
- 1 edited
-
trunk/jpdd/class.jpdd.organization.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jpdd/class.jpdd.organization.php
r619 r1131 201 201 $ret .= '<table class="liaisonui"><tbody><tr><td>'; 202 202 203 $dropdown = '<select name="newassign">'."\n<option>choose a subject</option>\n"; 203 // hide the dropdown initially. 204 $dropdown = '<div id="newassign" style="display: none; padding-left: 1em;"><select name="newassign">'."\n<option>choose a workshop subject</option>\n"; 204 205 reset($requirements); 205 206 while(list(,$req) = each($requirements)) { … … 230 231 } 231 232 232 $dropdown .= '</select> ';233 $dropdown .= '</select></div>'; 233 234 234 235 $ret .= '</td><td>'; … … 245 246 // allow liaisons to create new people: 246 247 $ret .= '<fieldset><legend>Add a new teacher</legend> 247 '.$dropdown.'<br/>248 248 <label>First name:<br/><input type="text" name="first_name" value=""/></label><br/> 249 249 <label>Last name:<br/><input type="text" name="last_name" value=""/></label><br/> 250 250 <label>E-mail Address:<br/><input type="text" name="email" value=""/></label><br/> 251 <label>Attending this workshop?<input type="checkbox" name="isattending" onchange="if (this.checked) { $(\'#newassign\').show() } else {$(\'#newassign\').hide();};" value="yes" /></label><br/> 252 '.$dropdown.'<br/> 251 253 </fieldset>'; 252 254 … … 310 312 $newp->addM2MPeers('organization', 'affiliation', array($this->getID())); 311 313 312 if ($jpdd->arrayKeyIsNotEmpty('newassign', $_POST) && in_array((int)$_POST['newassign'], $acceptedcategories)) { 314 if ($jpdd->arrayKeyIsNotEmpty('isattending', $_POST) && ($_POST['newassign'] == 'yes') && 315 $jpdd->arrayKeyIsNotEmpty('newassign', $_POST) && in_array((int)$_POST['newassign'], $acceptedcategories)) { 313 316 // FIXME: if the org already has enough for this category, put this user into "alternate"? 314 317 $jpdd->executeSQL('INSERT INTO application (event_id, person_id, category_id) VALUES ('.(int)$jpdd->getActiveEventID().', '.
Note: See TracChangeset
for help on using the changeset viewer.

