[evolvis-commits] r18071: theme-tracker pending merges:↵ Thorsten Glaser 2012-02-01 unbreak !TRK_TECH new submission↵ Thorsten Glaser 2012-02-01 [#2440] expose the user_email field again↵ Thorsten Glaser 2012-02-01 allow changing “Allow non-logged-in postings” post-creation
mirabilos at evolvis.org
mirabilos at evolvis.org
Wed Feb 1 14:02:56 CET 2012
Author: mirabilos
Date: 2012-02-01 14:02:56 +0100 (Wed, 01 Feb 2012)
New Revision: 18071
Modified:
trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactType.class.php
trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/form-updatetracker.php
trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/updates.php
trunk/gforge_base/evolvisforge-5.1/src/www/tracker/item.php
Log:
theme-tracker pending merges:
Thorsten Glaser 2012-02-01 unbreak !TRK_TECH new submission
Thorsten Glaser 2012-02-01 [#2440] expose the user_email field again
Thorsten Glaser 2012-02-01 allow changing “Allow non-logged-in postings” post-creation
Modified: trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactType.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactType.class.php 2012-02-01 13:02:52 UTC (rev 18070)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactType.class.php 2012-02-01 13:02:56 UTC (rev 18071)
@@ -959,10 +959,11 @@
* @param bool (1) true (0) false - whether the resolution box should be shown.
* @param string Free-form string that project admins can place on the submit page.
* @param string Free-form string that project admins can place on the browse page.
+ * @param bool (1) true (0) false - whether non-logged-in users can submit.
* @return true on success, false on failure.
*/
function update($name,$description,$email_all,$email_address,
- $due_period, $status_timeout,$use_resolution,$submit_instructions,$browse_instructions) {
+ $due_period, $status_timeout,$use_resolution,$submit_instructions,$browse_instructions,$allow_anon) {
if (!forge_check_perm ('tracker_admin', $this->Group->getID())) {
$this->setPermissionDeniedError();
@@ -998,6 +999,7 @@
}
}
+ $allow_anon = ((!$allow_anon) ? 0 : $allow_anon);
$email_all = ((!$email_all) ? 0 : $email_all);
$use_resolution = ((!$use_resolution) ? 0 : $use_resolution);
@@ -1009,6 +1011,7 @@
due_period=$5,
status_timeout=$6,
submit_instructions=$7,
+ allow_anon=$11,
browse_instructions=$8
WHERE group_artifact_id=$9 AND group_id=$10',
array (
@@ -1021,7 +1024,9 @@
htmlspecialchars($submit_instructions),
htmlspecialchars($browse_instructions),
$this->getID(),
- $this->Group->getID())) ;
+ $this->Group->getID(),
+ $allow_anon,
+ )) ;
if (!$res || db_affected_rows($res) < 1) {
$this->setError('ArtifactType::Update(): '.db_error());
Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/form-updatetracker.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/form-updatetracker.php 2012-02-01 13:02:52 UTC (rev 18070)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/form-updatetracker.php 2012-02-01 13:02:56 UTC (rev 18071)
@@ -23,6 +23,7 @@
$name = getStringFromRequest('name', $ath->getName());
$description = getStringFromRequest('description', $ath->getDescription());
+$allow_anon = getStringFromRequest('allow_anon', $ath->allowsAnon());
$email_address = getStringFromRequest('email_address', $ath->getEmailAddress());
$email_all = getStringFromRequest('email_all', $ath->emailAll());
$due_period = getStringFromRequest('due_period', $ath->getDuePeriod() / 86400);
@@ -60,6 +61,8 @@
?>
</p>
<p>
+ <input type="checkbox" name="allow_anon" value="1" <?php echo (($allow_anon)?'checked="checked"':''); ?> /> <strong><?php echo _('Allow non-logged-in postings') ?></strong></p>
+ <p>
<strong><?php echo _('Send email on new submission to address') ?>:</strong><br />
<input type="text" name="email_address" value="<?php echo $email_address; ?>" /></p>
<p>
Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/updates.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/updates.php 2012-02-01 13:02:52 UTC (rev 18070)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/updates.php 2012-02-01 13:02:56 UTC (rev 18071)
@@ -287,6 +287,7 @@
} elseif (getStringFromRequest('update_type')) {
$name = getStringFromRequest('name');
$description = getStringFromRequest('description');
+ $allow_anon = getStringFromRequest('allow_anon');
$email_all = getStringFromRequest('email_all');
$email_address = getStringFromRequest('email_address');
$due_period = getStringFromRequest('due_period');
@@ -296,7 +297,7 @@
$browse_instructions = getStringFromRequest('browse_instructions');
if (!$ath->update($name,$description,$email_all,$email_address,
- $due_period,$status_timeout,$use_resolution,$submit_instructions,$browse_instructions)) {
+ $due_period,$status_timeout,$use_resolution,$submit_instructions,$browse_instructions,$allow_anon)) {
$error_msg .= _('Error updating').' : '.$ath->getErrorMessage();
$ath->clearError();
} else {
Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/item.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/item.php 2012-02-01 13:02:52 UTC (rev 18070)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/item.php 2012-02-01 13:02:56 UTC (rev 18071)
@@ -155,7 +155,7 @@
echo html_build_priority_select_box('priority',
$is_add ? 3 : $ah->getPriority());
} else {
- echo gettipspan('priority', $ah->getPriority());
+ echo gettipspan('priority', $is_add ? 3 : $ah->getPriority());
}
?></div>
<?php
@@ -267,6 +267,24 @@
</table>
<?php
+if (!session_loggedin()) {
+ echo $HTML->boxMiddle(_('Please login'));
+?>
+<div style="width:80%; position:relative; left:10%; margin-top:12px;">
+ <div class="warning_msg"><?php
+ echo html_e('a', array(
+ 'href' => util_make_url('/account/login.php?return_to=' .
+ urlencode(getStringFromServer('REQUEST_URI'))),
+ ), _('Please log in.')) . ' • ' .
+ _('If you <strong>cannot</strong> login, then enter your email address here to submit a new item, post a comment or make any other permitted changes.');
+ ?></div>
+ <p><strong><?php echo _('Anonymous User eMail') .
+ utils_requiredField(); ?>:</strong><br />
+ <input type="text" name="user_email" size="50" maxlength="255" />
+ </p>
+</div>
+<?php
+}
if (!$is_add && $accesslevel >= TRK_FULL && $sysdebug_enable) {
/* debugging function: look at this page the way a user would */
echo $HTML->boxMiddle(_('Debugging Functions'), 'Debugging_Functions',
More information about the evolvis-commits
mailing list