Add Bid From Pilot Brief

This may have been covered before but is there a way to Put the ADD BID link on the Pilot Brief page. This would help my pilots so that instead of hitting the back button on their browser they could just add the bid to their schedules from the Pilot brief page. When you use the back tab it bring up all the current schedules. Any ideas? I tried to put the add bid code in from the schedule_results.tpl on to the schedule_briefing.tpl page and all I got was the word ADD BID but it had no action to it.

Thanks for any help in this,

This may have been covered before but is there a way to Put the ADD BID link on the Pilot Brief page. This would help my pilots so that instead of hitting the back button on their browser they could just add the bid to their schedules from the Pilot brief page. When you use the back tab it bring up all the current schedules. Any ideas? I tried to put the add bid code in from the schedule_results.tpl on to the schedule_briefing.tpl page and all I got was the word ADD BID but it had no action to it.

Thanks for any help in this,

You have to copy the entire thing, the exact link with the class and all, and make sure it’s substituting in the proper id variable

You have to copy the entire thing, the exact link with the class and all, and make sure it’s substituting in the proper id variable

an example by chance? Here is what I have copied and pasted

See below for code - Nabeel

Does

echo $route->id;

Match up in that template? I don’t remember. That might be the issue.

Does

echo $route->id;

Match up in that template? I don’t remember. That might be the issue.

See below for code - Nabeel

Instead of $route->id, use $schedule->id

Woooo Hoooo it worked. here is the code I now have on my schedule_briefing.tpl

Thanks so much for the help

<p>
<?php 
	# Don't allow overlapping bids and a bid exists
	if(Config::Get('DISABLE_SCHED_ON_BID') == true && $schedule->bidid != 0)
	{
	?>
		<a id="<?php echo $schedule->id; ?>" class="addbid" 
			href="<?php echo actionurl('/schedules/addbid');?>">Add </a> <?
	}
	else
	{
		if (Auth::LoggedIn())
		{
	 ?><a id="<?php echo $schedule->id; ?>" class="addbid" 
				href="<?php echo url('/schedules/addbid');?>">Add to Mission</a>
		<?php		 
		}
	}		
	?>
</p>

I’m going to rearrange this post and place it into the Code Snippets forum.

Also, this line still said $route, so I changed it:

if(Config::Get('DISABLE_SCHED_ON_BID') == true && $schedule->bidid != 0)

I’m going to rearrange this post and place it into the Code Snippets forum

Works for me you can also added it the view details page as well using the same code.

Is there a way to add this to the pilots view pireps, i have have had a request to have a “add bid” to the viewed pirep, i have added this code but it just gives me invalid route, what is the variable i need to pull this from?

Sorry but I get the following message when I tried this;

Parse error: syntax error, unexpected ‘}’ in C:\xampp\htdocs\adam\auz\phpvms\lib\skins\auz\schedule_briefing.tpl on line 19

I think it has something to do with the last } character as I don’t know what it does, but when I remove it the page shows but is missing the Add Bid code.

Here is my code;

<h3 align=“left”>    <p>    <?php echo ‘<tr><td colspan=2 align=“center” style=“padding:5px 0px 5px 0px;font-weight:bold”><a href=“javascript:history.back()”>« back</a></td>’;?><p>    

<?php

Don’t allow overlapping bids and a bid exists

if(Config::Get(‘DISABLE_SCHED_ON_BID’) == true && $schedule->bidid != 0)

{

?>

<a id=“<?php echo $schedule->id; ?>” class=“addbid”

href=“<?php echo actionurl(‘/schedules/addbid’);?>”>Add </a> <?

}

else

{

if (Auth::LoggedIn())

{

?><a id=“<?php echo $schedule->id; ?>” class=“addbid”

href=“<?php echo url(‘/schedules/addbid’);?>”>Add to Mission</a>

<?php

}

}

?>

</p></h3>

<h3 align=“left”>    Flight Briefing<br />

</h3>

Could you please confirm that the code is still fuctioninal?

Thanks in advance

Adam

Sorry but I get the following message when I tried this;

I think it has something to do with the last } character as I don’t know what it does, but when I remove it the page shows but is missing the Add Bid code.

Here is my code;

Could you please confirm that the code is still fuctioninal?

Thanks in advance

Adam

The Code is still functional.

Is there a way to add this to the pilots view pireps, i have have had a request to have a “add bid” to the viewed pirep, i have added this code but it just gives me invalid route, what is the variable i need to pull this from?

I have tried it on the view my pireps detail page and nothing happened.. I think it is because on the view my pireps page it get the info from the flightnumber id not the schedule id .

hope this helps

To get it to work you need to enter the correct php tag at the end of line 8 ;

<p>

<?php

Don’t allow overlapping bids and a bid exists

if(Config::Get(‘DISABLE_SCHED_ON_BID’) == true && $schedule->bidid != 0)

{

?>

<a id=“<?php echo $schedule->id; ?>” class=“addbid”

href=“<?php echo actionurl(‘/schedules/addbid’);?>”>Add </a>  <?php

}

else

{

if (Auth::LoggedIn())

{

?>

<a id=“<?php echo $schedule->id; ?>” class=“addbid”

href=“<?php echo url(‘/schedules/addbid’);?>”>Add to Mission</a>

<?php

}

}

?>

</p>