Validation for price missing in social event dialog
[cds-indico.git] / indico / htdocs / js / indico / RegistrationForm / tpls / table.tpl.html
blob42d317bf6090d937288b11fb68f1c924969ef689
1 <table class="regform-table" cellspacing="0">
2 <thead>
3 <tr role="rowheader">
4 <td ng-if="isSortable()"></td>
5 <th ng-repeat="name in config.colNames"
6 class="column-title {{ config.colModel[$index].className }}"
7 style="width: {{ config.colModel[$index].width }}px;">
8 <span ng-if="!config.colHelp">
9 {{ name }}
10 </span>
11 <span ng-if="config.colHelp" title="{{ config.colHelp[$index] }}">
12 {{ name }}
13 </span>
14 </th>
15 <th>
16 <i ng-if="config.colHelp"
17 class="info-helper"
18 title="{{ 'Hover the table headers to get more information' | i18n }}">
19 </i>
20 </th>
21 </tr>
22 </thead>
23 <tbody ui-sortable="itemSortableOptions" ng-model="formData">
24 <tr ng-if="!(formData | filter: matchFilter).length" class="empty-row">
25 <td ng-if="isSortable()"></td>
26 <td>
27 <span class="text-superfluous italic">
28 {{ 'No items' | i18n }}
29 </span>
30 </td>
31 </tr>
32 <tr ng-repeat="item in formData | filter: matchFilter">
33 <td ng-if="isSortable()"
34 class="table-sortable-handle"></td>
35 <td ng-repeat="elem in config.colModel"
36 class="{{ elem.className }}"
37 style="text-align: {{ elem.align }};"
38 name="{{ elem.name }}">
39 <span ng-if="elem.editable == false">
40 {{ item[elem.index] }}
41 </span>
42 <input ng-if="elem.editable == true && elem.edittype == 'text'"
43 ng-model="item[elem.index]"
44 type="text"
45 size="{{ elem.editoptions.size }}"
46 maxlength="{{ elem.editoptions.maxlength }}"
47 name="{{ elem.name }}"
48 ng-required="elem.index == 'price' && !!item['billable']"
49 class="editable"/>
50 <ng-form name="nestedForm" ng-if="elem.editable == true && elem.edittype == 'int'">
51 <input type="number" name="{{ elem.name }}"
52 ng-model="item[elem.index]"
53 ng-init="item[elem.index] = item[elem.index] || 0"
54 ng-class="{hasError: validationStarted && nestedForm.$invalid}"
55 class="editable"
56 max="9999"
57 min="0"
58 size="6"/>
59 </ng-form>
60 <input ng-if="elem.edittype == 'bool_select'"
61 ng-model="item[elem.index]"
62 type="checkbox"
63 name="{{ elem.name }}"/>
64 </td>
65 <td class="row-actions">
66 <span>
67 <a class="icon-remove remove-row" ng-if="config.actions.indexOf('remove') > -1"
68 ng-click="actionItem(item, 'remove')"
69 title="{{ 'Remove row' | i18n }}"></a>
70 <a ng-repeat="action in config.actions | filter: actionIsArray"
71 ng-click="actionItem(item, action[0])"
72 title="{{ action[1] }}"
73 class="{{ action[3] }}"></a>
74 </span>
75 </td>
76 </tr>
77 </tbody>
78 </table>