| .. | .. |
|---|
| 52 | 52 | margin-bottom: 5px; |
|---|
| 53 | 53 | } |
|---|
| 54 | 54 | |
|---|
| 55 | + |
|---|
| 56 | + |
|---|
| 55 | 57 | </style> |
|---|
| 56 | 58 | <link rel="stylesheet" |
|---|
| 57 | 59 | href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap-theme.min.css"> |
|---|
| .. | .. |
|---|
| 109 | 111 | class="glyphicon glyphicon-ban-circle"></span> Cancel |
|---|
| 110 | 112 | </a></li> |
|---|
| 111 | 113 | </ul> |
|---|
| 112 | | - <form class="navbar-form navbar-right" role="search"> |
|---|
| 113 | | - <div class="form-group"> |
|---|
| 114 | | - <input type="text" class="form-control" placeholder="Search" ng-model="searchText"> |
|---|
| 115 | | - </div> |
|---|
| 116 | | - <button type="submit" class="btn btn-default"> |
|---|
| 117 | | - <span class="glyphicon glyphicon-search"></span> |
|---|
| 118 | | - |
|---|
| 119 | | - </button> |
|---|
| 120 | | - </form> |
|---|
| 114 | + <div class="navbar-form navbar-right"> |
|---|
| 115 | + <div class="input-group input-group-sm"> |
|---|
| 116 | + <span class="input-group-addon glyphicon glyphicon-search" style="top: 0px;"></span> |
|---|
| 117 | + <input type="text" class="form-control" placeholder="Search" ng-model="$parent.searchText" > |
|---|
| 118 | + <span class="btn input-group-addon glyphicon glyphicon-remove" ng-click="$parent.searchText = ''" style="top: 0px;"></span> |
|---|
| 119 | + </div> |
|---|
| 120 | + </div> |
|---|
| 121 | 121 | </div> |
|---|
| 122 | 122 | </nav> |
|---|
| 123 | 123 | <div class="panel panel-default animate-show ng-hide" ng-show="showForm"> |
|---|
| .. | .. |
|---|
| 126 | 126 | <div class="form-group" ng-repeat="field in catalogMetadata.fields" ng-if="!isNew || !field.readOnly"> |
|---|
| 127 | 127 | <label class="col-md-3 control-label" for="{{field.name}}">{{field.display}}</label> |
|---|
| 128 | 128 | <div class="col-md-5"> |
|---|
| 129 | | - <input catalog-field ng-if="!field.readOnly && !field.multiline" type="{{field.type}}" id="{{field.name}}" name="{{field.name}}" placeholder="" |
|---|
| 130 | | - class="form-control" ng-model="formu[field.name]" ng-required="field.mandatory" ng-maxlength="{{field.maxlength}}" /> |
|---|
| 131 | | - <textarea catalog-field ng-if="!field.readOnly && field.multiline" type="{{field.type}}" id="{{field.name}}" name="{{field.name}}" placeholder="" |
|---|
| 132 | | - class="form-control" ng-model="formu[field.name]" rows="{{field.multiline}}" ng-required="field.mandatory" ng-maxlength="{{field.maxlength}}"></textarea> |
|---|
| 133 | | - <p ng-if="field.readOnly" class="form-control-static">{{formu[field.name]}}</p> |
|---|
| 134 | | - |
|---|
| 129 | + <div ng-switch on="inputType(field)"> |
|---|
| 130 | + <input catalog-field ng-switch-when="normal" type="{{field.type}}" id="{{field.name}}" name="{{field.name}}" placeholder="" |
|---|
| 131 | + class="form-control" ng-model="formu[field.name]" ng-required="field.mandatory" ng-maxlength="{{field.maxlength}}" /> |
|---|
| 132 | + <textarea catalog-field ng-switch-when="textarea" type="{{field.type}}" id="{{field.name}}" name="{{field.name}}" placeholder="" |
|---|
| 133 | + class="form-control" ng-model="formu[field.name]" rows="{{field.multiline}}" ng-required="field.mandatory" ng-maxlength="{{field.maxlength}}"></textarea> |
|---|
| 134 | + <p ng-switch-when="readonly" class="form-control-static">{{formu[field.name]}}</p> |
|---|
| 135 | + <p ng-switch-when="readonly_date" class="form-control-static">{{formu[field.name] | date:'medium'}}</p> |
|---|
| 136 | + <select ng-switch-when="select" class="form-control" ng-required="field.mandatory" ng-model="formu[field.name]" |
|---|
| 137 | + ng-options="o.id as o.label for o in refs[field.name]"> |
|---|
| 138 | + </select> |
|---|
| 139 | + |
|---|
| 140 | + </div> |
|---|
| 135 | 141 | <div class="alert inline-alert alert-warning" ng-show="catalogForm[field.name].$invalid"> |
|---|
| 136 | 142 | <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 137 | 143 | <span ng-show="catalogForm[field.name].$error.maxlength">{{field.display}} length is too long (max: {{field.maxlength}}).<br/></span> |
|---|