rsanchez
2014-10-15 7686a892d556333194349f73fee3a268b6202d66
securis/src/main/resources/static/admin.html
....@@ -47,13 +47,15 @@
4747 <div ng-switch on="inputType(field)">
4848 <input catalog-field ng-switch-when="normal" type="{{field.type}}" id="{{field.name}}" name="{{field.name}}" placeholder=""
4949 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}}" />
5052 <textarea catalog-field ng-switch-when="textarea" type="{{field.type}}" id="{{field.name}}" name="{{field.name}}" placeholder=""
5153 class="form-control" ng-model="formu[field.name]" rows="{{field.multiline}}" ng-required="field.mandatory" ng-maxlength="{{field.maxlength}}"></textarea>
5254 <p ng-switch-when="readonly" class="form-control-static">{{formu[field.name]}}</p>
5355 <p ng-switch-when="readonly_date" class="form-control-static">{{formu[field.name] | date:'medium'}}</p>
5456 <select ng-switch-when="select" class="form-control" ng-required="field.mandatory" ng-model="formu[field.name]"
5557 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>
5759 </select>
5860 <select chosen multiple ng-switch-when="multiselect" class="form-control" ng-required="field.mandatory" ng-model="formu[field.name]"
5961 ng-options="o.id as o.label for o in refs[field.name]" data-placeholder="...">
....@@ -75,10 +77,10 @@
7577 </td>
7678 <td>
7779 <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" />
7981 </td>
8082 <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"
8284 class="form-control" ng-model="row_md['mandatory']" />
8385 </td>
8486 <td ng-if="field.allow_creation">
....@@ -88,8 +90,7 @@
8890 </tbody>
8991 </table>
9092 </div>
91
-
92
-
93
+
9394 </div>
9495 <div class="alert inline-alert alert-warning" ng-show="catalogForm[field.name].$invalid">
9596 <span class="glyphicon glyphicon-warning-sign"></span>