<div class="box">
    <div class="box-title">
        {!! Theme::section('community.pannel.ownemails.menu',['subpage'=>'welcome']) !!}
    </div>
    
    <div class="box-content">
    	<br>
		<p>
			<span class="brand-colored-texts">{{trans('organizationsettings.forgot-password-link')}}</span> : <strong>{{$community->present()->url('forgotpass')}}</strong>
		</p>
      		
		@if($community->race_community==1)
			<p><span class="brand-colored-texts">Student verification link</span> : <strong>{{URL::route('community-ride-student-verification',['slug'=>$community->id])}}</strong></p>
		@endif		
        
		
        <form class="form-horizontal" role="form" action="" method="post" enctype="multipart/form-data">
			 {{ csrf_field() }}
              @if(!empty($message))
               <div class="alert alert-dismissible alert-success"> 
					<a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>{!! $message !!}
               </div>
          	   <br />
              @endif
              
              <div class="form-group">
                    <label class="col-sm-12 control-label">{{trans('organizationsettings.welcome-email-subject')}}</label>
                    <div class="col-sm-12" style="margin-top:10px;">
                    	<input type="text" class="form-control" name="val[welcome_email_subject]" value="@if($community->welcome_email_subject){{$community->welcome_email_subject}}@else Welcome at {{$community->title}} @endif"  required="required" placeholder="{{trans('organizationsettings.enter-welcome-email-subject')}}"/>
                    </div>
              </div>      	
                
              <div class="form-group">
                    <label class="col-sm-12 control-label">{{trans('organizationsettings.welcome-email-body')}}</label>
                    <div class="col-sm-12" style="margin-top:10px;">
                          <textarea class="form-control community-description" name="val[welcome_email]" placeholder="{{trans('organizationsettings.enter-welcome-email-body')}}" required="required">
                          @if($community->welcome_email)
                          	{{$community->welcome_email}}
                          @else 
                         	<h2>"Welcome to {{$community->title}}"</h2>

                            <div>
                                Thank you for being a team member at {{$community->title}}  platform. This platform will allow us to share our monthly meetings, agenda, meeting notes, and other relevant information to this group.
                                
                                <br/>
                                
                                @if($community->email_signature)
                                    {{$community->email_signature}}
                                @else	
                                    <p>
                                        Sincerely,<br/><br/>
                                        
                                        <strong>{{$community->title}}</strong><br/>                
                                        Tel: {{$community->contact}}<br/>
                                        Email: {{$community->email}}<br/>
                                        
                                        <br>
                                                   
                                        <hr>
                                        <?php $imgPath=$community->present()->getLogo(); ?>
                                        <a href="{{$community->present()->url()}}"><img src="{{ltrim($imgPath)}}" style="width:200px; height:auto; "/></a>
                                        <br>
                                        <br>
                                        {{$community->description}}<br/>
                                    </p>
                            	@endif
                            </div> 
                          @endif
                        </textarea>
                    </div>
              </div>
              
              <br />
              <br />
              
              <div class="form-group">
                    <label class="col-sm-12 control-label">{{trans('organizationsettings.activation-email-subject')}}</label>
                    <div class="col-sm-12" style="margin-top:10px;">
                    	<input type="text" class="form-control" name="val[activation_email_subject]" value="@if($community->activation_email_subject){{$community->activation_email_subject}}@else {{$community->title}} Community Account activation @endif"  required="required" placeholder="{{trans('organizationsettings.enter-activation-email-subject')}}"/>
                    </div>
              </div>
              
              <div class="form-group">
                    <label class="col-sm-12 control-label">{{trans('organizationsettings.activation-email-body')}}</label>
                    <div class="col-sm-12" style="margin-top:10px;">
                    	<?php 
							$community_name=$community->title;
							$email_address="";
							$hash="";
							$community_acivation_url=$community->present()->url('accountactivate');
						?>
                        <textarea class="form-control community-description" name="val[activation_email]" placeholder="{{trans('organizationsettings.enter-activation-email-body')}}" required="required">
                        	@if($community->activation_email)
                            	{{$community->activation_email}}
                            @else
                                 <h2> {{$community_name}} Community Account Activation </h2>
                                
                                <div>
                                    To activate your account please kindly click this link and follow further instructions :
                                    
                                
                                        <a href="{{$community_acivation_url}}?email=<?php echo $email_address."&code=".$hash;?>">{{$community_acivation_url}}?email=<?php echo $email_address."&code=".$hash;?></a>
                                
                                    
                                        
                                    <br/><br/>
                                    Have a good time at {{$community_name}} community!
                                    <br/><br/>
                                
                                    <p>Best Wishes,<br/>
                                    {{$community_name}} community Team<br/>
                                    </p>
                                 </div>   
                            @endif
                        </textarea>  
                    </div>
              </div>
              
              <br />
              <br />
              
               <div class="form-group">
                    <label class="col-sm-12 control-label">{{trans('organizationsettings.activation-successfull-email-subject')}}</label>
                    <div class="col-sm-12" style="margin-top:10px;">
                    	<input type="text" class="form-control" name="val[activation_successfull_email_subject]" value="@if($community->activation_successfull_email_subject){{$community->activation_successfull_email_subject}}@else Your account has been activated successfully @endif" required="required" placeholder="{{trans('organizationsettings.enter-successfull-activation-email-subject')}}"/>
                    </div>
              </div>
              
              <input type="hidden" class="editor_image_upload_community" value="{{$community->id}}" />
              <input type="hidden" class="editor_image_upload_type" value="community-welcome-emails" />
              
              <div class="form-group">
                    <label class="col-sm-12 control-label">{{trans('organizationsettings.activation-successfull-email-body')}} <span class="brand-colored-texts">(Don't change the 'user_fullname' and 'user_email_address' in below email)</span></label>
                    <div class="col-sm-12" style="margin-top:10px;">
                    	<?php 
						?>
                        <textarea class="form-control community-description" name="val[activation_successfull_email]" placeholder="{{trans('organizationsettings.enter-successfull-activation-email-body')}}" required="required">
                        	@if($community->activation_successfull_email)
                            	{!! $community->activation_successfull_email !!}
                            @else
                                 <h2>Hello 'user_fullname',</h2>

                                <h2>Congratulations!</h2>
                                
                                <div>
                                    Your account is now active. <br/> <br/>
                                    
                                     
                                    You can now use the following to start using the platform:<br/> <br/>
                                    
                                    Platform Url: : <a href="{{$community->present()->url()}}">"{{$community_name}}"</a><br />
                                    User name : 'user_email_address'<br />
                                    Password : Use the provided password at the time of sign up or reset the password using <a href="{{$community->present()->url('forgotpass')}}">forgot passport action link</a>.
                                     
                                    <br/><br />
                                        If you further need assistance please let us know.
                                    <br/><br/>
                        
                        			@if($community->email_signature)
                                        {!! $community->email_signature !!}
                                    @else
                                        <p>
                                            Sincerely,<br/><br/>
                                            
                                            <strong>{!! $community->title !!}</strong><br/>
                                            {!! $community->address !!}<br>{{ucfirst($community->city)}},{{$community->zip}}<br>{{ucfirst($community->state)}},{{ucfirst($community->country)}}<br/>
                                            Tel: {!! $community->contact !!}<br/>
                                            Email: {!! $community->email !!}<br/>
                                            
                                            <br>
                                                       
                                            <hr>
                                            <?php $imgPath=$community->present()->getLogo(); ?>
                                            <a href="{{$community->present()->url()}}"><img src="{{ltrim($imgPath)}}" style="width:200px; height:auto; "/></a>
                                            <br>
                                            <br>
                                            {!! $community->description !!}<br/>
                                        </p>
                                    @endif
                                </div>  
                            @endif
                        </textarea>  
                    </div>
              </div>
              
              <div class="form-group">
                <div class="col-sm-12">
                  <button type="submit" class="btn red-color-button pull-right">{{trans('organizationsettings.welcome-email-save-btn')}}</button>
    
                </div>
        	  </div>
		</form>
		 <br />
    </div>	
</div>
