Skip to content

Commit

Permalink
Removed overlib references.
Browse files Browse the repository at this point in the history
updated edit_reporter page
  • Loading branch information
balsdorf committed Feb 12, 2013
1 parent 593231d commit 43cc7ae
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 66 deletions.
5 changes: 5 additions & 0 deletions htdocs/css/main.css
Expand Up @@ -258,6 +258,11 @@ table.bordered td {
margin: 0 auto;
}

.bordered.narrow {
width: 400px;
margin: 0 auto;
}

/* End Bordered Table */

/* Grid table */
Expand Down
10 changes: 9 additions & 1 deletion htdocs/edit_reporter.php
Expand Up @@ -38,9 +38,17 @@
$issue_id = @$_POST["issue_id"] ? $_POST["issue_id"] : $_GET["iss_id"];
$tpl->assign("issue_id", $issue_id);

if (Auth::getCurrentRole() < User::getRoleID("Standard User")) {
Auth::redirect(APP_RELATIVE_URL . "list.php");
}

if (@$_POST["cat"] == "update") {
$res = Edit_Reporter::update($issue_id, $_POST['email']);
$tpl->assign("insert_result", $res);
Misc::mapMessages($res, array(
1 => array('Thank you, the Reporter was updated successfully.', Misc::MSG_INFO),
-1 => array('An error occurred while trying to update the Reporter.', Misc::MSG_ERROR),
));
Auth::redirect(APP_RELATIVE_URL . 'view.php?id=' . $issue_id);
}

$t = Project::getAddressBook($prj_id, $issue_id);
Expand Down
101 changes: 39 additions & 62 deletions templates/edit_reporter.tpl.html
@@ -1,73 +1,50 @@
{include file="header.tpl.html"}

<br />
{extends "base_full.tpl.html"}
{block page_id}edit_reporter{/block}
{block title}{t 1=$smarty.get.id|intval}Issue #%1 - Edit Reporter{/t}{/block}

{block "content"}
{literal}
<script type="text/javascript">
<!--
function validate(f)
{
if (isWhitespace(f.email.value)) {
alert('{/literal}{t escape=js}Please enter a valid email address.{/t}{literal}');
selectField(f, 'email');
return false;
<!--
function validate()
{
if (!Validation.isEmail(Eventum.getField('email').val())) {
alert('{/literal}{t escape=js}Please enter a valid email address.{/t}{literal}');
Validation.selectField('email');
return false;
}
return true;
}
return true;
}
//-->
//-->
</script>
{/literal}
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<script type="text/javascript" src="{$rel_url}js/overlib_mini.js?c=d23a"></script>
<table width="100%" bgcolor="{$cell_color}" border="0" cellspacing="0" cellpadding="1" align="center">
<tr>
<td>
<table bgcolor="#FFFFFF" width="100%" cellspacing="1" cellpadding="2">
<form name="reporter_form" onSubmit="return validate(this);" method="post" action="{$smarty.server.PHP_SELF}">
<input type="hidden" name="cat" value="update">
<input type="hidden" name="id" value="{$smarty.get.id|intval}">
<input type="hidden" name="issue_id" value="{$issue_id|intval}">
{if $current_role > $roles.reporter}
<tr>
<td colspan="2" class="default">
<b>{t}Project Reporters{/t}</b>
</td>
</tr>
{if $insert_result != ""}
<tr>
<td colspan="2" bgcolor="{$cell_color}" align="center" class="error">
{if $insert_result == -1}
{t}An error occurred while trying to update the Reporter.{/t}
{elseif $insert_result == 1}
{t}Thank you, the Reporter was updated successfully.{/t}
{/if}
</td>
<form name="reporter_form" onSubmit="return validate();" method="post" action="{$smarty.server.PHP_SELF}">
<input type="hidden" name="cat" value="update">
<input type="hidden" name="id" value="{$smarty.get.id|intval}">
<input type="hidden" name="issue_id" value="{$issue_id|intval}">
<table class="bordered narrow">
{if $core.current_role > $core.roles.reporter}
<tr class="title">
<th colspan="2">
{t}Project Reporters{/t}
</th>
</tr>
{/if}
<tr>
<td width="120" bgcolor="{$cell_color}" class="default_white">
<b>{t}Reporter{/t}:</b>
</td>
<td bgcolor="{$light_color}">
<input type="text" name="email" size="40" class="default" value="{$info.sub_email}">
{if not ($os.mac and $browser.ie)}<a href="javascript:void(null);" onClick="return overlib(getFillInput('{include file="lookup_layer.tpl.html" list=$allowed_reporters}', 'reporter_form', 'email'), STICKY, HEIGHT, 50, WIDTH, 160, BELOW, LEFT, CLOSECOLOR, '#FFFFFF', FGCOLOR, '#FFFFFF', BGCOLOR, '#333333', CAPTION, 'Lookup Details', CLOSECLICK);" onMouseOut="nd();"><img src="{$rel_url}images/lookup.gif" border="0"></a>{/if}
{include file="error_icon.tpl.html" field="email"}
</td>
<th width="120">
{t}Reporter{/t}:
</th>
<td>
<input type="text" name="email" size="40" value="">
{include file="error_icon.tpl.html" field="email"}
</td>
</tr>
<tr>
<td colspan="2" bgcolor="{$cell_color}" align="center">
<input class="button" type="submit" value="{t}Save Reporter{/t}">
<input type="button" value="{t}Cancel{/t}" class="button" onClick="closeAndRefresh();">
</td>
<tr class="buttons">
<td colspan="2">
<input class="button" type="submit" value="{t}Save Reporter{/t}">
<input type="button" value="{t}Cancel{/t}" class="button" onClick="history.go(-1);">
</td>
</tr>
</form>
{/if}
</table>
</td>
</tr>
</table>

<br />

{include file="app_info.tpl.html"}
{include file="footer.tpl.html"}
</table>
</form>
{/block}
1 change: 0 additions & 1 deletion templates/lookup_layer.tpl.html

This file was deleted.

1 change: 0 additions & 1 deletion templates/notification.tpl.html
Expand Up @@ -85,7 +85,6 @@
</td>
<td nowrap>
<input type="text" name="email" size="40" value="{if $info.sub_email|default:'' != ''}{$info.sub_email}{else}{$core.user.usr_email}{/if}">
<a href="javascript:void(null);" onClick="return overlib(getFillInput('{include file="lookup_layer.tpl.html" list=$assoc_users}', 'notification_form', 'email'), STICKY, HEIGHT, 50, WIDTH, 160, BELOW, LEFT, CLOSECOLOR, '#FFFFFF', FGCOLOR, '#FFFFFF', BGCOLOR, '#333333', CAPTION, 'Lookup Details', CLOSECLICK);" onMouseOut="nd();"><img src="{$core.rel_url}images/lookup.gif" border="0"></a>
{include file="error_icon.tpl.html" field="email"}
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion templates/view_form.tpl.html
Expand Up @@ -42,7 +42,7 @@
{t}Issue Overview{/t}</b> (ID: <a href="{$core.rel_url}view.php?id={$issue.iss_id}" title="{t}view issue details{/t}">{$issue.iss_id}</a>)
<div id="issue_menu">
{if $core.current_role > $core.roles.customer}
[ <a class="link" title="{t}Edit the Reporter for this issue{/t}" href="javascript:void(null);" onClick="javascript:openReporter({$smarty.get.id});">{t}Edit Reporter{/t}</a> ]
[ <a class="link" title="{t}Edit the Reporter for this issue{/t}" href="edit_reporter.php?iss_id={$issue_id}">{t}Edit Reporter{/t}</a> ]
[ <a title="{t}edit the authorized repliers list for this issue{/t}" href="authorized_replier.php?iss_id={$issue_id}" class="open_ar">{t}Edit Authorized Replier List{/t}</a> ]
[ <a title="{t}edit the notification list for this issue{/t}" href="notification.php?iss_id={$issue_id}" class="open_nl">{t}Edit Notification List{/t}</a> ]
{/if}
Expand Down

0 comments on commit 43cc7ae

Please sign in to comment.