| 1 |
<?php use_helper('Object', 'Validation') ?> |
|---|
| 2 |
|
|---|
| 3 |
<?php slot('page_title') ?> |
|---|
| 4 |
<?php $page_title = __('Connect a company to the %application% application', |
|---|
| 5 |
array('%application%' => $application->getName())) ?> |
|---|
| 6 |
<?php echo $page_title ?> |
|---|
| 7 |
<?php end_slot() ?> |
|---|
| 8 |
|
|---|
| 9 |
<?php slot('sidebar') ?> |
|---|
| 10 |
<?php if ($application->getScreenshotPath()): ?> |
|---|
| 11 |
<?php $image = image_tag($application->getFullScreenshotPath(), |
|---|
| 12 |
'class=app_screenshot alt='.$application->getName().' preview') ?> |
|---|
| 13 |
<?php if ($application->getHomepage()): ?> |
|---|
| 14 |
<?php echo link_to($image, $application->getHomepage()) ?> |
|---|
| 15 |
<?php else: ?> |
|---|
| 16 |
<?php echo $image ?> |
|---|
| 17 |
<?php endif; ?> |
|---|
| 18 |
<?php endif; ?> |
|---|
| 19 |
<?php end_slot() ?> |
|---|
| 20 |
|
|---|
| 21 |
<?php echo breadcrumb(array(array(__('Applications'), '@application_home'), |
|---|
| 22 |
array($application->getName(), '@application_page?slug='.$application->getSlug()), |
|---|
| 23 |
$page_title)) ?> |
|---|
| 24 |
|
|---|
| 25 |
<h2><?php echo $page_title ?><span class="gradient"> </span></h2> |
|---|
| 26 |
|
|---|
| 27 |
<p><?php echo __('If one of the companies you\'ve added have ever worked on the %application% application, please fill and submit the form below.', |
|---|
| 28 |
array('%application%' => $application->getName())) ?></p> |
|---|
| 29 |
|
|---|
| 30 |
<p class="form-info"> |
|---|
| 31 |
<?php echo __('Fields marked with a <span class="left-star">star</span> are mandatory.') ?> |
|---|
| 32 |
</p> |
|---|
| 33 |
|
|---|
| 34 |
<form action="<?php echo url_for($sf_data->getRaw('form_action')) ?>" method="post"> |
|---|
| 35 |
<div class="fiftypercent"> |
|---|
| 36 |
<fieldset> |
|---|
| 37 |
<legend><?php echo __('Connection informations') ?></legend> |
|---|
| 38 |
<div class="form-row required"> |
|---|
| 39 |
<label for="company_id"><?php echo __('Company') ?></label> |
|---|
| 40 |
<?php echo select_tag('connection[company_id]', |
|---|
| 41 |
options_for_select($sf_user->getGuardUser()->getCompaniesArray($sf_user->isAdmin() ? 'all' : 'related'), |
|---|
| 42 |
$sf_request->getParameter('connection[company_id]', $connection->getCompanyId()), |
|---|
| 43 |
'include_custom='.__('Select a company'))) ?> |
|---|
| 44 |
<?php echo form_error('connection[company_id]') ?> |
|---|
| 45 |
<div class="form_help"> |
|---|
| 46 |
<?php echo __('You must have already connected to companies to see them appearing in the select box below') ?> |
|---|
| 47 |
</div> |
|---|
| 48 |
</div> |
|---|
| 49 |
<div class="form-row required"> |
|---|
| 50 |
<label for="role"><?php echo __('The company role in this project') ?></label> |
|---|
| 51 |
<?php echo object_input_tag($connection, 'getRole', 'name=connection[role]', $sf_params->get('connection[role]')) ?> |
|---|
| 52 |
<?php echo form_error('connection[role]') ?> |
|---|
| 53 |
</div> |
|---|
| 54 |
<div class="form-row"> |
|---|
| 55 |
<label for="description"><?php echo __('Description of the company mission') ?></label> |
|---|
| 56 |
<?php echo object_textarea_tag($connection, 'getDescription', 'name=connection[description]', $sf_params->get('connection[description]')) ?> |
|---|
| 57 |
<?php echo form_error('connection[description]') ?> |
|---|
| 58 |
</div> |
|---|
| 59 |
</fieldset> |
|---|
| 60 |
</div> |
|---|
| 61 |
<div class="fiftypercent"> |
|---|
| 62 |
<fieldset> |
|---|
| 63 |
<legend><?php echo __('Timeline') ?></legend> |
|---|
| 64 |
<div class="form-row"> |
|---|
| 65 |
<label for="started_at"><?php echo __('Start date of activity (yyyy-mm-dd)') ?></label> |
|---|
| 66 |
<?php echo object_input_date_tag($connection, 'getStartedAt', 'name=connection[started_at] format=Y-MM-dd rich=true class=date_select', $sf_params->get('connection[started_at]')) ?> |
|---|
| 67 |
<?php echo form_error('connection[started_at]') ?> |
|---|
| 68 |
</div> |
|---|
| 69 |
<div class="form-row"> |
|---|
| 70 |
<label for="ended_at"><?php echo __('End date of activity (yyyy-mm-dd)') ?></label> |
|---|
| 71 |
<?php echo object_input_date_tag($connection, 'getEndedAt', 'name=connection[ended_at] format=Y-MM-dd rich=true class=date_select', $sf_params->get('connection[ended_at]')) ?> |
|---|
| 72 |
<?php echo form_error('connection[ended_at]') ?> |
|---|
| 73 |
</div> |
|---|
| 74 |
</fieldset> |
|---|
| 75 |
</div> |
|---|
| 76 |
<div class="form-row" style="text-align:center;clear:left;"> |
|---|
| 77 |
<p> |
|---|
| 78 |
<?php echo button_to(__('Cancel'), '@application_page?slug='.$application->getSlug()) ?> |
|---|
| 79 |
<?php echo submit_tag(__('Connect the company to this application')) ?> |
|---|
| 80 |
</p> |
|---|
| 81 |
</div> |
|---|
| 82 |
</form> |
|---|