Begin work on the admin field editing screen.
[bugdar.git] / admin / templates / admin_fields_edit.tpl
1 {%#import 'admin_header'%}
2
3 <div ng-app="bugdar.admin.fields">
4 <div ng-controller="FieldEditor">
5
6 <h2>{%= ($is_new) ? T('Add New Field') : sprintf(T('Edit Field: %1$s'), $field->title) %}</h2>
7
8 <form action="{%#url '/fields/save'%}" method="post">
9
10 <script type="text/ng-template" id="-/admin/fields/field-type-option.tpl">
11 <option value="{{fieldType}}" ng-selected="fieldType == type">{{fieldType}}</option>
12 </script>
13
14 <label>
15 {%=T('Title:')%}
16 <input type="text" name="title" value="{%= $field->title %}">
17 </label>
18
19 <label>
20 {%=T('Description:')%}
21 <input type="text" name="description" value="{%= $field->description %}">
22 </label>
23
24 <label>
25 {%=T('Field Type')%}
26 <select name="type" {%= ($is_new) ?: 'disabled' %}>
27 <option field-type="{%= bugdar\Field::TYPE_TEXT %}"></option>
28 <option field-type="{%= bugdar\Field::TYPE_BOOL %}"></option>
29 <option field-type="{%= bugdar\Field::TYPE_LIST %}"></option>
30 <option field-type="{%= bugdar\Field::TYPE_DATE %}"></option>
31 <option field-type="{%= bugdar\Field::TYPE_USER %}"></option>
32 </select>
33 </label>
34
35 <label>
36 {%=T('Required:')%}
37 <input type="checkbox" name="required" {%= $field->required ? 'checked' : '' %}>
38 </label>
39
40 <label>
41 {%=T('Can Be Searched:')%}
42 <input type="checkbox" name="can_search" {%= $field->can_search ? 'checked' : '' %}>
43 </label>
44
45 <input type="submit" value="{%=T('Save Field')%}">
46
47 </form>
48
49 </div>
50 </div>
51
52 {%#import 'admin_footer'%}