Commit 9fe85faf authored by Leigh Stoller's avatar Leigh Stoller

Show user making the request on the edit (approve) form.

parent c11d5a39
......@@ -394,7 +394,7 @@ $(function ()
.val(end.format("MM/DD/YYYY"));
$('#reserve-request-form [name=end_hour]')
.val(end.format("H"));
console.log(start, end);
//console.log(start, end);
// Set the hour selectors properly in the datepicker object.
$("#reserve-request-form #start_day")
......@@ -405,6 +405,17 @@ $(function ()
if (!details.approved) {
$('#unapproved-warning').removeClass("hidden");
}
// Local user gets a link.
if (_.has(details, 'creator_idx')) {
$('#reserve-requestor').html(
"<a target=_blank href='user-dashboard.php?user=" +
details.creator_idx + "'>" +
details.creator_uid + "</a>");
}
else {
$('#reserve-requestor').html(details.creator_uid);
}
/*
* If this is an admin looking at an unapproved reservation,
* show the approve button
......
<style>
.form-control-fake {
display: block;
width: 100%;
height: 34px;
padding: 7px 0px;
font-size: 14px;
line-height: 1.42857143;
}
</style>
<div class='row'>
<div class='col-lg-7
col-md-7'>
......@@ -5,7 +15,7 @@
<div class='panel-heading'>
<h3 class='panel-title'>
<% if (editing) { %>Modify <% } %>Reservation Request
<a href='#' class='btn btn-xs'
<a hrexsf='#' class='btn btn-xs'
data-toggle='modal'
data-target="#reservation-help-modal">
<span style='margin-bottom: 4px; margin-left: 0px;'
......@@ -37,6 +47,15 @@
<% } %>
<div class='row'>
<div class='col-sm-12'>
<% if (editing) { %>
<div class="form-group">
<div class="form-control-fake format-me"
data-label="User"
id="reserve-requestor"
data-key="uid">
</div>
</div>
<% } %>
<% if (1 || projects) { %>
<% if (projects.length == 1 || editing) { %>
<div class="form-group">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment