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, master has been updated
via 28c6af88c44a104165a930850799c406a5890374 (commit)
from 423de3598b89e8b878851da83792ac3347e07254 (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=28c6af88c44a104165a930850799c406a5890374
commit 28c6af88c44a104165a930850799c406a5890374
Author: Stéphane-Eymeric Bredthauer <[email protected]>
Date: Mon Jun 27 18:48:13 2016 +0200
use HTML helpers
diff --git a/src/common/tracker/actions/admin-ind.php
b/src/common/tracker/actions/admin-ind.php
index 0764f47..20b44ac 100644
--- a/src/common/tracker/actions/admin-ind.php
+++ b/src/common/tracker/actions/admin-ind.php
@@ -7,6 +7,7 @@
* Copyright 2010, FusionForge Team
* Copyright 2011, Franck Villaume - Capgemini
* Copyright 2012-2016, Franck Villaume - TrivialDev
+ * Copyright 2016, Stéphane-Eymeric Bredthauer - TrivialDev
*
* This file is part of FusionForge. FusionForge is free software;
* you can redistribute it and/or modify it under the terms of the
@@ -44,11 +45,11 @@ if (getStringFromRequest('post_changes')) {
if (getStringFromRequest('add_at')) {
$res=new ArtifactTypeHtml($group);
if (!$res->create($name,$description,$email_all,$email_address,
-
$due_period,$use_resolution,$submit_instructions,$browse_instructions)) {
+
$due_period,$use_resolution,$submit_instructions,$browse_instructions)) {
exit_error($res->getErrorMessage(),'tracker');
} else {
$feedback .= _('Tracker created successfully');
- $feedback .= '<br/>';
+ $feedback .= html_e('br');
$feedback .= _("Please configure also the roles (by
default, it's “No Access”)");
}
$group->normalizeAllRoles () ;
@@ -91,8 +92,7 @@ if (!isset($at_arr) || !$at_arr || count($at_arr) < 1) {
echo $HTML->warning_msg(_('No trackers found'));
} else {
- echo '
- <p>'._('Choose a data type and you can set up prefs, categories,
groups, users, and permissions').'.</p>';
+ echo html_e('p', array(), _('Choose a data type and you can set up
prefs, categories, groups, users, and permissions').'.');
/*
Put the result set (list of forums for this group) into a
column with folders
@@ -120,41 +120,59 @@ if (!isset($at_arr) || !$at_arr || count($at_arr) < 1) {
// Set up blank ArtifactType
//
-if (forge_check_perm ('tracker_admin', $group->getID())) { ?>
- <h3><?php echo _('Create a new tracker.') ?></h3>
- <p><?php echo _('You can use this system to track virtually any kind of
data, with each tracker having separate user, group, category, and permission
lists. You can also easily move items between trackers when needed.') ?></p>
- <p><?php echo _('Trackers are referred to as “Artifact Types” and
individual pieces of data are “Artifacts”. “Bugs” might be an Artifact Type,
whiles a bug report would be an Artifact. You can create as many Artifact Types
as you want, but remember you need to set up categories, groups, and permission
for each type, which can get time-consuming.') ?></p>
+if (forge_check_perm ('tracker_admin', $group->getID())) {
+ echo html_e('h3', array(), _('Create a new tracker.'));
+ echo html_e('p', array(), _('You can use this system to track virtually
any kind of data, with each tracker having separate user, group, category, and
permission lists. You can also easily move items between trackers when
needed.'));
+ echo html_e('p', array(), _('Trackers are referred to as “Artifact
Types” and individual pieces of data are “Artifacts”. “Bugs” might be an
Artifact Type, whiles a bug report would be an Artifact. You can create as many
Artifact Types as you want, but remember you need to set up categories, groups,
and permission for each type, which can get time-consuming.'));
- <?php
echo $HTML->openForm(array('method' => 'post', 'action' =>
'/tracker/admin/?group_id='.$group_id));
- ?>
- <input type="hidden" name="add_at" value="y" />
- <p>
- <?php echo _('<strong> Name:</strong> (examples: meeting minutes, test
results, RFP Docs)').utils_requiredField() ?><br />
- <input type="text" name="name" value="" required="required" /></p>
- <p>
- <strong><?php echo _('Description')._(':').utils_requiredField();
?></strong><br />
- <input type="text" name="description" value="" size="50"
required="required" /></p>
- <p>
- <strong><?php echo _('Send email on new submission to address')._(':');
?></strong><br />
- <input type="text" name="email_address" value="" /></p>
- <p>
- <input type="checkbox" name="email_all" value="1" /> <strong><?php echo
_('Send email on all changes') ?></strong></p>
- <p>
- <strong><?php echo _('Days till considered overdue')._(':');
?></strong><br />
- <input type="text" name="due_period" value="30" /></p>
- <p>
- <strong><?php echo _('Days till pending tracker items time
out')._(':'); ?></strong><br />
- <input type="text" name="status_timeout" value="14" /></p>
- <p>
- <strong><?php echo _('Free form text for the “Submit New”
page')._(':'); ?></strong><br />
- <textarea name="submit_instructions" rows="10" cols="55"></textarea></p>
- <p>
- <strong><?php echo _('Free form text for the Browse page')._(':');
?></strong><br />
- <textarea name="browse_instructions" rows="10" cols="55"></textarea></p>
- <p>
- <input type="submit" name="post_changes" value="<?php echo _('Submit')
?>" /></p>
- <?php
+
+ echo html_e('input', array('type'=>'hidden', 'name'=>'add_at',
'value'=>'y'));
+
+ echo html_ao('p');
+ echo html_e('label', array('for'=>'name'), html_e('strong',array(),
_('Name')._(':')).' '._('(examples: meeting minutes, test results, RFP
Docs)').utils_requiredField()).html_e('br');
+ echo html_e('input', array('type'=>'text', 'name'=>'name', 'value'=>'',
'required'=>'required'));
+ echo html_ac(html_ap()-1);
+
+ echo html_ao('p');
+ echo html_e('label', array('for'=>'description'),
html_e('strong',array(),
_('Description')._(':').utils_requiredField())).html_e('br');
+ echo html_e('input', array('type'=>'text', 'name'=>'description',
'value'=>'', 'size'=>'50', 'required'=>'required'));
+ echo html_ac(html_ap()-1);
+
+ echo html_ao('p');
+ echo html_e('label', array('for'=>'email_address'),
html_e('strong',array(), _('Send email on new submission to
address')._(':'))).html_e('br');
+ echo html_e('input', array('type'=>'text', 'name'=>'email_address',
'value'=>''));
+ echo html_ac(html_ap()-1);
+
+ echo html_ao('p');
+ echo html_e('input', array('type'=>'checkbox', 'name'=>'email_all',
'value'=>'1'));
+ echo html_e('label', array('for'=>'email_all'),
html_e('strong',array(), _('Send email on all changes')));
+ echo html_ac(html_ap()-1);
+
+ echo html_ao('p');
+ echo html_e('label', array('for'=>'due_period'),
html_e('strong',array(), _('Days till considered
overdue')._(':'))).html_e('br');
+ echo html_e('input', array('type'=>'text', 'name'=>'due_period',
'value'=>'30'));
+ echo html_ac(html_ap()-1);
+
+ echo html_ao('p');
+ echo html_e('label', array('for'=>'status_timeout'),
html_e('strong',array(), _('Days till pending tracker items time
out')._(':'))).html_e('br');
+ echo html_e('input', array('type'=>'text', 'name'=>'status_timeout',
'value'=>'14'));
+ echo html_ac(html_ap()-1);
+
+ echo html_ao('p');
+ echo html_e('label', array('for'=>'submit_instructions'),
html_e('strong',array(), _('Free form text for the “Submit New”
page')._(':'))).html_e('br');
+ echo html_e('textarea', array('name'=>'submit_instructions',
'rows'=>'10', 'cols'=>'55'), '', false);
+ echo html_ac(html_ap()-1);
+
+ echo html_ao('p');
+ echo html_e('label', array('for'=>'browse_instructions'),
html_e('strong',array(), _('Free form text for the Browse
page')._(':'))).html_e('br');
+ echo html_e('textarea', array('name'=>'browse_instructions',
'rows'=>'10', 'cols'=>'55'), '', false);
+ echo html_ac(html_ap()-1);
+
+ echo html_ao('p');
+ echo html_e('input', array('type'=>'submit', 'name'=>'post_changes',
'value'=>_('Submit')));
+ echo html_ac(html_ap()-1);
+
echo $HTML->closeForm();
}
diff --git a/src/common/tracker/views/form-updatetracker.php
b/src/common/tracker/views/form-updatetracker.php
index d71c2f5..2edd7c5 100644
--- a/src/common/tracker/views/form-updatetracker.php
+++ b/src/common/tracker/views/form-updatetracker.php
@@ -4,6 +4,7 @@
*
* Copyright 2010 (c) FusionForge Team
* Copyright 2015, Franck Villaume - TrivialDev
+ * Copyright 2016, Stéphane-Eymeric Bredthauer - TrivialDev
* http://fusionforge.org
*
* This file is part of FusionForge. FusionForge is free software;
@@ -39,72 +40,67 @@ $browse_instructions =
getStringFromRequest('browse_instructions', $ath->getBrow
$ath->adminHeader(array('title'=>sprintf(_('Update settings for %s'),
$ath->getName())));
echo $HTML->openForm(array('action' =>
'/tracker/admin/?group_id='.$group_id.'&atid='.$ath->getID(), 'method' =>
'post'));
-?>
- <p>
- <input type="hidden" name="update_type" value="y" />
- <?php echo _('<strong>Name:</strong> (examples: meeting
minutes, test results, RFP Docs)') ?><br />
- <?php if ($ath->getDataType()) {
- echo $ath->getName();
- } else {
- ?>
- <input type="text" name="name" value="<?php echo
$ath->getName(); ?>" />
- <?php
- }
- ?>
- </p>
- <p>
- <label for="description">
- <strong><?php echo
_('Description').utils_requiredField()._(':'); ?></strong><br />
- </label>
- <?php if ($ath->getDataType()) {
- echo $ath->getDescription();
- } else {
- ?>
- <input type="text" id="description" name="description"
required="required" value="<?php echo $ath->getDescription(); ?>" size="50" />
- <?php
- }
- ?>
- </p>
- <p>
- <label for="email_address">
- <strong><?php echo _('Send email on new submission to
address')._(':'); ?></strong><br />
- </label>
- <input type="text" id="email_address" name="email_address"
value="<?php echo $email_address; ?>" />
- </p>
- <p>
- <input type="checkbox" id="email_all" name="email_all"
value="1" <?php echo (($email_all)?'checked="checked"':''); ?> />
- <label for="email_all">
- <strong><?php echo _('Send email on all changes')
?></strong>
- </label>
- </p>
- <p>
- <label for="due_period">
- <strong><?php echo _('Days till considered
overdue')._(':'); ?></strong><br />
- </label>
- <input type="number" id="due_period" name="due_period"
value="<?php echo $due_period; ?>" />
- </p>
- <p>
- <label for="status_timeout">
- <strong><?php echo _('Days till pending tracker items
time out')._(':'); ?></strong><br />
- </label>
- <input type="number" id="status_timeout" name="status_timeout"
value="<?php echo $status_timeout; ?>" />
- </p>
- <p>
- <label for="submit_instructions">
- <strong><?php echo _('Free form text for the “Submit
New” page')._(':'); ?></strong><br />
- </label>
- <textarea id="submit_instructions" name="submit_instructions"
rows="10" cols="55"><?php echo $submit_instructions; ?></textarea>
- </p>
- <p>
- <label for="browse_instructions">
- <strong><?php echo _('Free form text for the Browse
page')._(':'); ?></strong><br />
- </label>
- <textarea id="browse_instructions" name="browse_instructions"
rows="10" cols="55"><?php echo $browse_instructions; ?></textarea>
- </p>
- <p>
- <input type="submit" name="post_changes" value="<?php echo
_('Submit') ?>" />
- </p>
- <?php
+
+echo html_e('input', array('type'=>'hidden', 'name'=>'update_type',
'value'=>'y'));
+
+echo html_ao('p');
+if ($ath->getDataType()) {
+ echo html_e('strong',array(), _('Name')._(':')).' '._('(examples:
meeting minutes, test results, RFP Docs)').html_e('br');
+ echo $ath->getName();
+} else {
+ echo html_e('label', array('for'=>'name'), html_e('strong',array(),
_('Name')._(':')).' '._('(examples: meeting minutes, test results, RFP
Docs)').utils_requiredField()).html_e('br');
+ echo html_e('input', array('type'=>'text', 'name'=>'name',
'value'=>$ath->getName(), 'required'=>'required'));
+}
+echo html_ac(html_ap()-1);
+
+echo html_ao('p');
+if ($ath->getDataType()) {
+ echo html_e('strong',array(), _('Description')._(':')).html_e('br');
+ echo $ath->getDescription();
+} else {
+ echo html_e('label', array('for'=>'description'),
html_e('strong',array(),_('Description')._(':')).utils_requiredField()).html_e('br');
+ echo html_e('input', array('type'=>'text', 'name'=>'description',
'value'=>$ath->getDescription(), 'size'=>'50', 'required'=>'required'));
+}
+echo html_ac(html_ap()-1);
+
+echo html_ao('p');
+echo html_e('label', array('for'=>'email_address'), html_e('strong',array(),
_('Send email on new submission to address')._(':'))).html_e('br');
+echo html_e('input', array('type'=>'text', 'name'=>'email_address', 'value'=>
$email_address));
+echo html_ac(html_ap()-1);
+
+echo html_ao('p');
+if ($email_all) {
+ echo html_e('input', array('type'=>'checkbox', 'name'=>'email_all',
'value'=>'1', 'checked'=>'checked'));
+} else {
+ echo html_e('input', array('type'=>'checkbox', 'name'=>'email_all',
'value'=>'1'));
+}
+echo html_e('label', array('for'=>'email_all'), html_e('strong',array(),
_('Send email on all changes')));
+echo html_ac(html_ap()-1);
+
+echo html_ao('p');
+echo html_e('label', array('for'=>'due_period'), html_e('strong',array(),
_('Days till considered overdue')._(':'))).html_e('br');
+echo html_e('input', array('type'=>'text', 'name'=>'due_period',
'value'=>$due_period));
+echo html_ac(html_ap()-1);
+
+echo html_ao('p');
+echo html_e('label', array('for'=>'status_timeout'), html_e('strong',array(),
_('Days till pending tracker items time out')._(':'))).html_e('br');
+echo html_e('input', array('type'=>'text', 'name'=>'status_timeout',
'value'=>$status_timeout));
+echo html_ac(html_ap()-1);
+
+echo html_ao('p');
+echo html_e('label', array('for'=>'submit_instructions'),
html_e('strong',array(), _('Free form text for the “Submit New”
page')._(':'))).html_e('br');
+echo html_e('textarea', array('name'=>'submit_instructions', 'rows'=>'10',
'cols'=>'55'), $submit_instructions, false);
+echo html_ac(html_ap()-1);
+
+echo html_ao('p');
+echo html_e('label', array('for'=>'browse_instructions'),
html_e('strong',array(), _('Free form text for the Browse
page')._(':'))).html_e('br');
+echo html_e('textarea', array('name'=>'browse_instructions', 'rows'=>'10',
'cols'=>'55'), $browse_instructions, false);
+echo html_ac(html_ap()-1);
+
+echo html_ao('p');
+echo html_e('input', array('type'=>'submit', 'name'=>'post_changes',
'value'=>_('Submit')));
+echo html_ac(html_ap()-1);
+
echo $HTML->closeForm();
$ath->footer();
-----------------------------------------------------------------------
Summary of changes:
src/common/tracker/actions/admin-ind.php | 92 ++++++++++-------
src/common/tracker/views/form-updatetracker.php | 128 ++++++++++++------------
2 files changed, 117 insertions(+), 103 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits