-
+
+ 'appointment-form',
+ 'method' => 'POST',
+ 'action' => '/site/feedback',
+ ]
+ );
+
+ echo Html::hiddenInput('type', 'appointment');
+ echo $formAppointment->field(
+ $appointment,
+ "name",
+ [
+ 'options' => [
+ 'class' => 'form-group field-appointment-name',
+ ],
+ 'template' => "
{label}\n{input}\n",
+ 'inputOptions' => [
+ 'id' => 'appointment-name'
+ ],
+ 'labelOptions' => [
+ 'for' => 'appointment-name',
+ 'class' => 'control-label'
+ ],
+ ]
+ )
+ ->label(
+ "Имя"
+ );
+
+ echo $formAppointment->field(
+ $appointment,
+ "phone",
+ [
+ 'options' => [
+ 'class' => 'form-group field-appointment-phone',
+ ],
+ 'template' => "
{label}\n{input}\n",
+ 'inputOptions' => [
+ 'id' => 'appointment-phone'
+ ],
+ 'labelOptions' => [
+ 'for' => 'appointment-phone',
+ 'class' => 'control-label'
+ ],
+ ]
+ )
+ ->label(
+ "Номер телефона"
+ );
+
+ echo $formAppointment->field(
+ $appointment,
+ "date",
+ [
+ 'options' => [
+ 'class' => 'form-group field-appointment-date has-datepicker',
+ ],
+ 'template' => "
{label}\n{input}\n",
+ 'inputOptions' => [
+ 'id' => 'appointment-date'
+ ],
+ 'labelOptions' => [
+ 'for' => 'appointment-date',
+ 'class' => 'control-label'
+ ],
+ ]
+ )
+ ->label(
+ "Дата"
+ );
+ echo "
";
+
+ echo $formAppointment->field(
+ $appointment,
+ "time",
+ [
+ 'options' => [
+ 'class' => 'form-group field-appointment-time',
+ ],
+ 'template' => "
{label}\n{input}\n",
+ 'inputOptions' => [
+ 'id' => 'appointment-time'
+ ],
+ 'labelOptions' => [
+ 'for' => 'appointment-time',
+ 'class' => 'control-label'
+ ],
+ ]
+ )
+ ->label(
+ "Время"
+ );
+
+ echo $formAppointment->field(
+ $appointment,
+ "service",
+ [
+ 'options' => [
+ 'class' => 'form-group field-appointment-service',
+ ],
+ 'template' => "
{label}\n{input}\n",
+ 'inputOptions' => [
+ 'id' => 'appointment-service'
+ ],
+ 'labelOptions' => [
+ 'for' => 'appointment-service',
+ 'class' => 'control-label'
+ ],
+ ]
+ )
+ ->label(
+ "Услуга"
+ );
+
+ echo Html::tag(
+ "p",
+ Html::button(
+ "Отправить",
+ [
+ 'type' => "submit",
+ 'class' => "send-form btn btn-lg btn-template-primary"
+ ]
+ ),
+ [
+ 'class' => "text-center"
+ ]
+ );
+
+ $formAppointment::end();
+ ?>
+
@@ -444,6 +552,8 @@ _________________________________________________________ -->
]
); ?>
+ = Html::hiddenInput('type', 'write_us');?>
+
= $form->field($feedback, 'name')
->textInput()
->Label('Имя'); ?>
diff --git a/frontend/web/js/jquery.maskedinput.js b/frontend/web/js/jquery.maskedinput.js
new file mode 100644
index 0000000..d4dfd01
--- /dev/null
+++ b/frontend/web/js/jquery.maskedinput.js
@@ -0,0 +1,7 @@
+/*
+ jQuery Masked Input Plugin
+ Copyright (c) 2007 - 2015 Josh Bush (digitalbush.com)
+ Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
+ Version: 1.4.1
+*/
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b,c=navigator.userAgent,d=/iphone/i.test(c),e=/chrome/i.test(c),f=/android/i.test(c);a.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},a.fn.extend({caret:function(a,b){var c;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof a?(b="number"==typeof b?b:a,this.each(function(){this.setSelectionRange?this.setSelectionRange(a,b):this.createTextRange&&(c=this.createTextRange(),c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",a),c.select())})):(this[0].setSelectionRange?(a=this[0].selectionStart,b=this[0].selectionEnd):document.selection&&document.selection.createRange&&(c=document.selection.createRange(),a=0-c.duplicate().moveStart("character",-1e5),b=a+c.text.length),{begin:a,end:b})},unmask:function(){return this.trigger("unmask")},mask:function(c,g){var h,i,j,k,l,m,n,o;if(!c&&this.length>0){h=a(this[0]);var p=h.data(a.mask.dataName);return p?p():void 0}return g=a.extend({autoclear:a.mask.autoclear,placeholder:a.mask.placeholder,completed:null},g),i=a.mask.definitions,j=[],k=n=c.length,l=null,a.each(c.split(""),function(a,b){"?"==b?(n--,k=a):i[b]?(j.push(new RegExp(i[b])),null===l&&(l=j.length-1),k>a&&(m=j.length-1)):j.push(null)}),this.trigger("unmask").each(function(){function h(){if(g.completed){for(var a=l;m>=a;a++)if(j[a]&&C[a]===p(a))return;g.completed.call(B)}}function p(a){return g.placeholder.charAt(a