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 () ...@@ -394,7 +394,7 @@ $(function ()
.val(end.format("MM/DD/YYYY")); .val(end.format("MM/DD/YYYY"));
$('#reserve-request-form [name=end_hour]') $('#reserve-request-form [name=end_hour]')
.val(end.format("H")); .val(end.format("H"));
console.log(start, end); //console.log(start, end);
// Set the hour selectors properly in the datepicker object. // Set the hour selectors properly in the datepicker object.
$("#reserve-request-form #start_day") $("#reserve-request-form #start_day")
...@@ -405,6 +405,17 @@ $(function () ...@@ -405,6 +405,17 @@ $(function ()
if (!details.approved) { if (!details.approved) {
$('#unapproved-warning').removeClass("hidden"); $('#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, * If this is an admin looking at an unapproved reservation,
* show the approve button * 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='row'>
<div class='col-lg-7 <div class='col-lg-7
col-md-7'> col-md-7'>
...@@ -5,7 +15,7 @@ ...@@ -5,7 +15,7 @@
<div class='panel-heading'> <div class='panel-heading'>
<h3 class='panel-title'> <h3 class='panel-title'>
<% if (editing) { %>Modify <% } %>Reservation Request <% if (editing) { %>Modify <% } %>Reservation Request
<a href='#' class='btn btn-xs' <a hrexsf='#' class='btn btn-xs'
data-toggle='modal' data-toggle='modal'
data-target="#reservation-help-modal"> data-target="#reservation-help-modal">
<span style='margin-bottom: 4px; margin-left: 0px;' <span style='margin-bottom: 4px; margin-left: 0px;'
...@@ -37,6 +47,15 @@ ...@@ -37,6 +47,15 @@
<% } %> <% } %>
<div class='row'> <div class='row'>
<div class='col-sm-12'> <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 (1 || projects) { %>
<% if (projects.length == 1 || editing) { %> <% if (projects.length == 1 || editing) { %>
<div class="form-group"> <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