Skip to content

Commit

Permalink
domain create bug fixed | alias add js problem fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Webklex committed Aug 6, 2017
1 parent e0320be commit ca8a6bf
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/DomainController.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function postCreate(PostDomainCreateRequest $request) {
$mDomain = new Domain();
$mDomain->name = $request->get('name');
$mDomain->active = 1;
$mDomain->save();
$mDomain->users()->attach(auth()->user()->id);
$mDomain->save();

Expand Down
2 changes: 1 addition & 1 deletion public/assets/js/alias.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
vm.data = {
domain_id: null,
source: '',
destination: ['']
destination: []
};

vm.parse = function(json){
vm.domains = JSON.parse(json);
vm.addAlias();
};

vm.addAlias = function(){
Expand Down
4 changes: 2 additions & 2 deletions resources/views/alias/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@

<md-input-container flex="100" ng-repeat="destination in vm.data.destination track by $index">
<label>@t('Target addresses')</label>
<input id="destination_[[$index]]" type="text" ng-model="destination"
<input id="destination_[[$index]]" type="text" ng-model="vm.data.destination[$index]"
name="destination[]" value="" required autocomplete="off">
<md-icon class="material-icons md-color-default" style="display:inline-block;" ng-click="vm.removeAlias($index)">delete</md-icon>
<md-icon class="material-icons md-icon-color-danger clickable" style="display:inline-block;" ng-click="vm.removeAlias($index)">delete</md-icon>
</md-input-container>

<div flex="100">
Expand Down
6 changes: 3 additions & 3 deletions resources/views/alias/update.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@

<md-input-container flex="100" ng-repeat="destination in vm.data.destination track by $index">
<label>@t('Target addresses')</label>
<input id="destination_[[$index]]" type="text" ng-model="destination"
<input id="destination_[[$index]]" type="text" ng-model="vm.data.destination[$index]"
name="destination[]" value="" required autocomplete="off">
<md-icon class="material-icons md-color-default" style="display:inline-block;" ng-click="vm.removeAlias($index)">delete</md-icon>
<md-icon class="material-icons md-color-default clickable" style="display:inline-block;" ng-click="vm.removeAlias($index)">delete</md-icon>
</md-input-container>

<div flex="100">
<md-icon class="material-icons md-color-default" style="float: right; border: 1px solid #929292;" ng-click="vm.addAlias()">add</md-icon>
<md-icon class="material-icons md-color-default clickable" style="float: right; border: 1px solid #929292;" ng-click="vm.addAlias()">add</md-icon>
</div>

@if ($errors->has('destination'))
Expand Down
2 changes: 1 addition & 1 deletion resources/views/layout/content.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<div class="material-icons" style="color: white;">verified_user</div>
Postfix <span class="part-two">ADM</span>
</h1>
<h1 class="pa-header-title md-display-2 m-1 show-sm show-xs hide-gt-sm">
<h1 class="pa-header-title md-display-2 m-1 show-sm show-xs hide-gt-sm mt-8 mb-0">
<div class="material-icons" style="color: white;">verified_user</div>
<span class="part-two">PFA</span>
</h1>
Expand Down

0 comments on commit ca8a6bf

Please sign in to comment.