Add Afform field for input type `Url`
authorDominic Tubach <tubach@systopia.de>
Mon, 6 Nov 2023 10:21:12 +0000 (11:21 +0100)
committerDominic Tubach <tubach@systopia.de>
Mon, 6 Nov 2023 10:21:12 +0000 (11:21 +0100)
ext/afform/core/ang/af/fields/Url.html [new file with mode: 0644]

diff --git a/ext/afform/core/ang/af/fields/Url.html b/ext/afform/core/ang/af/fields/Url.html
new file mode 100644 (file)
index 0000000..d6e49b3
--- /dev/null
@@ -0,0 +1,6 @@
+<input ng-if=":: !$ctrl.defn.search_range" class="form-control" type="url" ng-required="$ctrl.defn.required" id="{{:: fieldId }}" ng-model="getSetValue" ng-model-options="{getterSetter: true}" placeholder="{{:: $ctrl.defn.input_attrs.placeholder }}" >
+<div ng-if=":: $ctrl.defn.search_range" class="form-inline">
+  <input class="form-control" type="url" id="{{:: fieldId }}" ng-model="dataProvider.getFieldData()[$ctrl.fieldName]['>=']" placeholder="{{:: $ctrl.defn.input_attrs.placeholder }}" >
+  <span class="af-field-range-sep">-</span>
+  <input class="form-control" type="url" id="{{:: fieldId }}2" ng-model="dataProvider.getFieldData()[$ctrl.fieldName]['<=']" placeholder="{{:: $ctrl.defn.input_attrs.placeholder2 }}" >
+</div>