Exemplo n.º 1
0
        		<tr>
           			<td style="vertical-align:middle;"><label  ><?php 
echo __('Short name');
?>
</label><br />
					<p class="detail"><?php 
echo $test_applicant_detail->getShortName() ? $test_applicant_detail->getShortName() : '-';
?>
</p>
                    </td>
           			<td style="vertical-align:middle;"><label  ><?php 
echo __('Nationality');
?>
</label><br />
					<p class="detail"><b><?php 
$ctr = CountryPeer::retrieveByPk($test_applicant_detail->getNationality());
echo $test_applicant_detail->getNationality() ? $ctr->toString() : '-';
?>
</b></p>
                    </td>
           			<td style="vertical-align:middle;"><label  ><?php 
echo __('Religion');
?>
</label><br />
					<p class="detail"><b><?php 
echo $test_applicant_detail->getReligion() ? $test_applicant_detail->getReligion()->toString() : '-';
?>
</b></p>
                    </td>
        		</tr>
                
Exemplo n.º 2
0
                    <td width="2%" style="text-align:center; vertical-align:middle;">:</td>
					<td style="vertical-align:middle;">
					<p class="detail" style="font-weight: bold;"><?php 
echo $student_detail->getShortName() ? $student_detail->getShortName() : '';
?>
</p>                    
                    </td>
                    <td style="vertical-align:middle;"><label><?php 
echo __('Nationality');
?>
</label></td>
                    <td width="2%" style="text-align:center; vertical-align:middle;">:</td>
					<td style="vertical-align:middle;">
                    <p class="detail" style="font-weight: bold;">
					<?php 
$ctr = CountryPeer::retrieveByPk($student_detail->getNationality());
echo $student_detail->getNationality() ? $ctr->toString() : '';
?>
</p>
                    </td>
                </tr>

                <tr>    
                   	<td style="vertical-align:middle;"><label  ><?php 
echo __('Sex');
?>
</label></td>
                    <td width="2%" style="text-align:center; vertical-align:middle;">:</td>
					<td style="vertical-align:middle;">
					<p class="detail">
					<?php 
Exemplo n.º 3
0
 public function executeDelete()
 {
     $country = CountryPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($country);
     $ref_error = 0;
     foreach ($country->getRefCountMethods() as $ref) {
         $method = "count" . $ref['affix'];
         $count = $country->{$method}();
         if ($count > 0) {
             ++$ref_error;
             $this->getRequest()->setError('country/delete/' . sfInflector::camelize($ref['table']), $count);
         }
     }
     if ($ref_error > 0) {
         $this->getRequest()->setError('country/delete', '_ERR_DELETE_ (' . $country->toString() . ' - id:' . $country->getId() . ')');
     } else {
         $country->delete();
     }
     return $this->forward('country', 'list');
 }