|
41 | 41 | <div class="well"> |
42 | 42 | <div class="row"> |
43 | 43 | <div class="col-md-12"> |
44 | | - <button class="btn btn-sm btn-success" id="addNewLocation">Add New Location</button> |
| 44 | + <button class="btn btn-sm btn-success" data-toggle="modal" data-target="#addModal">Add New Location</button> |
45 | 45 | </div> |
46 | 46 | </div> |
47 | 47 | </div> |
|
51 | 51 | <div class="modal-content"> |
52 | 52 | <div class="modal-header"> |
53 | 53 | <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
54 | | - <h4 class="modal-title" id="exampleModalLabel">Editing Location</h4> |
| 54 | + <h4 class="modal-title">Editing Location</h4> |
55 | 55 | </div> |
56 | 56 | <form action="{{ route('admin.locations') }}" method="POST" id="editLocationForm"> |
57 | 57 | <div class="modal-body"> |
58 | 58 | <div class="form-group"> |
59 | 59 | <label for="location-short" class="control-label">Location Code:</label> |
60 | 60 | <input type="text" class="form-control" id="location-short"> |
| 61 | + <p class="text-muted"><small>This should be a short identifier for this location (e.g. <code>ny1</code>). This field is limited to a maximum of 10 characters from the following list: <code>a-zA-Z0-9_-.</code></small></p> |
61 | 62 | </div> |
62 | 63 | <div class="form-group"> |
63 | 64 | <label for="location-long" class="control-label">Description:</label> |
64 | 65 | <input type="text" class="form-control" id="location-long"> |
| 66 | + <p class="text-muted"><small>This should be a longer description of the location for internal reference.</small></p> |
65 | 67 | </div> |
66 | 68 | </div> |
67 | 69 | <div class="modal-footer"> |
|
73 | 75 | </div> |
74 | 76 | </div> |
75 | 77 | </div> |
| 78 | +<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"> |
| 79 | + <div class="modal-dialog" role="document"> |
| 80 | + <div class="modal-content"> |
| 81 | + <div class="modal-header"> |
| 82 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
| 83 | + <h4 class="modal-title">Add New Location</h4> |
| 84 | + </div> |
| 85 | + <form action="{{ route('admin.locations') }}" method="POST" id="addLocationForm"> |
| 86 | + <div class="modal-body"> |
| 87 | + <div class="form-group"> |
| 88 | + <label for="short" class="control-label">Location Code:</label> |
| 89 | + <div> |
| 90 | + <input type="text" class="form-control" name="short" value="{{ old('short') }}"> |
| 91 | + <p class="text-muted"><small>This should be a short identifier for this location (e.g. <code>ny1</code>). This field is limited to a maximum of 10 characters from the following list: <code>a-zA-Z0-9_-.</code></small></p> |
| 92 | + </div> |
| 93 | + </div> |
| 94 | + <div class="form-group"> |
| 95 | + <label for="long" class="control-label">Description:</label> |
| 96 | + <div> |
| 97 | + <input type="text" class="form-control" name="long" value="{{ old('long') }}"> |
| 98 | + <p class="text-muted"><small>This should be a longer description of the location for internal reference.</small></p> |
| 99 | + </div> |
| 100 | + </div> |
| 101 | + </div> |
| 102 | + <div class="modal-footer"> |
| 103 | + {!! csrf_field() !!} |
| 104 | + <button type="button" class="btn btn-sm btn-default" data-dismiss="modal">Close</button> |
| 105 | + <button type="submit" class="btn btn-sm btn-primary">Add Location</button> |
| 106 | + </div> |
| 107 | + </form> |
| 108 | + </div> |
| 109 | + </div> |
| 110 | +</div> |
76 | 111 | <script> |
77 | 112 | $(document).ready(function () { |
78 | 113 | $('#sidebar_links').find("a[href='/admin/locations']").addClass('active'); |
|
0 commit comments