| .. | .. |
|---|
| 47 | 47 | <div ng-switch on="inputType(field)"> |
|---|
| 48 | 48 | <input catalog-field ng-switch-when="normal" type="{{field.type}}" id="{{field.name}}" name="{{field.name}}" placeholder="" |
|---|
| 49 | 49 | class="form-control" ng-model="formu[field.name]" ng-required="field.mandatory" ng-maxlength="{{field.maxlength}}" /> |
|---|
| 50 | + <input catalog-field ng-switch-when="password" type="{{field.type}}" id="{{field.name}}" name="{{field.name}}" placeholder="" |
|---|
| 51 | + class="form-control" ng-model="formu[field.name]" ng-required="field.mandatory" ng-maxlength="{{field.maxlength}}" /> |
|---|
| 50 | 52 | <textarea catalog-field ng-switch-when="textarea" type="{{field.type}}" id="{{field.name}}" name="{{field.name}}" placeholder="" |
|---|
| 51 | 53 | class="form-control" ng-model="formu[field.name]" rows="{{field.multiline}}" ng-required="field.mandatory" ng-maxlength="{{field.maxlength}}"></textarea> |
|---|
| 52 | 54 | <p ng-switch-when="readonly" class="form-control-static">{{formu[field.name]}}</p> |
|---|
| 53 | 55 | <p ng-switch-when="readonly_date" class="form-control-static">{{formu[field.name] | date:'medium'}}</p> |
|---|
| 54 | 56 | <select ng-switch-when="select" class="form-control" ng-required="field.mandatory" ng-model="formu[field.name]" |
|---|
| 55 | 57 | ng-options="o.id as o.label for o in refs[field.name]" ng-change="selectFieldChanged(field.onchange)"> |
|---|
| 56 | | - <option value="-1" selected></option> |
|---|
| 58 | + <option value="" ></option> |
|---|
| 57 | 59 | </select> |
|---|
| 58 | 60 | <select chosen multiple ng-switch-when="multiselect" class="form-control" ng-required="field.mandatory" ng-model="formu[field.name]" |
|---|
| 59 | 61 | ng-options="o.id as o.label for o in refs[field.name]" data-placeholder="..."> |
|---|
| .. | .. |
|---|
| 75 | 77 | </td> |
|---|
| 76 | 78 | <td> |
|---|
| 77 | 79 | <input type="text" id="md_value" name="md_value" placeholder="" |
|---|
| 78 | | - class="form-control" ng-model="row_md['value']" ng-required="false" ng-maxlength="150" /> |
|---|
| 80 | + class="form-control" ng-model="row_md['value']" ng-required="row_md['mandatory']" ng-maxlength="150" /> |
|---|
| 79 | 81 | </td> |
|---|
| 80 | 82 | <td> |
|---|
| 81 | | - <input type="checkbox" id="md_mandatory" name="md_mandatory" |
|---|
| 83 | + <input type="checkbox" id="md_mandatory" name="md_mandatory" ng-disabled="!field.allow_creation" |
|---|
| 82 | 84 | class="form-control" ng-model="row_md['mandatory']" /> |
|---|
| 83 | 85 | </td> |
|---|
| 84 | 86 | <td ng-if="field.allow_creation"> |
|---|
| .. | .. |
|---|
| 88 | 90 | </tbody> |
|---|
| 89 | 91 | </table> |
|---|
| 90 | 92 | </div> |
|---|
| 91 | | - |
|---|
| 92 | | - |
|---|
| 93 | + |
|---|
| 93 | 94 | </div> |
|---|
| 94 | 95 | <div class="alert inline-alert alert-warning" ng-show="catalogForm[field.name].$invalid"> |
|---|
| 95 | 96 | <span class="glyphicon glyphicon-warning-sign"></span> |
|---|