| .. | .. |
|---|
| 110 | 110 | <div class="form-group" ng-if="!isNew"> |
|---|
| 111 | 111 | <label class="col-md-3 control-label" for="status" i18n>Status</label> |
|---|
| 112 | 112 | <div class="col-md-8"> |
|---|
| 113 | | - <select class="form-control" id="status" |
|---|
| 114 | | - ng-required="mandatory.status" |
|---|
| 115 | | - ng-model="pack.status" |
|---|
| 116 | | - ng-options="o.id as o.label for o in refs.pack_status"> |
|---|
| 117 | | - </select> |
|---|
| 113 | + <p class="form-control-static" ng-bind="pack.status_name"></p> |
|---|
| 118 | 114 | <div class="alert inline-alert alert-warning" |
|---|
| 119 | 115 | ng-show="packForm.status.$invalid"> |
|---|
| 120 | 116 | <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| .. | .. |
|---|
| 128 | 124 | <label class="col-md-3 control-label" for="license_type_id" i18n>License |
|---|
| 129 | 125 | type</label> |
|---|
| 130 | 126 | <div class="col-md-8"> |
|---|
| 131 | | - <select class="form-control" id="license_type_id" |
|---|
| 127 | + <select ng-if="isNew" class="form-control" id="license_type_id" |
|---|
| 132 | 128 | ng-change="updateMetadata()" |
|---|
| 133 | 129 | ng-required="mandatory.license_type_id" |
|---|
| 134 | 130 | ng-model="pack.license_type_id" |
|---|
| 135 | 131 | ng-options="o.id as o.label for o in refs.license_type_id"> |
|---|
| 136 | | - |
|---|
| 137 | 132 | </select> |
|---|
| 133 | + <p ng-if="!isNew" class="form-control-static" ng-bind="pack.license_type_name"></p> |
|---|
| 138 | 134 | <div class="alert inline-alert alert-warning" |
|---|
| 139 | 135 | ng-show="packForm.license_type_id.$invalid"> |
|---|
| 140 | 136 | <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| .. | .. |
|---|
| 147 | 143 | <div class="form-group"> |
|---|
| 148 | 144 | <label class="col-md-3 control-label" for="organization_id" i18n>Organization</label> |
|---|
| 149 | 145 | <div class="col-md-8"> |
|---|
| 150 | | - <select class="form-control" ng-required="field.mandatory" |
|---|
| 146 | + <select ng-if="isNew" class="form-control" |
|---|
| 151 | 147 | ng-model="pack.organization_id" |
|---|
| 148 | + ng-required="mandatory.organization_id" |
|---|
| 152 | 149 | ng-options="o.id as o.label for o in refs.organization_id"> |
|---|
| 153 | 150 | </select> |
|---|
| 151 | + <p ng-if="!isNew" class="form-control-static" ng-bind="pack.organization_name"></p> |
|---|
| 154 | 152 | <div class="alert inline-alert alert-warning" |
|---|
| 155 | 153 | ng-show="packForm.organization_id.$invalid"> |
|---|
| 156 | 154 | <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| .. | .. |
|---|
| 232 | 230 | <button id="save" type="submit" class="btn btn-primary"> |
|---|
| 233 | 231 | <span i18n class="glyphicon glyphicon-floppy-disk"></span> Save |
|---|
| 234 | 232 | </button> |
|---|
| 235 | | - <button id="acc" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> |
|---|
| 233 | + <button ng-if="!isNew" id="acc" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> |
|---|
| 236 | 234 | <span i18n class="glyphicon glyphicon-align-justify"></span> Actions |
|---|
| 237 | 235 | <span class="caret"></span> |
|---|
| 238 | 236 | </button> |
|---|
| 239 | 237 | <ul class="dropdown-menu" role="menu"> |
|---|
| 240 | | - <li><a href="#">Activate</a></li> |
|---|
| 238 | + <li><a href="#" ng-click="execute('activate')">Activate</a></li> |
|---|
| 241 | 239 | <li><a href="#">On hold</a></li> |
|---|
| 242 | 240 | <li class="divider"></li> |
|---|
| 243 | 241 | <li><a href="#">Invalidate</a></li> |
|---|
| .. | .. |
|---|
| 545 | 543 | <button id="save" type="submit" class="btn btn-primary"> |
|---|
| 546 | 544 | <span i18n class="glyphicon glyphicon-floppy-disk"></span> Save |
|---|
| 547 | 545 | </button> |
|---|
| 548 | | - <button id="acc" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> |
|---|
| 546 | + <button ng-if="!isNew" id="acc" type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> |
|---|
| 549 | 547 | <span i18n class="glyphicon glyphicon-align-justify"></span> Actions |
|---|
| 550 | 548 | <span class="caret"></span> |
|---|
| 551 | 549 | </button> |
|---|