@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @var $className |
|
4 | - * @var $namespace |
|
5 | - * @var $luya |
|
6 | - * @var $moduleId |
|
7 | - * @var $alias |
|
8 | - */ |
|
3 | + * @var $className |
|
4 | + * @var $namespace |
|
5 | + * @var $luya |
|
6 | + * @var $moduleId |
|
7 | + * @var $alias |
|
8 | + */ |
|
9 | 9 | |
10 | 10 | echo "<?php\n"; |
11 | 11 | ?> |
@@ -24,9 +24,9 @@ |
||
24 | 24 | public function config() |
25 | 25 | { |
26 | 26 | return [ |
27 | - 'vars' => [ |
|
27 | + 'vars' => [ |
|
28 | 28 | ['var' => 'soundUrl', 'label' => 'Embeded Code', 'type' => 'zaa-text'], |
29 | - ], |
|
29 | + ], |
|
30 | 30 | ]; |
31 | 31 | } |
32 | 32 |
@@ -125,7 +125,7 @@ |
||
125 | 125 | '{% if extras.name and extras.email and extras.message %}'. |
126 | 126 | '{% if extras.mailerResponse == "success" %}'. |
127 | 127 | '<div class="alert alert-success">{{ extras.sendSuccess }}</div>'. |
128 | - '{% else %}'. |
|
128 | + '{% else %}'. |
|
129 | 129 | '<div class="alert alert-danger">{{ extras.sendError }}</div>'. |
130 | 130 | '{% endif %}'. |
131 | 131 | '{% endif %}'. |
@@ -24,7 +24,7 @@ |
||
24 | 24 | public function config() |
25 | 25 | { |
26 | 26 | return [ |
27 | - 'vars' => [ |
|
27 | + 'vars' => [ |
|
28 | 28 | ['var' => 'lineSpace', 'label' => Module::t('block_line_linespace_label'), 'type' => 'zaa-select', 'options' => [ |
29 | 29 | ['value' => '5px', 'label' => '5px ' . Module::t('block_line_linespace_space')], |
30 | 30 | ['value' => '10px', 'label' => '10px ' . Module::t('block_line_linespace_space')], |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @var $model |
|
4 | - */ |
|
3 | + * @var $model |
|
4 | + */ |
|
5 | 5 | ?> |
6 | 6 | <h1 style="color: #f00;"><?php echo $model->message; ?></h1> |
7 | 7 | <p style="color: #800000;">from <strong><?php echo $model->serverName; ?></strong></p> |
@@ -102,7 +102,7 @@ |
||
102 | 102 | * @todo http://php.net/manual/en/features.file-upload.errors.php |
103 | 103 | * |
104 | 104 | * @return array|json Key represents the uploaded file name, value represents the id in the database. |
105 | - */ |
|
105 | + */ |
|
106 | 106 | public function actionFilesUpload() |
107 | 107 | { |
108 | 108 | foreach ($_FILES as $k => $file) { |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * Callculate to number of items when using count() function against the QueryIterator object. |
24 | 24 | * |
25 | 25 | * @return int The number of elements in the object. |
26 | - */ |
|
26 | + */ |
|
27 | 27 | public function count() |
28 | 28 | { |
29 | 29 | return count($this->data); |
@@ -12,59 +12,59 @@ |
||
12 | 12 | */ |
13 | 13 | class CoordinatesActiveWindow extends \admin\ngrest\base\ActiveWindow |
14 | 14 | { |
15 | - public $module = '@admin'; |
|
15 | + public $module = '@admin'; |
|
16 | 16 | |
17 | - public $alias = 'Coordinates'; |
|
17 | + public $alias = 'Coordinates'; |
|
18 | 18 | |
19 | - public $icon = 'pin_drop'; |
|
19 | + public $icon = 'pin_drop'; |
|
20 | 20 | |
21 | - /** |
|
22 | - * @var string Register your maps application and enter your api key here |
|
23 | - * while configure the active window (https://console.developers.google.com). |
|
24 | - */ |
|
25 | - public $mapsApiKey = null; |
|
21 | + /** |
|
22 | + * @var string Register your maps application and enter your api key here |
|
23 | + * while configure the active window (https://console.developers.google.com). |
|
24 | + */ |
|
25 | + public $mapsApiKey = null; |
|
26 | 26 | |
27 | - /** |
|
28 | - * {@inheritDoc} |
|
29 | - * @see \admin\ngrest\base\ActiveWindow::init() |
|
30 | - */ |
|
31 | - public function init() |
|
32 | - { |
|
33 | - if ($this->mapsApiKey === null) { |
|
34 | - throw new Exception('A google maps API key can not be null.'); |
|
35 | - } |
|
36 | - } |
|
27 | + /** |
|
28 | + * {@inheritDoc} |
|
29 | + * @see \admin\ngrest\base\ActiveWindow::init() |
|
30 | + */ |
|
31 | + public function init() |
|
32 | + { |
|
33 | + if ($this->mapsApiKey === null) { |
|
34 | + throw new Exception('A google maps API key can not be null.'); |
|
35 | + } |
|
36 | + } |
|
37 | 37 | |
38 | - /** |
|
39 | - * Renders the index file of the ActiveWindow. |
|
40 | - * |
|
41 | - * @return string The render index file. |
|
42 | - */ |
|
43 | - public function index() |
|
44 | - { |
|
45 | - return $this->render('index', [ |
|
46 | - 'id' => $this->itemId, |
|
47 | - 'mapsApiKey' => $this->mapsApiKey, |
|
48 | - ]); |
|
49 | - } |
|
38 | + /** |
|
39 | + * Renders the index file of the ActiveWindow. |
|
40 | + * |
|
41 | + * @return string The render index file. |
|
42 | + */ |
|
43 | + public function index() |
|
44 | + { |
|
45 | + return $this->render('index', [ |
|
46 | + 'id' => $this->itemId, |
|
47 | + 'mapsApiKey' => $this->mapsApiKey, |
|
48 | + ]); |
|
49 | + } |
|
50 | 50 | |
51 | - public function callbackGetCoordinates($address) |
|
52 | - { |
|
53 | - $curl = new Curl(); |
|
54 | - $curl->get('https://maps.googleapis.com/maps/api/geocode/json?', ['key' => $this->mapsApiKey, 'address' => $address]); |
|
51 | + public function callbackGetCoordinates($address) |
|
52 | + { |
|
53 | + $curl = new Curl(); |
|
54 | + $curl->get('https://maps.googleapis.com/maps/api/geocode/json?', ['key' => $this->mapsApiKey, 'address' => $address]); |
|
55 | 55 | |
56 | - if ($curl->error) { |
|
57 | - return $this->sendError('Error while getting data from google maps API: ' . $curl->error_message); |
|
58 | - } |
|
56 | + if ($curl->error) { |
|
57 | + return $this->sendError('Error while getting data from google maps API: ' . $curl->error_message); |
|
58 | + } |
|
59 | 59 | |
60 | - $response = Json::decode($curl->response); |
|
60 | + $response = Json::decode($curl->response); |
|
61 | 61 | |
62 | - if (!isset($response['results']) || !isset($response['results'][0])) { |
|
63 | - return $this->sendError('Error while collecting data for your adresse. Check if you adress was correct and try again.'); |
|
64 | - } |
|
62 | + if (!isset($response['results']) || !isset($response['results'][0])) { |
|
63 | + return $this->sendError('Error while collecting data for your adresse. Check if you adress was correct and try again.'); |
|
64 | + } |
|
65 | 65 | |
66 | - $cords = $response['results'][0]['geometry']['location']; |
|
66 | + $cords = $response['results'][0]['geometry']['location']; |
|
67 | 67 | |
68 | - return $this->sendSuccess('We have found your location and pinned the marker on the submit.', ['cords' => $cords]); |
|
69 | - } |
|
68 | + return $this->sendSuccess('We have found your location and pinned the marker on the submit.', ['cords' => $cords]); |
|
69 | + } |
|
70 | 70 | } |
71 | 71 | \ No newline at end of file |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @param $angularCrudControllerName; |
|
4 | - * @param $callbackName |
|
5 | - * @param $callbackArgumentsJson |
|
6 | - * @param $closeOnSuccess |
|
7 | - * @param $reloadListOnSuccess; |
|
8 | - * @param $buttonNameValue |
|
9 | - */ |
|
3 | + * @param $angularCrudControllerName; |
|
4 | + * @param $callbackName |
|
5 | + * @param $callbackArgumentsJson |
|
6 | + * @param $closeOnSuccess |
|
7 | + * @param $reloadListOnSuccess; |
|
8 | + * @param $buttonNameValue |
|
9 | + */ |
|
10 | 10 | ?> |
11 | 11 | <script> |
12 | 12 | zaa.bootstrap.register('<?php echo $angularCrudControllerName; ?>', function($scope, $controller) { |