<script type="text/javascript" src="https://js.stripe.com/v2/"></script>
{!! Theme::section('community.stripe-js') !!}
<div class="container page-content clearfix communities-joined-list-page">
	<br />
    <div class="box">
    
    	<?php	
			$myOwnedCommunity= \Auth::user()->present()->ownCommunity()
		?>
        
        <div class="box-title">Create your community <a href="{{URL::previous()}}" class="close-create-cm-form"><i class="fa fa-times" aria-hidden="true"></i></a></div>
        <div class="box-content cretate-cm-content">
            @if(!empty($message))
                <div class="alert alert-danger">{!! $message !!}</div>
            @endif
            
            <div class="account-setup-form">
            	<div class="row">
                	<div class="col-sm-4">
                    	<ul class="account-complete-menu">
                            <li class='account-complete-organization @if(!$myOwnedCommunity) active @endif'>Organization details</li>
                            <li class='account-complete-payment @if($myOwnedCommunity) active @endif'>Payment details</li>
                        </ul>
                    </div>
                    
                    <div class="col-sm-8">                    
                       <div class="complete-account-box"> 
                          <form  action="" method="post" id="cretate-cm-form">
                          {{ csrf_field() }}
                          
                          	<input type="hidden" id="my_lg_ky" name="my_lg_ky" />
                            <input type="hidden" id="my_rd_uri" name="my_rd_uri" />
                            
                            @if($myOwnedCommunity)
 								<input type="hidden" id="my_community_id" name="my_community_id" value="{{$myOwnedCommunity->id}}" />
                            @else
                            	<input type="hidden" id="my_community_id" name="my_community_id" />
                            @endif
                                
                          	<input type="hidden" id="my_uuid" name="my_uuid" value="{{Auth::user()->id}}"/>
                                <div class="account-organization-information">
                             
                                    <div class="account-organization-information">                              		<div class='account-info-row'>	
                                         <span class='mondatory-note'>Fields with <strong>*</strong> are mandatory</span> 
                                    </div>
                                    
                                    <div class="own-organization-info">
                                    	                        
                                    
                                        <div class='account-info-row'>	
                                            <input type="text" class="form-control account-form-field" placeholder="Your organization name*" name="own_org_name" id="own_org_name" autocomplete='off' @if($myOwnedCommunity) value="{{$myOwnedCommunity->title}}" @endif/>
                                        </div>
                                            
                                        <div class='account-info-row'>	
                                            <input type="text" class="create-community-slug-input form-control account-form-field" placeholder="Type a name for your website*" data-target="#public-slug" data-id="0" name="own_org_link" id="create-community-slug-input" autocomplete='off' style="float:left;" @if($myOwnedCommunity) value="{{$myOwnedCommunity->slug}}" @endif/>
                                            <input type="button" class="btn search-slug-btn search-slug-btn-community" value="{{trans('website.check')}}" data-target="#public-slug" @if($myOwnedCommunity) data-id="{{$myOwnedCommunity->id}}" @else data-id="0" @endif>
                                            
                                            <?php
                                                $urlDomain="";
                                                $scheme="";
                                                $mainUrl=parse_url(Config::get('app.url'));
                                                if(isset($mainUrl['host'])){
                                                    $urlDomain=$mainUrl['host'];
                                                    $scheme=$mainUrl['scheme'];
                                                }
                                           ?>
                                           
                                            <div class="clearboth"></div>
                   
                                            <span class="slug-availability slug-availability-community">
                                    
                                            </span>
                                            
                                            <input type="hidden" name="url_available" id="url_available">
                               
                                            <p class="help-block help-block-comunity" style="color:#673ab7; font-size:14px;">Your public access URL will be <strong style="color:#000">{{$scheme}}://<strong><span id="public-slug" style="color:#F00">@if($myOwnedCommunity){{$myOwnedCommunity->slug}}@endif</span></strong>.{{$urlDomain}}</strong></p>
                                        </div>
                                            
                                        <div class='account-info-row'>
                                            <div class="form-group searchBoxContainer1">		
                                                <input type="text" class="autoaddress-street1 form-control account-form-field" placeholder="Organization address*" name="own_org_address" id="addressSearchBox1" autocomplete='off' @if($myOwnedCommunity) value="{{$myOwnedCommunity->address}}" @endif/>
                                                
                                            </div>    
                                        </div>
                                            
                                        <div class='account-info-row'>	
                                            <input type="text" class="autoaddress-city1 form-control account-form-field" placeholder="City*" name="own_org_city" id="own_org_city" autocomplete='off' @if($myOwnedCommunity) value="{{$myOwnedCommunity->city}}" @endif/>
                                        </div>
                                            
                                        <div class='account-info-row'>	
                                            <input type="text" class="autoaddress-state1 form-control account-form-field" placeholder="State/Province*" name="own_org_state" id="own_org_state" autocomplete='off' @if($myOwnedCommunity) value="{{$myOwnedCommunity->state}}" @endif/>
                                        </div>
                                            
                                        <div class='account-info-row'>	
                                            <input type="text" class="autoaddress-country1 form-control account-form-field" placeholder="Country*" name="own_org_country" id="own_org_country" autocomplete='off' @if($myOwnedCommunity) value="{{$myOwnedCommunity->country}}" @endif/>
                                        </div>
                                            
                                        <div class='account-info-row'>	
                                            <input type="text" class="autoaddress-zipcode1 form-control account-form-field" placeholder="Zip/Pin Code*" name="own_org_zip" id="own_org_zip" autocomplete='off' @if($myOwnedCommunity) value="{{$myOwnedCommunity->zip}}" @endif/>
                                        </div>
                                            
                                        <div class='account-info-row-error-own'>
                                 
                                         </div>
                                            
                                        <div class='account-info-row'>	
                                              <input type="button" value='NEXT' class='own-continue-next-btn btn account-continue-next-btns' />   
                                              
                                              <?php
													$resumeData=\Auth::user()->present()->isResumeCreated();
													if(!$resumeData){
														$desUrl = \URL::route('ip-create');
													}else{
														$desUrl = \URL::to('ip/')."/".$resumeData->slug."/manage";
													}
											  ?> 
                                              
                                              <input type="hidden" id="user_redirect_url" name="user_redirect_url" value="{{$desUrl}}" />
                                              
                                              @if($organizationDetails)
												  
                                                  <a href="{{$desUrl}}" style="color:#F00; margin-left:30px;">
                                                      Skip for now
                                                  </a>   
                                              @else
                                              	<span class='own-skip-update-later skip-update-later'>
                                                  		Skip for now
                                                </span>
                                              @endif                                            
                                        </div>
                                      </div>
                                      
                                      <div class="working-organization-info" style="display:none">                                     		
                                       		<div class='account-info-row'><strong>Would you like to share about your Organization</strong></div>
                                            
                                            <div class='account-info-row'>
                                                <label class="radio-inline">
                                                    <input type="radio" name="wouldyouliketoshare" class="wouldyouliketoshare" checked value='yes'>Yes
                                                </label>
                                             
                                                <label class="radio-inline" style="margin-left:20px;">
                                                     <input type="radio" name='wouldyouliketoshare' class="wouldyouliketoshare" value='no'>Skip for now 
                                                </label>
                                     		</div>
                                            
                                            <div class="like-to-share-working" style="margin-top:30px;">
                                                <div class='account-info-row'>	
                                                     <span class='mondatory-note'>Fields with <strong>*</strong> are mandatory</span> 
                                                </div>	
                                            
                                           
                                                <div class='account-info-row'>	
                                                    <input type="text" class="form-control account-form-field" placeholder="Organization name*" name="working_org_name" id="working_org_name" autocomplete='off'/>
                                                </div>
                                                
                                                <div class='account-info-row'>	
                                                    <input type="text" class="form-control account-form-field" placeholder="Your title*" name="working_org_designation" id="working_org_designation" autocomplete='off'/>
                                                </div>
                                                
                                                <div class='account-info-row'>	
                                                    <input type="number" class="form-control account-form-field" placeholder="Years of industry experience" name="working_org_exp" id="working_org_exp" autocomplete='off'/>
                                                </div>
                                                
                                                <div class='account-info-row'>
                                                    <div class="form-group searchBoxContainer" style="position:relative">	
                                                        <input type="text" class="form-control account-form-field autoaddress-street" placeholder="Address*" name="working_org_address" id="addressSearchBox" autocomplete='off'/>
                                                    </div>    
                                                </div>
                                                
                                                <div class='account-info-row'>	
                                                    <input type="text" class="autoaddress-city form-control account-form-field" placeholder="City*" name="working_org_city" id="working_org_city" autocomplete='off'/>
                                                </div>
                                                
                                                <div class='account-info-row'>	
                                                    <input type="text" class="autoaddress-state form-control account-form-field" placeholder="State/Province*" name="working_org_state" id="working_org_state" autocomplete='off'/>
                                                </div>
                                                
                                                <div class='account-info-row'>	
                                                    <input type="text" class="autoaddress-country form-control account-form-field" placeholder="Country*" name="working_org_country" id="working_org_country" autocomplete='off'/>
                                                </div>
                                                
                                                <div class='account-info-row'>	
                                                    <input type="text" class="autoaddress-zipcode form-control account-form-field" placeholder="Zip/Pin Code*" name="working_org_zip" id="working_org_zip" autocomplete='off'/>
                                                </div>
                                                
                                                 <div class='account-info-row-error-working'>
                                         
                                                 </div>
                                                 
                                                 <div class='account-info-row'>	
                                                      <input type="button" value='NEXT' class='working-continue-next-btn btn account-continue-next-btns' />
                                                     <?php /*?> <span class='working-skip-update-later skip-update-later'>
                                                            Skip for now
                                                      </span><?php */?>
                                            	</div>
                                     	   </div>
                                       </div>  
                                   </div>
                               </div>      
                               
                               <div class="account-credit-card-information">
							   
									<div class='account-info-row'>
                                            <strong>Select and verify the plan</strong> <a href="https://idhubs.com/pg/pricing" target="_blank" style="margin-left:5px; color:#673ab7; font-size:22px;"><i class="fa fa-exclamation-circle" aria-hidden="true"></i></a>
									</div>
										
									<div class='account-info-row'>
											<!--<div class="form-check">
												  <input class="form-check-input org_plan_selected" type="radio" name="org_plan_selected" data-type="{{$plan1->is_plan_free}}" value="{{$plan1->plan_id}}" @if($myOwnedCommunity and $myOwnedCommunity->pricing_plan==1) checked="checked" @elseif($plan1->default_plan==1) checked="checked" @endif>
												  <label class="form-check-label" style="font-weight:normal"> 
													{{$plan1->plan_name}}
												  </label>
											</div>-->
											
											<div class="form-check">
												 <input class="form-check-input org_plan_selected" type="radio" name="org_plan_selected" data-type="{{$plan2->is_plan_free}}" value="{{$plan2->plan_id}}" @if($myOwnedCommunity and $myOwnedCommunity->pricing_plan==2) checked="checked" @elseif($plan2->default_plan==1) checked="checked" @endif>
												  <label class="form-check-label" style="font-weight:normal">
													{{$plan2->plan_name}}
												  </label>
											</div>
											
											<div class="form-check">
												 <input class="form-check-input org_plan_selected" type="radio" name="org_plan_selected" data-type="{{$plan3->is_plan_free}}" value="{{$plan3->plan_id}}" @if($myOwnedCommunity and $myOwnedCommunity->pricing_plan==3) checked="checked" @elseif($plan3->default_plan==1)  @endif>
												  <label class="form-check-label" style="font-weight:normal">
													{{$plan3->plan_name}}
												  </label>
											</div>
									</div> 

									<div class='account-info-row'>
										<div class="trial-period-note-plan-2" style="@if($myOwnedCommunity and $myOwnedCommunity->pricing_plan==2) display:block; @endif">
											After the <strong>{{$plan2->trial_days}} days</strong> trial period, a charge of <strong>${{number_format($plan2->price_yearly, 2, '.', ',')}}</strong> will be applied to your card for <strong>{{$plan2->user_limit}} users</strong> for a duration of <strong>12 months</strong>
										</div>		

										<div class="trial-period-note-plan-3" style="@if($myOwnedCommunity and $myOwnedCommunity->pricing_plan==3) display:block; @endif">
											After the <strong>{{$plan3->trial_days}} days</strong> trial period, a charge of <strong>${{number_format($plan3->price_yearly, 2, '.', ',')}}</strong> will be applied to your card for <strong>{{$plan3->user_limit}} users</strong> for a duration of <strong>12 months</strong>
										</div>		
									</div>			
							   
                                    <div class='account-info-row'>	
                                         <span class='mondatory-note mondatory-note-card'>Your card will not be charged during your trial period</span>
                                    </div>
                                    
                                    <div class='account-info-row'>	
                                        <input type="text" class="form-control account-form-field" placeholder="Card number*" name="card_number" id="card_number" autocomplete='off'/>
                                    </div>
                                    
                                    
                                    <div class='account-info-row card-details-info-row'>	
                                       
                                        <select class="account-select-field card-input-values" id='card_month' name='card_month'>
                                            <option value=''>Expiry Month</option>
                                            <option value='01'>01</option>
                                            <option value='02'>02</option>
                                            <option value='03'>03</option>
                                            <option value='04'>04</option>
                                            <option value='05'>05</option>
                                            <option value='06'>06</option>
                                            <option value='07'>07</option>
                                            <option value='08'>08</option>
                                            <option value='09'>09</option>
                                            <option value='10'>10</option>
                                            <option value='11'>11</option>
                                            <option value='12'>12</option>
                                        </select>
                                        
                                        <select class="account-select-field card-input-values" id='card_year' name='card_year'>
                                            <option value=''>Expiry Year</option>
                                            <?php 
												$current_year=date("Y");
												$last_year=date('Y', strtotime('+14 years'));
											?>
										
											@for($y=$current_year;$y < $last_year;$y++)
												<option value="{{$y}}">{{$y}}</option>
											@endfor 
                                        </select>
                                        
                                         <input type="password" class="accept_only_numbers form-control account-form-field card-input-values card-cvv-number" placeholder="CVC number*" name="card_cvv" id="card_cvv" autocomplete='off'/>
                                    </div>
                                    
                                   <!-- <div class='account-info-row'>	
                                       
                                    </div>-->
                                    
                                    <div class='account-info-row'>	
                                        <input type="text" class="form-control account-form-field" placeholder="Name on the card*" name="card_name" id="card_name" autocomplete='off'/>
                                    </div>
									
									<div class='account-info-row'>
										 <div class="form-check" style="display: inline-block; margin-right:20px">
											   <input class="form-check-input card_billing_address" type="radio" checked name="card_billing_address" value="1">
											   <label class="form-check-label" style="font-weight:normal">
													Add Billing Address
											   </label>
										</div>
										
										<div class="form-check" style="display: inline-block;">
											   <input class="form-check-input card_billing_address" type="radio" name="card_billing_address" value="0">
											   <label class="form-check-label" style="font-weight:normal">
													Same as Office address
											   </label>
										</div>
									</div>
                                    
									<div class="card-billing-address-box">
										<div class='account-info-row'>	
											  <div class="form-group searchBoxContainer2">		
												<input type="text" class="autoaddress-street2 form-control account-form-field" placeholder="Billing address*" name="billing_address" id="addressSearchBox2" autocomplete='off'/>
											  </div>  
										</div>
										
										<div class='account-info-row'> 	
											<input type="text" class="autoaddress-city2 form-control account-form-field" placeholder="City*" name="billing_city" id="billing_city" autocomplete='off'/>
										</div>
										
										 <div class='account-info-row'>	
											<input type="text" class="autoaddress-state2 form-control account-form-field" placeholder="State/province*" name="billing_state" id="billing_state" autocomplete='off'/>
										</div>
										
										<div class='account-info-row'>	
											<input type="text" class="autoaddress-country2 form-control account-form-field" placeholder="Country*" name="billing_country" id="billing_country" autocomplete='off'/>
										</div>
										
										<div class='account-info-row'>	
											<input type="text" class="autoaddress-zipcode2 form-control account-form-field" placeholder="Zip/Pin Code*" name="billing_zip" id="billing_zip" autocomplete='off'/>
										</div>
                                    </div>
									
                                    <div class='account-info-row-error-card'>
                             
                                     </div>
                                    
                                    <div class='account-info-row'>	
                                          <input type="button" value='NEXT' class='credit-continue-next-btn btn account-continue-next-btns' onclick="stripePay(event)" />
                                          <span class='credit-skip-update-later skip-update-later'>
                                               Cancel
                                          </span>
                                    </div>
                             </div>
                    		</form>
                		</div>
                  </div>         
            </div>    
            <br />
        </div>
    </div>
</div>


<script type='text/javascript' src='//www.bing.com/api/maps/mapcontrol?callback=GetMap' async defer></script>
