-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Show/Update/Delete for network attribute
- Loading branch information
Showing
3 changed files
with
135 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,77 @@ | ||
<loading-panel ng-if="loading"></loading-panel> | ||
<div ng-if="!loading"> | ||
<heading-bar heading="NetworkAttributes" subheading="[[attribute.name]]"> | ||
<button ng-if="admin" | ||
class="btn btn-info" | ||
data-toggle="modal" | ||
data-target="#updateAttrModal" | ||
>Update Attribute</button> | ||
<button ng-if="admin" | ||
class="btn btn-danger" | ||
data-toggle="modal" | ||
data-target="#deleteAttrModal" | ||
>Delete Attribute</button> | ||
</heading-bar> | ||
|
||
<nsot-modal title="Update Attribute" modal-id="updateAttrModal"> | ||
<div class="modal-body"> | ||
<div ng-if="updateError" class="alert alert-danger"> | ||
[[updateError.code]] - [[updateError.message]] | ||
</div> | ||
<form novalidate name="attrForm" class="nsot-form"> | ||
<label>Name</label> [[attribute.name]] | ||
<div class="form-group"> | ||
<textarea style="resize: vertical;" | ||
class="form-control" | ||
rows="5" | ||
name="description" | ||
placeholder="Description" | ||
ng-model="attribute.description" | ||
> | ||
</textarea> | ||
</div> | ||
<div class="checkbox"> | ||
<label> | ||
<input type="checkbox" name="required" | ||
ng-model="attribute.required"> Required | ||
</label> | ||
</div> | ||
|
||
</form> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal"> | ||
Close | ||
</button> | ||
<button type="submit" ng-click="updateAttribute(attribute)" | ||
class="btn btn-primary" ng-disabled="attrForm.$invalid" | ||
> | ||
Update | ||
</button> | ||
</div> | ||
</nsot-modal> | ||
|
||
|
||
<nsot-modal title="Delete Attribute" modal-id="deleteAttrModal"> | ||
<div class="modal-body"> | ||
<div ng-if="deleteError" class="alert alert-danger"> | ||
[[deleteError.code]] - [[deleteError.message]] | ||
</div> | ||
Are you sure you want to delete this network attribute? | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal"> | ||
Close | ||
</button> | ||
<button type="submit" | ||
ng-click="deleteAttribute(attribute)" | ||
class="btn btn-primary" | ||
> | ||
Delete | ||
</button> | ||
</div> | ||
</nsot-modal> | ||
|
||
|
||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters