adding example apps, fixing powerup issues
[feisty_meow.git] / production / example_apps / zippy_maps / src / Template / Locations / distance.ctp
1 <?php
2 /**
3   * @var \App\View\AppView $this
4   */
5 ?>
6 <nav class="large-3 medium-4 columns" id="actions-sidebar">
7     <ul class="side-nav">
8         <li class="heading"><?= __('Actions') ?></li>
9         <li><?= $this->Html->link(__('List Locations'), ['action' => 'index']) ?></li>
10     </ul>
11 </nav>
12 <div class="locations form large-9 medium-8 columns content">
13     <?= $this->Form->create('DistanceCalculator') ?>
14     <fieldset>
15         <legend><?= __('Calculate Distance') ?></legend>
16         <?php
17                         echo $this->Form->control('from._ids', [
18                 'type' => 'select',
19                 'options' => $locationsFrom,
20                 'value' => $fromId,
21                         ]);
22                         
23                         if ($fromAddress !== null) {
24                                 echo $this->Form->control('from-address', [
25                                         'type' => 'textarea',
26                                         'rows' => 1,
27                                         'default' => $fromAddress,
28                                         'disabled' => 'disabled'
29                                 ]);                             
30                         }
31             
32                         echo $this->Form->control('to._ids', [
33                 'type' => 'select',
34                 'options' => $locationsTo,
35                 'value' => $toId,
36                         ]);
37
38                         if ($toAddress !== null) {
39                                 echo $this->Form->control('to-address', [
40                                         'type' => 'textarea',
41                                         'rows' => 1,
42                                         'default' => $toAddress,
43                                         'disabled' => 'disabled'
44                                 ]);                             
45                         }
46                         
47                         echo $this->Form->control('distance', [
48                                 'type' => 'textarea',
49                                 'rows' => 1,
50                                 'default' => $distanceCalculated,
51                                 'disabled' => 'disabled'
52                         ]);
53                                     
54         ?>
55     </fieldset>
56     <?= $this->Form->button(__('Calculate')) ?>
57     <?= $this->Form->end() ?>
58 </div>