4747 </div ><!-- col-md-6-->
4848 </div ><!-- form-group-->
4949
50- {{-- address --}}
5150 <div class =" form-group" >
52- {{ Form:: label (' address' , trans (' validation.attributes.frontend.register-user.address' ), [' class' => ' col-md-4 control-label' ]) } }
53- <div class =" col-md-6" >
54- {{ Form:: input (' textarea' , ' address' , null , [' class' => ' form-control' , ' placeholder' => trans (' validation.attributes.frontend.register-user.address' ), ' rows' => ' 3' ]) } }
55- </div ><!-- col-md-6-->
56- </div ><!-- form-group-->
57-
58- {{-- state --}}
59- <div class =" form-group" >
60- {{ Form:: label (' state_id' , trans (' validation.attributes.frontend.register-user.state' ). ' *' , [' class' => ' col-md-4 control-label' ]) } }
61- <div class =" col-md-6" >
62- {{ Form:: select (' state_id' , [] , null , [' class' => ' form-control select2' , ' placeholder' => trans (' validation.attributes.frontend.register-user.state' ), ' id' => ' state' ]) } }
63- </div ><!-- col-md-6-->
64- </div ><!-- form-group-->
65-
66- {{-- city --}}
67- <div class =" form-group" >
68- {{ Form:: label (' city_id' , trans (' validation.attributes.frontend.register-user.city' ). ' *' , [' class' => ' col-md-4 control-label' ]) } }
69- <div class =" col-md-6" >
70- {{ Form:: select (' city_id' , [], null , [' class' => ' form-control select2' , ' placeholder' => trans (' validation.attributes.frontend.register-user.city' ), ' id' => ' city' ]) } }
71- </div ><!-- col-md-6-->
72- </div ><!-- form-group-->
73-
74- {{-- zipcode --}}
75- <div class =" form-group" >
76- {{ Form:: label (' zip_code' , trans (' validation.attributes.frontend.register-user.zipcode' ). ' *' , [' class' => ' col-md-4 control-label' ]) } }
77- <div class =" col-md-6" >
78- {{ Form:: input (' name' , ' zip_code' , null , [' class' => ' form-control' , ' placeholder' => trans (' validation.attributes.frontend.register-user.zipcode' )]) } }
79- </div ><!-- col-md-6-->
80- </div ><!-- form-group-->
81-
82- {{-- SSN --}}
83- <div class =" form-group" >
84- {{ Form:: label (' ssn' , trans (' validation.attributes.frontend.register-user.ssn' ). ' *' , [' class' => ' col-md-4 control-label' ]) } }
85- <div class =" col-md-6" >
86- {{ Form:: input (' name' , ' ssn' , null , [' class' => ' form-control' , ' placeholder' => trans (' validation.attributes.frontend.register-user.ssn' )]) } }
87- </div ><!-- col-md-6-->
88- </div ><!-- form-group-->
89-
90- <div class =" form-group" >
91-
92-
9351 <div class =" col-xs-7" >
94-
95-
9652 <label class =" col-md-12 control-label" >
9753 {!! Form:: checkbox (' is_term_accept' ,1 ,false ) ! !}
9854 I accept {!! link_to_route (' frontend.cmspages.show' , trans (' validation.attributes.frontend.register-user.terms_and_conditions' ). ' *' , [' page_slug' => ' terms-and-conditions' ]) ! !} </label >
13692 $ (document ).ready (function () {
13793 // To Use Select2
13894 Backend .Select2 .init ();
139-
140- // Getting States of default contry
141- ajaxCall (" {{ route (' frontend.get.states' )} }" );
142-
143- var old_state = " {{ old (' state_id' ) } }" ;
144- var old_city = " {{ old (' city_id' ) } }" ;
145-
146- if (old_state != ' ' )
147- {
148- ajaxCall (" {{ route (' frontend.get.states' )} }" );
149- }
150-
151- // Getting Cities of select State
152- $ (" #state" ).on (" change" , function () {
153- var stateId = $ (this ).val ();
154- var url = " {{ route (' frontend.get.cities' )} }" ;
155- ajaxCall (url, stateId);
156- });
157-
158- function ajaxCall (url , data = null )
159- {
160- $ .ajax ({
161- url: url,
162- type: " POST" ,
163- data: {stateId: data},
164- success : function (result ) {
165- if (result != null )
166- {
167- var options;
168- $ .each (result .data , function (key , value ) {
169- options += " <option value='" + key + " '>" + value + " </option>" ;
170- });
171- if (result .status == " city" )
172- {
173- $ (" #city" ).html (' ' );
174- $ (" #city" ).append (options);
175-
176- if (old_city != ' ' )
177- {
178- $ (" #city" ).val (old_city).trigger (' change' );
179- }
180- }
181- else
182- {
183- $ (" #state" ).append (options);
184-
185- if (old_state != ' ' )
186- {
187- $ (" #state" ).val (old_state).trigger (' change' );
188- }
189- }
190- }
191- }
192- });
193- }
19495 });
19596 </script >
196- @endsection
97+ @endsection
0 commit comments