Changeset 1432


Ignore:
Timestamp:
Jan 7, 2014, 12:54:45 AM (4 years ago)
Author:
dkg
Message:

break out presenters into separate field on proposal

Location:
trunk/jpdd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/jpdd/class.jpdd.proposal.php

    r1429 r1432  
    6161<label>Title<br/><input type="text" size="72" name="title" onchange="DKG.hideOnLength(this.value, '.(int)$this->_short_title_length.',\'short_title_label\');" value="'.$this->getTitle(true).'"/></label><br/>
    6262<label id="short_title_label">Short Title <span class="notes">(needed for printing when title is too long)</span><br/><input type="text" maxlength="'.(int)$this->_short_title_length.'" name="short_title" value="'.htmlentities($this->_short_title).'"/></label><br/>
    63 <h3>Equipment, Presenters, and other notes</h3>
     63<h3>Presenters and Schools</h3>
     64
     65<p>If you ('.$jpdd->_authenticated_user->getTitle().') are not the one who will present the workshop, or if you hope to
     66have co-presenters, please tell us who will present the workshop, and what school they are affiliated with.</p>
     67
     68<label>Presenters<br/><textarea name="presenter_notes" rows="3" cols="70">'.$jpdd->FilterBlock($this->_presenter_notes, true).'</textarea></label>
     69<h3>Public Description</h3>
     70<label>Brief, enticing description (to be shown to participants)<br/><textarea name="description" rows="20" cols="70">'.$this->getDescription(true, true).'</textarea></label>
     71<h3>Equipment and other notes</h3>
    6472<p>We would greatly appreciate your supplying any needed equipment .
    6573If that is not at all possible, let us know (in the private notes
    6674below) what equipment you would like to have, and we will see if we
    6775can help out.</p>
    68 
    69 <p>If you ('.$jpdd->_authenticated_user->getTitle().') are not the one who will present the workshop, or if you hope to
    70 have co-presenters, please indicate who that will be in the private
    71 notes below as well.</p>
    72 
    7376<label>Private Notes (for conference organizers, will not be shown to participants)<br/><textarea name="private_notes" rows="3" cols="70">'.$jpdd->FilterBlock($this->_private_notes, true).'</textarea></label>
    74 <h3>Public Description</h3>
    75 <label>Brief, enticing description (to be shown to participants)<br/><textarea name="description" rows="20" cols="70">'.$this->getDescription(true, true).'</textarea></label>
    7677'.$this->getM2MEditView('category', 'proposal_category', 'Categories', 'Add Category').'
    7778<fieldset><legend>Attendance</legend>
     
    8788          $this->_description = $_POST['description'];
    8889          $this->_private_notes = $_POST['private_notes'];
     90          $this->_presenter_notes = $_POST['presenter_notes'];
    8991          $this->_min_attendees = $_POST['min_attendees'];
    9092          $this->_max_attendees = $_POST['max_attendees'];
     
    99101                                                           'description = '.$jpdd->stringOrDefault($this->_description).', '.
    100102                                                           'private_notes = '.$jpdd->stringOrDefault($this->_private_notes).', '.
     103                                                           'presenter_notes = '.$jpdd->stringOrDefault($this->_presenter_notes).', '.
    101104                                                           'min_attendees = '.$jpdd->intOrDefault($this->_min_attendees).', '.
    102105                                                           'max_attendees = '.$jpdd->intOrDefault($this->_max_attendees).' WHERE '.
     
    118121          global $jpdd;
    119122          $this->applyPostForm();
    120           $res = $jpdd->executeSQL('INSERT INTO '.$this->getSingletonTable().' (title, short_title, description, private_notes, min_attendees, max_attendees, event_id, proposer_id) VALUES ('.
     123          $res = $jpdd->executeSQL('INSERT INTO '.$this->getSingletonTable().' (title, short_title, description, private_notes, presenter_notes, min_attendees, max_attendees, event_id, proposer_id) VALUES ('.
    121124                                                           $jpdd->stringOrDefault($this->_title).', '.
    122125                                                           $jpdd->stringOrDefault($this->_short_title).', '.
    123126                                                           $jpdd->stringOrDefault($this->_description).', '.
    124127                                                           $jpdd->stringOrDefault($this->_private_notes).', '.
     128                                                           $jpdd->stringOrDefault($this->_presenter_notes).', '.
    125129                                                           $jpdd->intOrDefault($this->_min_attendees).', '.
    126130                                                           $jpdd->intOrDefault($this->_max_attendees).', '.
     
    146150      if ($editor || $canaccept) {
    147151        $ret .= '<div>Proposed by: '.$this->getProposer()->getLinkedTitle().'</div>';
     152        if (!is_null($this->_presenter_notes))
     153          $ret .= '<div class="private-notes"><div class="title">Presenter Notes</div><div class="body">'.$jpdd->filterBlock($this->_presenter_notes).'</div></div>';
    148154        if (!is_null($this->_private_notes))
    149155          $ret .= '<div class="private-notes"><div class="title">Private Notes</div><div class="body">'.$jpdd->filterBlock($this->_private_notes).'</div></div>';
     
    194200        '<input type="hidden" name="short_title" value="'.htmlentities($this->_short_title).'"/>'.
    195201        '<input type="hidden" name="description" value="'.htmlentities($this->_description).'"/>'.
    196         '<input type="hidden" name="private_notes" value="'.htmlentities($this->_private_notes).'"/>'.
     202        '<input type="hidden" name="private_notes" value="'.
     203        (is_null($this->_presenter_notes) ? '' : htmlentities($this->_presenter_notes)."\n\n").
     204        (is_null($this->_private_notes) ? '' : htmlentities($this->_private_notes)).
     205        '"/>'.
    197206        '<input type="hidden" name="min_attendees" value="'.htmlentities($this->_min_attendees).'"/>'.
    198207        '<input type="hidden" name="max_attendees" value="'.htmlentities($this->_max_attendees).'"/>'.
  • trunk/jpdd/sql/db.sql

    r1422 r1432  
    10721072
    10731073ALTER TABLE event ADD CONSTRAINT event_advertise_proposals_date_range CHECK (start_planning <= advertise_proposals_until AND advertise_proposals_until <= start_time);
     1074
     1075ALTER TABLE proposal ADD COLUMN presenter_notes text;
Note: See TracChangeset for help on using the changeset viewer.