This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, 6.1 has been updated
via a77335583a48f9ebd10a95fae303929b90fc85d7 (commit)
from c474f2459f5fd351e47b7ed3c0b774239ccb1f2f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=a77335583a48f9ebd10a95fae303929b90fc85d7
commit a77335583a48f9ebd10a95fae303929b90fc85d7
Author: Franck Villaume <[email protected]>
Date: Sat Apr 21 16:19:14 2018 +0200
tracker: adjust required field for email when anonymous user has submit
permission. support widget oriented display as well
diff --git a/src/common/tracker/include/build_submission_form.php
b/src/common/tracker/include/build_submission_form.php
index ca1fd8b..a56bc90 100644
--- a/src/common/tracker/include/build_submission_form.php
+++ b/src/common/tracker/include/build_submission_form.php
@@ -39,12 +39,12 @@ function artifact_submission_form($ath, $group,
$summary='', $details='', $assig
echo $HTML->listTableTop(array(), array(), 'full');
if (!session_loggedin()) {
$content = html_ao('div', array('class'=>'login_warning_msg'));
- $content .= $HTML->warning_msg(_('Please').'
'.util_make_link('/account/login.php?return_to='.urlencode(getStringFromServer('REQUEST_URI')),
_('login')));
+ $content .= html_e('p', array('class' => 'warning_msg'),
_('Please').'
'.util_make_link('/account/login.php?return_to='.urlencode(getStringFromServer('REQUEST_URI')),
_('login')));
$content .= _('If you <strong>cannot</strong> login, then enter
your email address here')._(':');
- $content .= html_e('p',array(), html_e('input',
array('type'=>'email', 'name'=>'user_email', 'size'=>'50',
'maxlength'=>'255')));
+ $content .= html_e('p', array(), html_e('input', array('type'
=> 'email', 'name' => 'user_email', 'size' => 50, 'maxlength' => 255,
'required' => 'required')));
$content .= html_ac(html_ap() - 1);
$cells = array();
- $cells[][] = $content;
+ $cells[] = array($content,'colspan'=>'2');
echo $HTML->multiTableRow(array(), $cells);
}
$cells = array();
@@ -103,13 +103,6 @@ function artifact_submission_form($ath, $group,
$summary='', $details='', $assig
echo $HTML->multiTableRow(array(), $cells);
$content = '';
- if (!session_loggedin()) {
- $content .= html_ao('div', array('class'=>'login_warning_msg'));
- $content .= $HTML->warning_msg(_('Please').'
'.util_make_link('/account/login.php?return_to='.urlencode(getStringFromServer('REQUEST_URI')),
_('login')));
- $content .= _('If you <strong>cannot</strong> login, then enter
your email address here')._(':');
- $content .= html_e('p',array(), html_e('input',
array('type'=>'text', 'name'=>'user_email', 'size'=>'50', 'maxlength'=>'255')));
- $content .= html_ac(html_ap() - 1);
- }
$content .= html_e('p', array(), ' ');
$content .= html_e('span', array('class'=>'important'), _('DO NOT enter
passwords or confidential information in your message!'));
$cells = array();
diff --git a/src/common/widget/Widget_TrackerSummary.class.php
b/src/common/widget/Widget_TrackerSummary.class.php
index 348da5e..2e73027 100644
--- a/src/common/widget/Widget_TrackerSummary.class.php
+++ b/src/common/widget/Widget_TrackerSummary.class.php
@@ -64,6 +64,12 @@ class Widget_TrackerSummary extends Widget {
$fieldInFormula = $ath->getFieldsInFormula();
$return = '';
+ if (!session_loggedin()) {
+ $content = html_e('p', array('class' => 'warning_msg'),
_('Please').'
'.util_make_link('/account/login.php?return_to='.urlencode(getStringFromServer('REQUEST_URI')),
_('login')));
+ $content .= _('If you <strong>cannot</strong> login,
then enter your email address here')._(':').utils_requiredField();
+ $content .= html_e('p', array(), html_e('input',
array('type' => 'email', 'name' => 'user_email', 'size' => 50, 'maxlength' =>
255, 'required' => 'required')));
+ $return .= html_e('div',
array('class'=>'login_warning_msg'), $content);
+ }
$inputAttrs = array('form' => 'trackerform', 'type' => 'text',
'name' => 'summary', 'style' => 'width:99%', 'value' => $summary);
if ($func == 'detail') {
$inputAttrs['value'] = $ah->getSummary();
-----------------------------------------------------------------------
Summary of changes:
src/common/tracker/include/build_submission_form.php | 13 +++----------
src/common/widget/Widget_TrackerSummary.class.php | 6 ++++++
2 files changed, 9 insertions(+), 10 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits