| //- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| include /app/helpers/jade/mixins |
| |
| .modal.modal--ignite.theme--ignite.input-dialog(tabindex='-1' role='dialog') |
| .modal-dialog |
| form.modal-content(name='ctrl.form' novalidate) |
| .modal-header |
| h4.modal-title |
| span {{ ctrl.options.title }} |
| button.close(type='button' aria-label='Close' ng-click='$hide()') |
| svg(ignite-icon="cross") |
| |
| .modal-body(ng-switch='ctrl.options.mode') |
| .row(ng-switch-when='text') |
| .col-100 |
| +form-field__text({ |
| label: '{{ ctrl.options.label }}', |
| model: 'ctrl.options.value', |
| name: '"inputDialogField"', |
| required: true, |
| placeholder: 'Enter value' |
| })( |
| ignite-form-field-input-autofocus='true' |
| ignite-on-enter='form.$valid && ctrl.confirm()' |
| ) |
| |
| .row(ng-switch-when='number') |
| .col-100 |
| +form-field__number({ |
| label: '{{ ctrl.options.label }}', |
| model: 'ctrl.options.value', |
| name: '"number"', |
| placeholder: '{{ ctrl.options.placeholder }}', |
| min: '{{ ctrl.options.min }}', |
| max: '{{ ctrl.options.max }}', |
| tip: '{{ ctrl.options.tip }}', |
| postfix: '{{ ctrl.options.postfix }}', |
| required: true |
| }) |
| |
| .row(ng-switch-when='email') |
| .col-100 |
| +form-field__email({ |
| label: '{{ ctrl.options.label }}', |
| model: 'ctrl.options.value', |
| name: '"email"', |
| required: true, |
| placeholder: 'Input email' |
| })( |
| ignite-form-field-input-autofocus='true' |
| ignite-on-enter='form.$valid && ctrl.confirm()' |
| ) |
| |
| .row(ng-switch-when='date') |
| .col-100 |
| .form-field--inline |
| +form-field__datepicker({ |
| label: '{{ ctrl.options.label }}', |
| model: 'ctrl.options.value', |
| name: '"date"', |
| minview: 0, |
| format: 'dd/MM/yyyy' |
| }) |
| |
| .row(ng-switch-when='time') |
| .col-100 |
| .form-field--inline |
| +form-field__timepicker({ |
| label: '{{ ctrl.options.label }}', |
| model: 'ctrl.options.value', |
| name: '"time"' |
| }) |
| |
| .row(ng-switch-when='date-and-time') |
| .col-100 |
| .form-field--inline |
| +form-field__datepicker({ |
| label: '{{ ctrl.options.label }}', |
| model: 'ctrl.options.value', |
| name: '"date"', |
| minview: 0, |
| format: 'dd/MM/yyyy' |
| }) |
| .form-field--inline |
| +form-field__timepicker({ |
| model: 'ctrl.options.value', |
| format: '{{ ctrl.options.format }}', |
| name: '"time"' |
| }) |
| .modal-footer |
| div |
| button#copy-btn-cancel.btn-ignite.btn-ignite--link-success(ng-click='$hide()') Cancel |
| button#copy-btn-confirm.btn-ignite.btn-ignite--success(ng-disabled='ctrl.form.$invalid' ng-click='ctrl.confirm()') Confirm |