}
}
function check_logo ($arr, $a_id=false) {
+ global $max_logo_size ;
+
if ($a_id) {
$actor = new ContribTrackerActor ($a_id) ;
$default = $actor->getLogo() ;
break ;
case 'post_add_actor':
$name = getStringFromRequest ('actor_name') ;
- $address = getStringFromRequest ('actor_address') ;
+ $url = getStringFromRequest ('actor_url') ;
$email = getStringFromRequest ('actor_email') ;
$desc = getStringFromRequest ('actor_desc') ;
$logoarr = getUploadedFile ('actor_logo') ;
$actor_id = getIntFromRequest ('actor_id') ;
check_actor_id ($actor_id) ;
$name = getStringFromRequest ('actor_name') ;
- $address = getStringFromRequest ('actor_address') ;
+ $url = getStringFromRequest ('actor_url') ;
$email = getStringFromRequest ('actor_email') ;
$desc = getStringFromRequest ('actor_desc') ;
$logoarr = getUploadedFile ('actor_logo') ;
case 'post_add_actor':
$actor = new ContribTrackerActor () ;
$structure = new ContribTrackerLegalStructure ($structure_id) ;
- if (!$actor->create ($name, $address, $email, $desc, $logo, $structure)) {
+ if (!$actor->create ($name, $url, $email, $desc, $logo, $structure)) {
exit_error ($actor->getErrorMessage()) ;
}
$actor_id = $actor->getId() ;
case 'post_edit_actor':
$actor = new ContribTrackerActor ($actor_id) ;
$structure = new ContribTrackerLegalStructure ($structure_id) ;
- $actor->update ($name, $address, $email, $desc, $logo, $structure) ;
+ $actor->update ($name, $url, $email, $desc, $logo, $structure) ;
$action = 'display' ;
break ;
}
$actors = $plugin->getActors () ;
if (count ($actors)) {
print '<table><thead><tr>' ;
+ print '<td><strong>'._('Logo').'</strong></td>' ;
print '<td><strong>'._('Short name').'</strong></td>' ;
- print '<td><strong>'._('Postal address').'</strong></td>' ;
+ print '<td><strong>'._('URL').'</strong></td>' ;
print '<td><strong>'._('Email').'</strong></td>' ;
print '<td><strong>'._('Description').'</strong></td>' ;
- print '<td><strong>'._('Logo').'</strong></td>' ;
print '<td><strong>'._('Legal structure').'</strong></td>' ;
print '<td><strong>'._('Actions').'</strong></td>' ;
print '</tr></thead><tbody>' ;
foreach ($actors as $a) {
print '<tr>';
- print '<td>'.htmlspecialchars($a->getName()).'</td>' ;
- print '<td>'.htmlspecialchars($a->getAddress()).'</td>' ;
- print '<td>'.htmlspecialchars($a->getEmail()).'</td>' ;
- print '<td>'.htmlspecialchars($a->getDescription()).'</td>' ;
print '<td>' ;
if ($a->getLogo() != '') {
print '<img type="image/png" src="'.util_make_url ('/plugins/'.$plugin->name.'/actor_logo.php?actor_id='.$a->getId ()).'" />' ;
}
print '</td>' ;
+ print '<td>'.htmlspecialchars($a->getName()).'</td>' ;
+ print '<td>' ;
+ if ($a->getUrl() != '') {
+ print '<a href="'.htmlspecialchars($a->getUrl()).'">'.htmlspecialchars($a->getUrl()).'</a>';
+ }
+ print '</td>' ;
+ print '<td>'.htmlspecialchars($a->getEmail()).'</td>' ;
+ print '<td>'.htmlspecialchars($a->getDescription()).'</td>' ;
print '<td>'.htmlspecialchars($a->getLegalStructure()->getName()).'</td>' ;
?>
<td>
<input type="hidden" name="action" value="post_add_role" />
<?php echo _('Role name:') ?> <input type="text" name="role_name" size="20" /><br />
<?php echo _('Role description:') ?><br />
- <textarea name="role_desc" rows="20" cols="80"></textarea>
+ <textarea name="role_desc" rows="20" cols="80"></textarea><br />
<input type="submit" name="submit" value="<?php echo _('Submit') ?>" />
</form>
<input type="hidden" name="role_id" value="<?php echo $role->getId() ?>" />
<?php echo _('Role name:') ?> <input type="text" name="role_name" size="20" value="<?php echo htmlspecialchars ($role->getName()) ?>" /><br />
<?php echo _('Role description:') ?><br />
- <textarea name="role_desc" rows="20" cols="80"><?php echo htmlspecialchars ($role->getDescription()) ?></textarea>
+ <textarea name="role_desc" rows="20" cols="80"><?php echo htmlspecialchars ($role->getDescription()) ?></textarea><br />
<input type="submit" name="submit" value="<?php echo _('Save') ?>" />
</form>
<?php
<form action="<?php echo util_make_url ('/plugins/'.$plugin->name.'/global_admin.php') ?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="action" value="post_add_actor" />
<?php echo _('Actor name:') ?> <input type="text" name="actor_name" size="20" /><br />
- <?php echo _('Actor address:') ?> <input type="text" name="actor_address" size="20" /><br />
+ <?php echo _('Actor URL:') ?> <input type="text" name="actor_url" size="20" /><br />
<?php echo _('Actor email:') ?> <input type="text" name="actor_email" size="20" /><br />
<?php echo _('Actor description:') ?><br />
<textarea name="actor_desc" rows="20" cols="80"></textarea><br />
print '<option value="'.$s->getId().'">'.htmlspecialchars($s->getName()).'</option>' ;
}
?>
- </select>
+ </select><br />
<input type="submit" name="submit" value="<?php echo _('Submit') ?>" />
</form>
<input type="hidden" name="action" value="post_edit_actor" />
<input type="hidden" name="actor_id" value="<?php echo $actor->getId() ?>" />
<?php echo _('Actor name:') ?> <input type="text" name="actor_name" size="20" value="<?php echo htmlspecialchars ($actor->getName()) ?>" /><br />
- <?php echo _('Actor address:') ?> <input type="text" name="actor_address" size="20" value="<?php echo htmlspecialchars ($actor->getAddress()) ?>" /><br />
+ <?php echo _('Actor URL:') ?> <input type="text" name="actor_url" size="20" value="<?php echo htmlspecialchars ($actor->getUrl()) ?>" /><br />
<?php echo _('Actor email:') ?> <input type="text" name="actor_email" size="20" value="<?php echo htmlspecialchars ($actor->getEmail()) ?>" /><br />
<?php echo _('Actor description:') ?><br />
<textarea name="actor_desc" rows="20" cols="80"><?php echo htmlspecialchars ($actor->getDescription()) ?></textarea><br />
print '>'.htmlspecialchars($s->getName()).'</option>' ;
}
?>
- </select>
+ </select><br />
<input type="submit" name="submit" value="<?php echo _('Save') ?>" />
</form>
<?php