Commit 2a366443 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

wip(frontend): standar look in settings

issue #1196
parent 4908b810
......@@ -33,7 +33,7 @@
<input class="form-control" ng-model="copy_ram" type="text" size="3">
</div>
</div>
<div ng-show="copy_request" class="alert alert-info">
<div ng-show="copy_request" class="alert alert-warning">
Copy {{shownamchine.name}} {{copy_request.status}}.
<br/>
{{copy_request.error}}
......
<div class="card-body">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<div class="form-group-row">
<div class="col-md-2">
<div class="alert alert-danger" role="alert" ng-show="showmachine.is_active">
This machine is running and can't be renamed.
</div>
<div class="alert alert-danger" role="alert" ng-show="showmachine.is_hibernated">
This machine is hibernated and can't be renamed.
</div>
</div>
<div class="col-md-5">
<label for="new_name"><%=l 'New name' %></label>
<input class="form-control" type="text" name="new_name" ng-model="new_name"
ng-change="validate_new_name(showmachine.name)"
ng-disabled="showmachine.is_active || showmachine.is_hibernated
|| (rename_request && rename_request.status !== 'done')"
>
<div ng-show="rename_request" class="alert alert-info">
Rename {{shownamchine.name}} {{rename_request.status}}.
<br/>
{{rename_request.error}}
</div>
<div ng-hide="rename_request && rename_request.status !== 'done'">
</div>
<div class="form-group-row">
<div class="col-md-7">
<input type="reset" class="btn btn-outline-secondary mt-3" value="<%=l 'Cancel' %>" onclick = "location='/admin/machines'"/>
<button type="button" class="btn btn-primary mt-3" ng-disabled="showmachine.is_active || showmachine.is_hibernated || new_name_duplicated || new_name_invalid || message_rename"
<button type="button" class="btn btn-primary mt-3" ng-disabled="showmachine.is_active || showmachine.is_hibernated || new_name_duplicated || new_name_invalid || message_rename
|| (rename_request && rename_request.status !== 'done')""
ng-click="rename(showmachine.id, showmachine.name)">
<%=l 'Rename' %>
</button>
<div class="form-group has-error">
<div class="alert alert-danger col-form-label" role="alert" ng-show="new_name_duplicated" for="new_name" >
This name is duplicated
</div>
<div class="alert alert-danger col-form-label" role="alert" ng-show="new_name_invalid" for="new_name">
</div>
</div>
<div class="form-group">
<div class="col-md-5 alert alert-warning" ng-show="rename_request">
Rename {{shownamchine.name}} {{rename_request.status}}.
<br/>
{{rename_request.error}}
</div>
</div>
<div class="form-group has-error" ng-show="new_name_duplicated || new_name_invalid">
<div class="alert alert-danger col-form-label" role="alert" for="new_name">
<div ng-show="new_name_duplicated">
This name is duplicated
</div>
<div ng-show="new_name_invalid" for="new_name">
This name is invalid. It can only contain alphabetic, numbers, undercores and dashes
and must start by a letter.
</div>
</div>
</div>
</div>
......
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