[2] | 1 | <%inherit file="/base.mako"/> |
---|
| 2 | <%namespace file="/message.mako" import="render_msg" /> |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | %if message: |
---|
| 6 | ${render_msg( message, status )} |
---|
| 7 | %endif |
---|
| 8 | |
---|
| 9 | <% num_states=len(states_list) %> |
---|
| 10 | |
---|
| 11 | <div class="toolForm"> |
---|
| 12 | <div class="toolFormTitle">Edit the sequencer configuration</div> |
---|
| 13 | <div class="toolFormBody"> |
---|
| 14 | <form name="library" action="${h.url_for( controller='admin', action='request_type', save_changes=True, create=False, id=request_type.id, num_states=num_states )}" method="post" > |
---|
| 15 | <div class="form-row"> |
---|
| 16 | <label>Name:</label> |
---|
| 17 | <div style="float: left; width: 250px; margin-right: 10px;"> |
---|
| 18 | <input type="text" name="name" value="${request_type.name}" size="40"/> |
---|
| 19 | </div> |
---|
| 20 | <div style="clear: both"></div> |
---|
| 21 | </div> |
---|
| 22 | <div class="form-row"> |
---|
| 23 | <label>Description:</label> |
---|
| 24 | <div style="float: left; width: 250px; margin-right: 10px;"> |
---|
| 25 | <input type="text" name="description" value="${request_type.desc}" size="40"/> |
---|
| 26 | </div> |
---|
| 27 | <div style="clear: both"></div> |
---|
| 28 | </div> |
---|
| 29 | <div class="form-row"> |
---|
| 30 | <label> |
---|
| 31 | Request Form definition: |
---|
| 32 | </label> |
---|
| 33 | <select name="form_id"> |
---|
| 34 | %for form in forms: |
---|
| 35 | %if form.id == request_type.request_form_id: |
---|
| 36 | <option value="${form.id}" selected>${form.name}</option> |
---|
| 37 | %else: |
---|
| 38 | <option value="${form.id}">${form.name}</option> |
---|
| 39 | %endif |
---|
| 40 | %endfor |
---|
| 41 | </select> |
---|
| 42 | </div> |
---|
| 43 | <div class="form-row"> |
---|
| 44 | <label> |
---|
| 45 | Sample Form definition: |
---|
| 46 | </label> |
---|
| 47 | <select name="form_id"> |
---|
| 48 | %for form in forms: |
---|
| 49 | %if form.id == request_type.sample_form_id: |
---|
| 50 | <option value="${form.id}" selected>${form.name}</option> |
---|
| 51 | %else: |
---|
| 52 | <option value="${form.id}">${form.name}</option> |
---|
| 53 | %endif |
---|
| 54 | %endfor |
---|
| 55 | </select> |
---|
| 56 | </div> |
---|
| 57 | <div class="toolFormBody"> |
---|
| 58 | %for element_count, state in enumerate(states_list): |
---|
| 59 | <div class="form-row"> |
---|
| 60 | <label>${1+element_count}) State name:</label> |
---|
| 61 | <input type="text" name="new_element_name_${element_count}" value="${state.name}" size="40"/> |
---|
| 62 | <label>State help text (optional):</label> |
---|
| 63 | <input type="text" name="new_element_description_${element_count}" value="${state.desc}" size="40"/> |
---|
| 64 | </div> |
---|
| 65 | <div style="clear: both"></div> |
---|
| 66 | %endfor |
---|
| 67 | </div> |
---|
| 68 | <div class="form-row"> |
---|
| 69 | <div style="float: left; width: 250px; margin-right: 10px;"> |
---|
| 70 | <input type="hidden" name="new" value="submitted" size="40"/> |
---|
| 71 | </div> |
---|
| 72 | <div style="clear: both"></div> |
---|
| 73 | </div> |
---|
| 74 | <div class="form-row"> |
---|
| 75 | <input type="submit" name="edit_request_type_button" value="Save"/> |
---|
| 76 | </div> |
---|
| 77 | </form> |
---|
| 78 | </div> |
---|
| 79 | </div> |
---|