space.model.html 9.4 KB
Newer Older
nengyuangzhang's avatar
nengyuangzhang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<div class="inmodal">
    <div class="modal-header">
        <h4 class="modal-title">{{operation | translate}}(ID:{{space.id}})</h4>
    </div>
    <div class="modal-body">
        <form role="form" name="form_space" novalidate class="form-horizontal">
            <div class="form-group">
                <label class="col-sm-4 control-label">{{'SETTING.NAME' | translate}}</label>
                <div class="col-sm-8">
                    <input ng-model="space.name" type="text" name="spacename" class="form-control" required>
                    <div class="m-t-xs" ng-show="form_space.spacename.$invalid && form_space.spacename.$dirty">
                        <small class="text-danger"
                            ng-show="form_space.spacename.$error.required">{{'SETTING.INPUT_NAME' | translate}}</small>
                    </div>
                </div>
            </div>
            <div class="hr-line-dashed"></div>
            <div class="form-group">
                <label class="col-sm-4 control-label">{{'SPACE.AREA' | translate}}</label>
                <div class="col-sm-8">
                    <input ng-model="space.area" type="number" name="spacearea" class="form-control" required>
                    <div class="m-t-xs" ng-show="form_space.spacearea.$invalid && form_space.spacearea.$dirty">
                        <small class="text-danger"
                            ng-show="form_space.spacearea.$error.required">{{'SPACE.INPUT_AREA' | translate}}</small>
                        <small class="text-danger"
                            ng-show="form_space.spacearea.$error">{{'SETTING.INVALID_FORMAT' | translate}}</small>
                    </div>
                </div>
            </div>
W
wangpingheng 已提交
30

