Commit 22e0163f authored by Carlos Juan's avatar Carlos Juan Committed by Francesc Guasch
Browse files

fix: Buttons disabled on machines permit action (#923)

* fix: Buttons disabled on machines permit action

change buttons from type anchor to type button for to do directive ng-disabled correctly

fixes #914

* fix Buttons disabled on machines permit action

fix for machine clones

fixes #914
parent fd32b062
...@@ -237,27 +237,27 @@ ...@@ -237,27 +237,27 @@
</td> </td>
<td class="lgMachToggle"> <td class="lgMachToggle">
<div ng-hide="{{machine.is_locked||machine.is_base}}"> <div ng-hide="{{machine.is_locked||machine.is_base}}">
<a type="button" class="btn btn-success btn-sm" <button type="button" class="btn btn-success btn-sm"
ng-click="action('machine','start',machine.id)" ng-click="action('machine','start',machine.id)"
ng-disabled="machine.is_active" ng-disabled="machine.is_active"
ng-show="machine.can_start" ng-show="machine.can_start"
title="<%=l 'Start' %>"> title="<%=l 'Start' %>">
<i class="fa fa-play"></i> <i class="fa fa-play"></i>
</a> </button>
<a type="button" class="btn btn-warning btn-sm" <button type="button" class="btn btn-warning btn-sm"
ng-click="action('machine','hibernate',machine.id)" ng-click="action('machine','hibernate',machine.id)"
ng-disabled="!machine.is_active" ng-disabled="!machine.is_active"
ng-show="machine.can_hibernate" ng-show="machine.can_hibernate"
title="<%=l 'Hibernate' %>"> title="<%=l 'Hibernate' %>">
<i class="fa fa-pause"></i> <i class="fa fa-pause"></i>
</a> </button>
<a type="button" class="btn btn-danger btn-sm" <button type="button" class="btn btn-danger btn-sm"
ng-click="action('machine','shutdown',machine.id)" ng-click="action('machine','shutdown',machine.id)"
ng-disabled="!machine.is_active" ng-disabled="!machine.is_active"
ng-show="machine.can_shutdown" ng-show="machine.can_shutdown"
title="<%=l 'ShutDown' %>"> title="<%=l 'ShutDown' %>">
<i class="fa fa-power-off"></i> <i class="fa fa-power-off"></i>
</a> </button>
<a type="button" class="btn btn-primary btn-sm" <a type="button" class="btn btn-primary btn-sm"
ng-show="machine.can_view" ng-show="machine.can_view"
ng-href="/machine/view/{{machine.id}}.html" ng-href="/machine/view/{{machine.id}}.html"
...@@ -359,27 +359,27 @@ ...@@ -359,27 +359,27 @@
<td class="lgMachToggle"> <td class="lgMachToggle">
<div ng-hide="{{child.is_locked}}"> <div ng-hide="{{child.is_locked}}">
<a type="button" class="btn btn-success btn-sm" <button type="button" class="btn btn-success btn-sm"
ng-click="action('machine','start',child.id)" ng-click="action('machine','start',child.id)"
ng-disabled="child.is_active" ng-disabled="child.is_active"
ng-show="child.can_start" ng-show="child.can_start"
title="<%=l 'Start' %>"> title="<%=l 'Start' %>">
<i class="fa fa-play"></i> <i class="fa fa-play"></i>
</a> </button>
<a type="button" class="btn btn-warning btn-sm" <button type="button" class="btn btn-warning btn-sm"
ng-click="action('machine','hibernate',child.id)" ng-click="action('machine','hibernate',child.id)"
ng-disabled="!child.is_active" ng-disabled="!child.is_active"
ng-show="child.can_hibernate" ng-show="child.can_hibernate"
title="<%=l 'Hibernate' %>"> title="<%=l 'Hibernate' %>">
<i class="fa fa-pause"></i> <i class="fa fa-pause"></i>
</a> </button>
<a type="button" class="btn btn-danger btn-sm" <button type="button" class="btn btn-danger btn-sm"
ng-click="action('machine','shutdown',child.id)" ng-click="action('machine','shutdown',child.id)"
ng-disabled="!child.is_active" ng-disabled="!child.is_active"
ng-show="child.can_shutdown" ng-show="child.can_shutdown"
title="<%=l 'ShutDown' %>"> title="<%=l 'ShutDown' %>">
<i class="fa fa-power-off"></i> <i class="fa fa-power-off"></i>
</a> </button>
<a type="button" class="btn btn-primary btn-sm" <a type="button" class="btn btn-primary btn-sm"
ng-href="/machine/view/{{child.id}}.html" ng-href="/machine/view/{{child.id}}.html"
ng-show="child.can_view" ng-show="child.can_view"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment