Skip to content
This repository has been archived by the owner on Dec 6, 2019. It is now read-only.

Commit

Permalink
front-end changes for per-schedule pay
Browse files Browse the repository at this point in the history
  • Loading branch information
Nabeel Shahzad committed Feb 20, 2011
1 parent fbd658b commit a5e6189
Show file tree
Hide file tree
Showing 4 changed files with 440 additions and 433 deletions.
13 changes: 9 additions & 4 deletions admin/modules/Operations/Operations.php
Expand Up @@ -277,8 +277,12 @@ public function airportgrid() {
}

# Form the json header
$json = array('page' => $page, 'total' => $total_pages, 'records' => $count,
'rows' => array());
$json = array(
'page' => $page,
'total' => $total_pages,
'records' => $count,
'rows' => array()
);

# Add each row to the above array
foreach ($airports as $row) {
Expand Down Expand Up @@ -840,7 +844,7 @@ protected function add_schedule_post() {
'arrtime' => $this->post->arrtime, 'flighttime' => $this->post->flighttime,
'daysofweek' => $daysofweek,
'week1' => $week1, 'week2' => $week2, 'week3' => $week3, 'week4' => $week4,
'price' => $this->post->price,
'price' => $this->post->price, 'payforflight' => $this->post->payforflight,
'flighttype' => $this->post->flighttype, 'notes' => $this->post->notes,
'enabled' => $enabled);

Expand Down Expand Up @@ -924,7 +928,8 @@ protected function edit_schedule_post() {
'arrtime' => $this->post->arrtime, 'flighttime' => $this->post->flighttime,
'daysofweek' => $daysofweek,
'week1' => $week1, 'week2' => $week2, 'week3' => $week3, 'week4' => $week4,
'price' => $this->post->price, 'flighttype' => $this->post->flighttype, 'notes' => $this->post->notes,
'price' => $this->post->price, 'payforflight' => $this->post->payforflight,
'flighttype' => $this->post->flighttype, 'notes' => $this->post->notes,
'enabled' => $enabled);

$val = SchedulesData::editScheduleFields($this->post->id, $data);
Expand Down
16 changes: 8 additions & 8 deletions admin/templates/ops_scheduleform.tpl
Expand Up @@ -7,14 +7,8 @@
<td>
<select name="code">
<?php

foreach($allairlines as $airline)
{
if($airline->code == $schedule->code)
$sel = 'selected';
else
$sel = '';
foreach($allairlines as $airline) {
$sel = ($airline->code == $schedule->code) ? 'selected' : '';
echo '<option value="'.$airline->code.'" '.$sel.'>'.$airline->code.' - '.$airline->name.'</option>';
}
?>
Expand Down Expand Up @@ -162,6 +156,12 @@
for a cargo flight.</p>
</td>
</tr>
<tr>
<td valign="top"><strong>Pay for Flight</strong> </td>
<td><input type="text" name="payforflight" value="<?php echo $schedule->price?>" />
<p>If a price is entered here, a pilot will be paid this amount, instead of the hourly pay.</p>
</td>
</tr>
<tr>
<td valign="top"><strong>Notes</strong></td>
<td valign="top" style="padding-top: 0px">
Expand Down

0 comments on commit a5e6189

Please sign in to comment.