nengyuangzhang's avatar
nengyuangzhang 已提交
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
            <div class="form-group"><label class="col-sm-4 control-label">{{'SETTING.CONTACT' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
                <div class="col-sm-8">
                    <ui-select ng-model="space.contact.id" name="spacecontact" theme="bootstrap">
                        <ui-select-match allow-clear="true" placeholder="{{'COMMON.PLACEHOLDER' | translate}}">
                            {{$select.selected.name}}</ui-select-match>
                        <ui-select-choices repeat="contact.id as contact in contacts | filter: $select.search">
                            <div ng-bind-html="contact.name | highlight: $select.search"></div>
                            <small>{{contact.email}},{{contact.phone}}</small>
                        </ui-select-choices>
                    </ui-select>
                    <div class="m-t-xs" ng-show="form_space.spacecontact.$invalid && form_space.spacecontact.$dirty">
                        <small class="text-danger"
                            ng-show="form_space.spacecontact.$error.required">{{'SETTING.SELECT_CONTACT' | translate}}</small>
                    </div>
                </div>
            </div>
W
wangpingheng 已提交
47

nengyuangzhang's avatar
nengyuangzhang 已提交
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
            <div class="form-group"><label class="col-sm-4 control-label">{{'SETTING.TIMEZONE' | translate}}</label>
                <div class="col-sm-8">
                    <ui-select ng-model="space.timezone.id" name="spacetimezone" theme="bootstrap" required>
                        <ui-select-match allow-clear="false" placeholder="{{'COMMON.PLACEHOLDER' | translate}}">
                            {{$select.selected.name}}</ui-select-match>
                        <ui-select-choices repeat="timezone.id as timezone in timezones | filter: $select.search">
                            <div ng-bind-html="timezone.name | highlight: $select.search"></div>
                            <small>{{timezone.description}}</small>
                        </ui-select-choices>
                    </ui-select>
                    <div class="m-t-xs" ng-show="form_space.spacetimezone.$invalid && form_space.spacetimezone.$dirty">
                        <small class="text-danger"
                            ng-show="form_space.spacetimezone.$error.required">{{'SETTING.SELECT_TIMEZONE' | translate}}</small>

                    </div>
                </div>
            </div>
W
wangpingheng 已提交
65

nengyuangzhang's avatar
nengyuangzhang 已提交
66 67 68 69 70 71 72 73 74 75 76 77
            <div class="form-group"><label
                    class="col-sm-4 control-label">{{'SETTING.IS_INPUT_COUNTED' | translate}}</label>

                <div class="col-sm-8">
                    <div class="checkbox checkbox-success">
                        <input id="chk_space_isinputcounted" type="checkbox" ng-model="space.is_input_counted"
                            ng-checked="space.is_input_counted">
                        <label for="chk_space_isinputcounted">{{'SETTING.IS_INPUT_COUNTED' | translate}}</label>
                    </div>

                </div>
            </div>
W
wangpingheng 已提交
78

nengyuangzhang's avatar
nengyuangzhang 已提交
79 80 81 82 83 84 85 86 87 88 89 90
            <div class="form-group"><label
                    class="col-sm-4 control-label">{{'SETTING.IS_OUTPUT_COUNTED' | translate}}</label>

                <div class="col-sm-8">
                    <div class="checkbox checkbox-success">
                        <input id="chk_space_isoutputcounted" type="checkbox" ng-model="space.is_output_counted"
                            ng-checked="space.is_output_counted">
                        <label for="chk_space_isoutputcounted">{{'SETTING.IS_OUTPUT_COUNTED' | translate}}</label>
                    </div>

                </div>
            </div>
W
wangpingheng 已提交
91

nengyuangzhang's avatar
nengyuangzhang 已提交
92 93 94 95 96 97 98 99 100 101 102
            <div class="form-group"><label class="col-sm-4 control-label">{{'SETTING.COSTCENTER' | translate}}</label>
                <div class="col-sm-8">
                    <ui-select ng-model="space.cost_center.id" theme="bootstrap" required>
                        <ui-select-match allow-clear="flase" placeholder="{{'COMMON.PLACEHOLDER' | translate}}">
                            {{$select.selected.name}}</ui-select-match>
                        <ui-select-choices repeat="costcenter.id as costcenter in costcenters | filter: $select.search">
                            <div ng-bind-html="costcenter.name | highlight: $select.search"></div>
                        </ui-select-choices>
                    </ui-select>
                </div>
            </div>
103
            <div class="form-group">
104
                <label class="col-sm-4 control-label">{{'SPACE.GET_COORDINATE' | translate}}</label>
105 106 107 108 109
                <div class="col-sm-8">
                    <a class="btn btn-primary btn-rounded btn-outline" href="https://api.map.baidu.com/lbsapi/getpoint/index.html" target="_blank">百度地图</a>
                    <a class="btn btn-primary btn-rounded btn-outline" href="https://www.google.com/maps" target="_blank">Google Maps</a>
                </div>
            </div>
110
            <div class="form-group"><label class="col-sm-4 control-label">{{'SPACE.LATITUDE' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
111 112 113 114 115 116 117 118
                <div class="col-sm-8">
                    <input ng-model="space.latitude" type="number" name="spacelatitude" class="form-control">
                    <div class="m-t-xs" ng-show="form_space.spacelatitude.$invalid && form_space.spacelatitude.$dirty">
                        <small class="text-danger" ng-show="form_space.spacelatitude.$error.required">{{'SPACE.INPUT_LATITUDE' | translate}}</small>
                        <small class="text-danger" ng-show="form_space.spacelatitude.$error">{{'SETTING.INVALID_FORMAT' | translate}}</small>
                    </div>
                </div>
            </div>
119
            <div class="form-group"><label class="col-sm-4 control-label">{{'SPACE.LONGITUDE' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
120 121 122 123 124 125 126 127 128
                <div class="col-sm-8">
                    <input ng-model="space.longitude" type="number" name="spacelongitude" class="form-control">
                    <div class="m-t-xs" ng-show="form_space.spacelongitude.$invalid && form_space.spacelongitude.$dirty">
                        <small class="text-danger" ng-show="form_space.spacelongitude.$error.required">{{'SPACE.INPUT_LONGITUDE' | translate}}</small>
                        <small class="text-danger" ng-show="form_space.spacelongitude.$error">{{'SETTING.INVALID_FORMAT' | translate}}</small>
                    </div>
                </div>
            </div>

nengyuangzhang's avatar
nengyuangzhang 已提交
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
            <div class="form-group"><label class="col-sm-4 control-label">{{'SPACE.DESCRIPTION' | translate}} ({{'SETTING.OPTIONAL' | translate}})</label>
                <div class="col-sm-8">
                    <input ng-model="space.description" type="text" name="spacedescription" class="form-control">
                    <div class="m-t-xs"
                        ng-show="form_space.spacedescription.$invalid && form_space.spacedescription.$dirty">
                        <small class="text-danger"
                            ng-show="form_space.spacedescription.$error.required">{{'SPACE.INPUT_DESCRIPTION' | translate}}</small>
                    </div>
                </div>
            </div>
            <div class="form-group"><label class="col-sm-4 control-label">{{'COMMON.QR_CODE' | translate}} </label>
             <div class="col-sm-8">
                  <div>
                       <qrcode data="{{space.qrcode}}" version="1" error-correction-level="L" size="100" color="#fff" background="#000" download></qrcode>
                  </div>
              </div>
            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-white" ng-click="cancel()">{{'SETTING.CANCEL' | translate}}</button>
        <button type="button" ng-disabled="form_space.$invalid" class="btn btn-primary"
            ng-click="ok()">{{'SETTING.SAVE' | translate}}</button>
    </div>
</div>