View | Details | Raw Unified | Return to bug 4888 | Differences between
and this patch

Collapse All | Expand All

(-)classes/manager/form/ReviewFormElementForm.inc.php (-1 / +3 lines)
 Lines 80-85    Link Here 
80
				$this->_data = array(
80
				$this->_data = array(
81
					'question' => $reviewFormElement->getQuestion(null), // Localized
81
					'question' => $reviewFormElement->getQuestion(null), // Localized
82
					'required' => $reviewFormElement->getRequired(),
82
					'required' => $reviewFormElement->getRequired(),
83
					'included' => $reviewFormElement->getIncluded(),
83
					'elementType' => $reviewFormElement->getElementType(),
84
					'elementType' => $reviewFormElement->getElementType(),
84
					'possibleResponses' => $reviewFormElement->getPossibleResponses(null) //Localized
85
					'possibleResponses' => $reviewFormElement->getPossibleResponses(null) //Localized
85
				);
86
				);
 Lines 91-97    Link Here 
91
	 * Assign form data to user-submitted data.
92
	 * Assign form data to user-submitted data.
92
	 */
93
	 */
93
	function readInputData() {
94
	function readInputData() {
94
		$this->readUserVars(array('question', 'required', 'elementType', 'possibleResponses'));
95
		$this->readUserVars(array('question', 'required', 'included', 'elementType', 'possibleResponses'));
95
	}
96
	}
96
97
97
	/**
98
	/**
 Lines 112-117    Link Here 
112
113
113
		$reviewFormElement->setQuestion($this->getData('question'), null); // Localized
114
		$reviewFormElement->setQuestion($this->getData('question'), null); // Localized
114
		$reviewFormElement->setRequired($this->getData('required') ? 1 : 0);
115
		$reviewFormElement->setRequired($this->getData('required') ? 1 : 0);
116
		$reviewFormElement->setIncluded($this->getData('included') ? 1 : 0);
115
		$reviewFormElement->setElementType($this->getData('elementType'));
117
		$reviewFormElement->setElementType($this->getData('elementType'));
116
118
117
		if (in_array($this->getData('elementType'), ReviewFormElement::getMultipleResponsesElementTypes())) {
119
		if (in_array($this->getData('elementType'), ReviewFormElement::getMultipleResponsesElementTypes())) {
(-)classes/reviewForm/ReviewFormElement.inc.php (+16 lines)
 Lines 131-136    Link Here 
131
	}
131
	}
132
132
133
	/**
133
	/**
134
	 * get included
135
	 * @return boolean
136
	 */
137
	function getIncluded() {
138
		return $this->getData('included');
139
	}
140
141
	/**
142
	 * set included
143
	 * @param $included boolean
144
	 */
145
	function setIncluded($included) {
146
		return $this->setData('included', $included);
147
	}
148
149
	/**
134
	 * Get question.
150
	 * Get question.
135
	 * @param $locale string
151
	 * @param $locale string
136
	 * @return string
152
	 * @return string
(-)classes/reviewForm/ReviewFormElementDAO.inc.php (-4 / +8 lines)
 Lines 50-55    Link Here 
50
		$reviewFormElement->setSequence($row['seq']);
50
		$reviewFormElement->setSequence($row['seq']);
51
		$reviewFormElement->setElementType($row['element_type']);
51
		$reviewFormElement->setElementType($row['element_type']);
52
		$reviewFormElement->setRequired($row['required']);
52
		$reviewFormElement->setRequired($row['required']);
53
		$reviewFormElement->setIncluded($row['included']);
53
54
54
		$this->getDataObjectSettings('review_form_element_settings', 'review_form_element_id', $row['review_form_element_id'], $reviewFormElement);
55
		$this->getDataObjectSettings('review_form_element_settings', 'review_form_element_id', $row['review_form_element_id'], $reviewFormElement);
55
56
 Lines 83-96    Link Here 
83
	function insertReviewFormElement(&$reviewFormElement) {
84
	function insertReviewFormElement(&$reviewFormElement) {
84
		$this->update(
85
		$this->update(
85
			'INSERT INTO review_form_elements
86
			'INSERT INTO review_form_elements
86
				(review_form_id, seq, element_type, required)
87
				(review_form_id, seq, element_type, required, included)
87
				VALUES
88
				VALUES
88
				(?, ?, ?, ?)',
89
				(?, ?, ?, ?, ?)',
89
			array(
90
			array(
90
				$reviewFormElement->getReviewFormId(),
91
				$reviewFormElement->getReviewFormId(),
91
				$reviewFormElement->getSequence() == null ? 0 : $reviewFormElement->getSequence(),
92
				$reviewFormElement->getSequence() == null ? 0 : $reviewFormElement->getSequence(),
92
				$reviewFormElement->getElementType(),
93
				$reviewFormElement->getElementType(),
93
				$reviewFormElement->getRequired() ? 1 : 0
94
				$reviewFormElement->getRequired() ? 1 : 0,
95
				$reviewFormElement->getIncluded() ? 1 : 0
94
			)
96
			)
95
		);
97
		);
96
98
 Lines 110-122    Link Here 
110
					review_form_id = ?,
112
					review_form_id = ?,
111
					seq = ?,
113
					seq = ?,
112
					element_type = ?,
114
					element_type = ?,
113
					required = ?
115
					required = ?,
116
					included = ?
114
				WHERE review_form_element_id = ?',
117
				WHERE review_form_element_id = ?',
115
			array(
118
			array(
116
				$reviewFormElement->getReviewFormId(),
119
				$reviewFormElement->getReviewFormId(),
117
				$reviewFormElement->getSequence(),
120
				$reviewFormElement->getSequence(),
118
				$reviewFormElement->getElementType(),
121
				$reviewFormElement->getElementType(),
119
				$reviewFormElement->getRequired(),
122
				$reviewFormElement->getRequired(),
123
				$reviewFormElement->getIncluded(),
120
				$reviewFormElement->getReviewFormElementId()
124
				$reviewFormElement->getReviewFormElementId()
121
			)
125
			)
122
		);
126
		);
(-)dbscripts/xml/ocs_schema.xml (+1 lines)
 Lines 80-85    Link Here 
80
		<field name="seq" type="F" />
80
		<field name="seq" type="F" />
81
		<field name="element_type" type="I8" />
81
		<field name="element_type" type="I8" />
82
		<field name="required" type="I1" />
82
		<field name="required" type="I1" />
83
		<field name="included" type="I1" />
83
		<descr>Review form elements.</descr>
84
		<descr>Review form elements.</descr>
84
	</table>
85
	</table>
85
	
86
	
(-)locale/en_US/locale.xml (+1 lines)
 Lines 59-64    Link Here 
59
	<message key="manager.reviewFormElements.copyTo">Copy to:</message>
59
	<message key="manager.reviewFormElements.copyTo">Copy to:</message>
60
	<message key="manager.reviewFormElements.question">Item</message>
60
	<message key="manager.reviewFormElements.question">Item</message>
61
	<message key="manager.reviewFormElements.required">Reviewers required to complete item</message>
61
	<message key="manager.reviewFormElements.required">Reviewers required to complete item</message>
62
	<message key="manager.reviewFormElements.notIncluded">Not included in message to author</message>
62
	<message key="manager.reviewFormElements.elementType">Item type</message>
63
	<message key="manager.reviewFormElements.elementType">Item type</message>
63
	<message key="manager.reviewFormElements.possibleResponse">Selection</message>
64
	<message key="manager.reviewFormElements.possibleResponse">Selection</message>
64
	<message key="manager.reviewFormElements.addResponseItem">Add selection</message>
65
	<message key="manager.reviewFormElements.addResponseItem">Add selection</message>
(-)templates/manager/reviewForms/reviewFormElementForm.tpl (+7 lines)
 Lines 60-65    Link Here 
60
	</td>
60
	</td>
61
</tr>
61
</tr>
62
<tr valign="top">
62
<tr valign="top">
63
	<td>&nbsp;</td>
64
	<td class="value">
65
		<input type="checkbox" name="included" id="included" value="1" {if $included}checked="checked"{/if} />
66
		{fieldLabel name="included" key="manager.reviewFormElements.notIncluded"}
67
	</td>
68
</tr>
69
<tr valign="top">
63
	<td class="label">{fieldLabel name="elementType" required="true" key="manager.reviewFormElements.elementType"}</td>
70
	<td class="label">{fieldLabel name="elementType" required="true" key="manager.reviewFormElements.elementType"}</td>
64
	<td class="value">
71
	<td class="value">
65
		<select name="elementType" id="elementType" class="selectMenu" size="1" onchange="togglePossibleResponses(this.options[this.selectedIndex].value, '{$multipleResponsesElementTypesString}')">{html_options_translate options=$reviewFormElementTypeOptions selected=$elementType}</select>
72
		<select name="elementType" id="elementType" class="selectMenu" size="1" onchange="togglePossibleResponses(this.options[this.selectedIndex].value, '{$multipleResponsesElementTypesString}')">{html_options_translate options=$reviewFormElementTypeOptions selected=$elementType}</select>

Return to bug 4888