@@ -73,7 +73,7 @@ |
||
| 73 | 73 | |
| 74 | 74 | // see if the groups has items |
| 75 | 75 | foreach ($item['groups'] as $groupName => $groupItem) { |
| 76 | - if (count($groupItem['items']) > 0) { |
|
| 76 | + if (count($groupItem['items']) > 0) { |
|
| 77 | 77 | if ($permissionGranted) { |
| 78 | 78 | continue; |
| 79 | 79 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | // do we have option params for the button |
| 25 | 25 | $params = (array_key_exists('params', $options)) ? $options['params'] : []; |
| 26 | 26 | // create the angular controller name |
| 27 | - $controller = 'Controller'.Inflector::camelize($value) . Inflector::camelize($callback); |
|
| 27 | + $controller = 'Controller'.Inflector::camelize($value).Inflector::camelize($callback); |
|
| 28 | 28 | // render and return the view with the specific params |
| 29 | 29 | return $this->render('@admin/views/aws/base/_callbackButton', [ |
| 30 | 30 | 'angularCrudControllerName' => $controller, |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | public function getHashName() |
| 75 | 75 | { |
| 76 | 76 | if ($this->_hashName === null) { |
| 77 | - $this->_hashName = sha1($this->getName() . $this->icon . $this->alias); |
|
| 77 | + $this->_hashName = sha1($this->getName().$this->icon.$this->alias); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | return $this->_hashName; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | private function getFieldId($name) |
| 62 | 62 | { |
| 63 | - return Inflector::camel2id($this->id . $name); |
|
| 63 | + return Inflector::camel2id($this->id.$name); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | public function run() |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | // do we have option params for the button |
| 70 | 70 | $params = (array_key_exists('params', $this->options)) ? $this->options['params'] : []; |
| 71 | 71 | // create the angular controller name |
| 72 | - $controller = 'Controller'.Inflector::camelize($this->id) . Inflector::camelize($this->callback) . time(); |
|
| 72 | + $controller = 'Controller'.Inflector::camelize($this->id).Inflector::camelize($this->callback).time(); |
|
| 73 | 73 | // render and return the view with the specific params |
| 74 | 74 | return $this->render('@admin/views/aws/base/_callbackForm', [ |
| 75 | 75 | 'angularCrudControllerName' => $controller, |
@@ -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 |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | $curl->get('https://maps.googleapis.com/maps/api/geocode/json?', ['key' => $this->mapsApiKey, 'address' => $address]); |
| 55 | 55 | |
| 56 | 56 | if ($curl->error) { |
| 57 | - return $this->sendError('Error while getting data from google maps API: ' . $curl->error_message); |
|
| 57 | + return $this->sendError('Error while getting data from google maps API: '.$curl->error_message); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | $response = Json::decode($curl->response); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | |
| 58 | 58 | foreach ($imageList as $image) { |
| 59 | 59 | if (array_key_exists($image['file_id'], $allStorageFileEntries)) { |
| 60 | - $filterImage = $image['filter_id'] . '_' . $allStorageFileEntries[$image['file_id']]['name_new_compound']; |
|
| 60 | + $filterImage = $image['filter_id'].'_'.$allStorageFileEntries[$image['file_id']]['name_new_compound']; |
|
| 61 | 61 | foreach ($storageFileList as $key => $file) { |
| 62 | 62 | if ($filterImage == pathinfo($file, PATHINFO_BASENAME)) { |
| 63 | 63 | unset($storageFileList[$key]); |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <script> |
| 2 | - activeWindowCallbackUrl = '<?php echo $activeWindowCallbackUrl;?>'; |
|
| 2 | + activeWindowCallbackUrl = '<?php echo $activeWindowCallbackUrl; ?>'; |
|
| 3 | 3 | ngrestConfigHash = '<?php echo $config->hash; ?>'; |
| 4 | 4 | zaa.bootstrap.register('<?php echo $config->hash; ?>', function($scope, $controller) { |
| 5 | 5 | /* extend class */ |
@@ -1,1 +1,1 @@ |
||
| 1 | -<script>activeWindowCallbackUrl='<?php echo $activeWindowCallbackUrl;?>'; ngrestConfigHash='<?php echo $config->hash; ?>'; zaa.bootstrap.register('<?php echo $config->hash; ?>', function($scope, $controller){/* extend class */ $.extend(this, $controller('CrudController',{$scope : $scope})); /* local controller config */ $scope.config.apiListQueryString='<?php echo $this->context->apiQueryString('list'); ?>'; $scope.config.apiUpdateQueryString='<?php echo $this->context->apiQueryString('update'); ?>'; $scope.config.apiEndpoint='<?php echo $this->context->getRestUrl(); ?>'; $scope.config.list=<?php echo $this->context->getFieldsJson('list'); ?>; $scope.config.create=<?php echo $this->context->getFieldsJson('create'); ?>; $scope.config.update=<?php echo $this->context->getFieldsJson('update'); ?>; $scope.config.ngrestConfigHash='<?php echo $config->hash; ?>'; $scope.config.activeWindowCallbackUrl='<?php echo $activeWindowCallbackUrl; ?>'; $scope.config.pk='<?php echo $this->context->getPrimaryKey(); ?>';});</script><div ng-controller="<?php echo $config->hash; ?>" ng-init="init()"><div style="visibility:hidden;" ui-view></div><div> <div class="tabs"> <ul> <li class="tabs__item" ng-class="{'tabs__item--active' : crudSwitchType==0}"> <a class="tabs__anchor" ng-click="switchTo(0)"><i class="material-icons tabs__icon">menu</i> <?php echo \admin\Module::t('ngrest_crud_btn_list'); ?></a> </li><?php if ($canCreate && $config->getPointer('create')): ?> <li class="tabs__item" ng-class="{'tabs__item--active' : crudSwitchType==1}"> <a class="tabs__anchor" style="" ng-click="switchTo(1)"><i class="material-icons tabs__icon">add_box</i> <?php echo \admin\Module::t('ngrest_crud_btn_add'); ?></a> </li><?php endif; ?> <li ng-show="crudSwitchType==2" class="tabs__item" ng-class="{'tabs__item--active' : crudSwitchType==2}"> <a class="tabs__anchor" ng-click="switchTo(0)"><i class="material-icons tabs__icon">cancel</i> <?php echo \admin\Module::t('ngrest_crud_btn_close'); ?></a> </li></ul> </div><div class="langswitch crud__langswitch" ng-if="crudSwitchType!==0"> <a ng-repeat="lang in AdminLangService.data" ng-click="AdminLangService.toggleSelection(lang)" ng-class="{'langswitch__item--active' : AdminLangService.isInSelection(lang.short_code)}" class="langswitch__item [ waves-effect waves-blue][ btn-flat btn--small btn--bold] ng-binding ng-scope"> <span class="flag flag--{{lang.short_code}}"> <span class="flag__fallback">{{lang.name}}</span> </span> </a> </div><div class="card-panel" ng-show="crudSwitchType==0"> <div style="margin-bottom:30px;"> <div class="input input--text"> <div class="input__field-wrapper"> <input class="input__field" id="searchString" ng-model="searchString" ng-change="evalSearchString()" type="text" placeholder="<?php echo \admin\Module::t('ngrest_crud_search_text'); ?>"/> </div></div></div><div ng-show="deleteErrors.length"> <div class="alert alert--danger"> <ul> <li ng-repeat="e in deleteErrors">{{e}}</li></ul> </div></div><table class="striped responsive-table hoverable"> <thead> <tr> <?php foreach ($config->getPointer('list') as $item): ?> <th><?php echo $item['alias']; ?> <i ng-click="changeOrder('<?php echo $item['name']; ?>', '+')" ng-class="{'active-orderby' : isOrderBy('+<?php echo $item['name']; ?>')}" class="material-icons grid-sort-btn">keyboard_arrow_up</i> <i ng-click="changeOrder('<?php echo $item['name']; ?>', '-')" ng-class="{'active-orderby' : isOrderBy('-<?php echo $item['name']; ?>')}" class="material-icons grid-sort-btn">keyboard_arrow_down</i></th> <?php endforeach; ?> <?php if (count($this->context->getButtons()) > 0): ?> <th style="text-align:right;"><span class="grid-data-length">{{data.list.length}} <?php echo \admin\Module::t('ngrest_crud_rows_count'); ?></span></th> <?php endif; ?> </tr></thead> <tbody> <tr ng-repeat="(key, item) in data.list | srcbox:searchString" ng-class="{'crud__item-highlight': isHighlighted(item)}"> <?php foreach ($config->getPointer('list') as $item): ?> <?php foreach ($this->context->createElements($item, \admin\ngrest\render\RenderCrud::TYPE_LIST) as $element): ?> <td><?php echo $element['html']; ?></td><?php endforeach; ?> <?php endforeach; ?> <?php if (count($this->context->getButtons()) > 0): ?> <td style="text-align:right;"> <?php foreach ($this->context->getButtons() as $item): ?> <a class="waves-effect waves-light btn-flat btn--bordered" ng-click="<?php echo $item['ngClick']; ?>"><i class="material-icons<?php if (!empty($item['label'])): ?> left<?php endif; ?>"><?php echo $item['icon']; ?></i><?php echo $item['label']; ?></a> <?php endforeach; ?> </td><?php endif; ?> </tr></tbody> </table> <div ng-show="data.list.length==0" class="alert alert--info"><?php echo \admin\Module::t('ngrest_crud_empty_row'); ?></div></div><div class="card-panel" ng-show="crudSwitchType==1" zaa-esc="closeCreate()"> <?php if ($canCreate && $config->getPointer('create')): ?> <form name="formCreate" role="form" ng-submit="submitCreate()"> <div class="modal__content"> <?php foreach ($config->getPointer('create') as $k=> $item): ?> <div class="row"> <?php foreach ($this->context->createElements($item, \admin\ngrest\render\RenderCrud::TYPE_CREATE) as $element): ?> <?php echo $element['html']; ?> <?php endforeach; ?> </div><?php endforeach; ?> <div class="red lighten-2" style="color:white;" ng-show="createErrors.length"> <ul> <li ng-repeat="error in createErrors" style="padding:6px;">-{{error.message}}</li></ul> </div></div><div class="modal__footer"> <div class="row"> <div class="col s12"> <div class="right"> <button class="btn waves-effect waves-light" type="submit" ng-disabled="createForm.$invalid"> <?php echo \admin\Module::t('ngrest_crud_btn_create'); ?> <i class="material-icons right">check</i> </button> <button class="btn waves-effect waves-light red" type="button" ng-click="closeCreate()"> <i class="material-icons left">cancel</i> <?php echo \admin\Module::t('button_abort'); ?> </button> </div></div></div></div></form> <?php endif; ?> </div><div class="card-panel" ng-show="crudSwitchType==2" zaa-esc="closeUpdate()"> <?php if ($canUpdate && $config->getPointer('update')): ?> <form name="formUpdate" role="form" ng-submit="submitUpdate()"> <div class="modal__content"> <?php foreach ($config->getPointer('update') as $k=> $item): ?> <div class="row"> <?php foreach ($this->context->createElements($item, \admin\ngrest\render\RenderCrud::TYPE_UPDATE) as $element): ?> <?php echo $element['html']; ?> <?php endforeach; ?> </div><?php endforeach; ?> <div class="red lighten-2" style="color:white;" ng-show="updateErrors.length"> <ul> <li ng-repeat="error in updateErrors" style="padding:6px;">-{{error.message}}</li></ul> </div></div><div class="modal__footer"> <div class="row"> <div class="col s12"> <div class="right"> <button class="btn waves-effect waves-light" type="submit" ng-disabled="updateForm.$invalid"> <?php echo \admin\Module::t('button_save'); ?> <i class="material-icons right">check</i> </button> <button class="btn waves-effect waves-light red" type="button" ng-click="closeUpdate()"> <i class="material-icons left">cancel</i> <?php echo \admin\Module::t('button_abort'); ?> </button> </div></div></div></div></form> <?php endif; ?> </div></div><div ng-show="activeWindowModal" class="modal__wrapper" zaa-esc="closeActiveWindow()"> <div class="modal"> <button class="btn waves-effect waves-light modal__close btn-floating red" type="button" ng-click="closeActiveWindow()"> <i class="material-icons">close</i> </button> <div class="modal-content" compile-html ng-bind-html="data.aw.content"></div></div><div class="modal__background"></div></div></div> |
|
| 2 | 1 | \ No newline at end of file |
| 2 | +<script>activeWindowCallbackUrl='<?php echo $activeWindowCallbackUrl; ?>'; ngrestConfigHash='<?php echo $config->hash; ?>'; zaa.bootstrap.register('<?php echo $config->hash; ?>', function($scope, $controller){/* extend class */ $.extend(this, $controller('CrudController',{$scope : $scope})); /* local controller config */ $scope.config.apiListQueryString='<?php echo $this->context->apiQueryString('list'); ?>'; $scope.config.apiUpdateQueryString='<?php echo $this->context->apiQueryString('update'); ?>'; $scope.config.apiEndpoint='<?php echo $this->context->getRestUrl(); ?>'; $scope.config.list=<?php echo $this->context->getFieldsJson('list'); ?>; $scope.config.create=<?php echo $this->context->getFieldsJson('create'); ?>; $scope.config.update=<?php echo $this->context->getFieldsJson('update'); ?>; $scope.config.ngrestConfigHash='<?php echo $config->hash; ?>'; $scope.config.activeWindowCallbackUrl='<?php echo $activeWindowCallbackUrl; ?>'; $scope.config.pk='<?php echo $this->context->getPrimaryKey(); ?>';});</script><div ng-controller="<?php echo $config->hash; ?>" ng-init="init()"><div style="visibility:hidden;" ui-view></div><div> <div class="tabs"> <ul> <li class="tabs__item" ng-class="{'tabs__item--active' : crudSwitchType==0}"> <a class="tabs__anchor" ng-click="switchTo(0)"><i class="material-icons tabs__icon">menu</i> <?php echo \admin\Module::t('ngrest_crud_btn_list'); ?></a> </li><?php if ($canCreate && $config->getPointer('create')): ?> <li class="tabs__item" ng-class="{'tabs__item--active' : crudSwitchType==1}"> <a class="tabs__anchor" style="" ng-click="switchTo(1)"><i class="material-icons tabs__icon">add_box</i> <?php echo \admin\Module::t('ngrest_crud_btn_add'); ?></a> </li><?php endif; ?> <li ng-show="crudSwitchType==2" class="tabs__item" ng-class="{'tabs__item--active' : crudSwitchType==2}"> <a class="tabs__anchor" ng-click="switchTo(0)"><i class="material-icons tabs__icon">cancel</i> <?php echo \admin\Module::t('ngrest_crud_btn_close'); ?></a> </li></ul> </div><div class="langswitch crud__langswitch" ng-if="crudSwitchType!==0"> <a ng-repeat="lang in AdminLangService.data" ng-click="AdminLangService.toggleSelection(lang)" ng-class="{'langswitch__item--active' : AdminLangService.isInSelection(lang.short_code)}" class="langswitch__item [ waves-effect waves-blue][ btn-flat btn--small btn--bold] ng-binding ng-scope"> <span class="flag flag--{{lang.short_code}}"> <span class="flag__fallback">{{lang.name}}</span> </span> </a> </div><div class="card-panel" ng-show="crudSwitchType==0"> <div style="margin-bottom:30px;"> <div class="input input--text"> <div class="input__field-wrapper"> <input class="input__field" id="searchString" ng-model="searchString" ng-change="evalSearchString()" type="text" placeholder="<?php echo \admin\Module::t('ngrest_crud_search_text'); ?>"/> </div></div></div><div ng-show="deleteErrors.length"> <div class="alert alert--danger"> <ul> <li ng-repeat="e in deleteErrors">{{e}}</li></ul> </div></div><table class="striped responsive-table hoverable"> <thead> <tr> <?php foreach ($config->getPointer('list') as $item): ?> <th><?php echo $item['alias']; ?> <i ng-click="changeOrder('<?php echo $item['name']; ?>', '+')" ng-class="{'active-orderby' : isOrderBy('+<?php echo $item['name']; ?>')}" class="material-icons grid-sort-btn">keyboard_arrow_up</i> <i ng-click="changeOrder('<?php echo $item['name']; ?>', '-')" ng-class="{'active-orderby' : isOrderBy('-<?php echo $item['name']; ?>')}" class="material-icons grid-sort-btn">keyboard_arrow_down</i></th> <?php endforeach; ?> <?php if (count($this->context->getButtons()) > 0): ?> <th style="text-align:right;"><span class="grid-data-length">{{data.list.length}} <?php echo \admin\Module::t('ngrest_crud_rows_count'); ?></span></th> <?php endif; ?> </tr></thead> <tbody> <tr ng-repeat="(key, item) in data.list | srcbox:searchString" ng-class="{'crud__item-highlight': isHighlighted(item)}"> <?php foreach ($config->getPointer('list') as $item): ?> <?php foreach ($this->context->createElements($item, \admin\ngrest\render\RenderCrud::TYPE_LIST) as $element): ?> <td><?php echo $element['html']; ?></td><?php endforeach; ?> <?php endforeach; ?> <?php if (count($this->context->getButtons()) > 0): ?> <td style="text-align:right;"> <?php foreach ($this->context->getButtons() as $item): ?> <a class="waves-effect waves-light btn-flat btn--bordered" ng-click="<?php echo $item['ngClick']; ?>"><i class="material-icons<?php if (!empty($item['label'])): ?> left<?php endif; ?>"><?php echo $item['icon']; ?></i><?php echo $item['label']; ?></a> <?php endforeach; ?> </td><?php endif; ?> </tr></tbody> </table> <div ng-show="data.list.length==0" class="alert alert--info"><?php echo \admin\Module::t('ngrest_crud_empty_row'); ?></div></div><div class="card-panel" ng-show="crudSwitchType==1" zaa-esc="closeCreate()"> <?php if ($canCreate && $config->getPointer('create')): ?> <form name="formCreate" role="form" ng-submit="submitCreate()"> <div class="modal__content"> <?php foreach ($config->getPointer('create') as $k=> $item): ?> <div class="row"> <?php foreach ($this->context->createElements($item, \admin\ngrest\render\RenderCrud::TYPE_CREATE) as $element): ?> <?php echo $element['html']; ?> <?php endforeach; ?> </div><?php endforeach; ?> <div class="red lighten-2" style="color:white;" ng-show="createErrors.length"> <ul> <li ng-repeat="error in createErrors" style="padding:6px;">-{{error.message}}</li></ul> </div></div><div class="modal__footer"> <div class="row"> <div class="col s12"> <div class="right"> <button class="btn waves-effect waves-light" type="submit" ng-disabled="createForm.$invalid"> <?php echo \admin\Module::t('ngrest_crud_btn_create'); ?> <i class="material-icons right">check</i> </button> <button class="btn waves-effect waves-light red" type="button" ng-click="closeCreate()"> <i class="material-icons left">cancel</i> <?php echo \admin\Module::t('button_abort'); ?> </button> </div></div></div></div></form> <?php endif; ?> </div><div class="card-panel" ng-show="crudSwitchType==2" zaa-esc="closeUpdate()"> <?php if ($canUpdate && $config->getPointer('update')): ?> <form name="formUpdate" role="form" ng-submit="submitUpdate()"> <div class="modal__content"> <?php foreach ($config->getPointer('update') as $k=> $item): ?> <div class="row"> <?php foreach ($this->context->createElements($item, \admin\ngrest\render\RenderCrud::TYPE_UPDATE) as $element): ?> <?php echo $element['html']; ?> <?php endforeach; ?> </div><?php endforeach; ?> <div class="red lighten-2" style="color:white;" ng-show="updateErrors.length"> <ul> <li ng-repeat="error in updateErrors" style="padding:6px;">-{{error.message}}</li></ul> </div></div><div class="modal__footer"> <div class="row"> <div class="col s12"> <div class="right"> <button class="btn waves-effect waves-light" type="submit" ng-disabled="updateForm.$invalid"> <?php echo \admin\Module::t('button_save'); ?> <i class="material-icons right">check</i> </button> <button class="btn waves-effect waves-light red" type="button" ng-click="closeUpdate()"> <i class="material-icons left">cancel</i> <?php echo \admin\Module::t('button_abort'); ?> </button> </div></div></div></div></form> <?php endif; ?> </div></div><div ng-show="activeWindowModal" class="modal__wrapper" zaa-esc="closeActiveWindow()"> <div class="modal"> <button class="btn waves-effect waves-light modal__close btn-floating red" type="button" ng-click="closeActiveWindow()"> <i class="material-icons">close</i> </button> <div class="modal-content" compile-html ng-bind-html="data.aw.content"></div></div><div class="modal__background"></div></div></div> |
|
| 3 | 3 | \ No newline at end of file |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | public function getHttpSource() |
| 146 | 146 | { |
| 147 | - return Yii::$app->storage->httpPath . '/' . $this->itemArray['name_new_compound']; |
|
| 147 | + return Yii::$app->storage->httpPath.'/'.$this->itemArray['name_new_compound']; |
|
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | /** |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | */ |
| 154 | 154 | public function getServerSource() |
| 155 | 155 | { |
| 156 | - return Yii::$app->storage->serverPath . '/' . $this->itemArray['name_new_compound']; |
|
| 156 | + return Yii::$app->storage->serverPath.'/'.$this->itemArray['name_new_compound']; |
|
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |