pixelfed/resources/views/site/contact.blade.php

64 lines
2.8 KiB
PHP
Raw Normal View History

2019-06-06 04:31:25 +00:00
@extends('site.partial.template')
@section('section')
<div class="title">
2019-06-18 20:19:49 +00:00
<h3 class="font-weight-bold">{{__('site.contact-us')}}</h3>
2019-06-06 04:31:25 +00:00
</div>
<hr>
<section>
@auth
2019-06-18 20:23:21 +00:00
<p class="lead">
2019-06-19 00:39:46 +00:00
@if(config('instance.email') && config('instance.contact.enabled'))
2024-11-12 19:39:14 +00:00
{{__('site.you_can_contact_the_admins')}} {{__('site.by_sending_an_email_to')}} <span class="font-weight-bold">{{config('instance.email')}}</span> {{__('site.or')}} {{__('site.by_using_the_form_below')}}.
2019-06-19 00:39:46 +00:00
@elseif(config('instance.email') && !config('instance.contact.enabled'))
2024-11-12 19:39:14 +00:00
{{__('site.you_can_contact_the_admins')}} {{__('site.by_sending_an_email_to')}} <span class="font-weight-bold">{{config('instance.email')}}</span>.
2019-06-19 00:39:46 +00:00
@elseif(!config('instance.email') && config('instance.contact.enabled'))
2024-11-12 19:39:14 +00:00
{{__('site.you_can_contact_the_admins')}} {{__('site.by_using_the_form_below')}}.
2019-06-19 00:39:46 +00:00
@else
2024-11-12 19:39:14 +00:00
{{__('the_admins_have_not_set_a_contact_email_address')}}
2019-06-18 20:23:21 +00:00
@endif
</p>
2019-06-18 20:29:22 +00:00
@if(config('instance.contact.enabled'))
2019-06-06 04:31:25 +00:00
<form method="POST">
@csrf
<div class="form-group">
2024-11-12 19:39:14 +00:00
<label for="input1" class="font-weight-bold">{{__('site.Message')}}</label>
2022-12-27 11:24:55 +00:00
<textarea class="form-control" id="input1" name="message" rows="6" placeholder="" maxlength="500" required>{{old('message')}}</textarea>
2019-06-06 04:31:25 +00:00
<span class="form-text text-muted text-right msg-counter">0/500</span>
</div>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="input2" name="request_response">
2024-11-12 19:39:14 +00:00
<label class="form-check-label" for="input2">{{__('site.request_response_from_admins')}}</label>
2019-06-06 04:31:25 +00:00
</div>
2024-11-12 19:39:14 +00:00
<button type="submit" class="btn btn-primary font-weight-bold py-0">{{__('site.Submit')}}</button>
2019-06-06 04:31:25 +00:00
</form>
2019-06-18 20:29:22 +00:00
@endif
2019-06-06 04:31:25 +00:00
@else
<p class="lead">
2019-06-19 00:49:45 +00:00
@if(config('instance.email') && config('instance.contact.enabled'))
2024-11-12 19:39:14 +00:00
{{__('site.you_can_contact_the_admins')}} {{__('site.by_sending_an_email_to')}} <span class="font-weight-bold">{{config('instance.email')}}</span> {{__('site.or')}} {{__('site.log_in_to_send_a_message')}}.
2019-06-19 00:49:45 +00:00
@elseif (!config('instance.email') && config('instance.contact.enabled'))
2024-11-12 19:39:14 +00:00
{{__('the_admins_have_not_set_a_contact_email_address')}}. {{__('site.Please')}} {{__('site.log_in_to_send_a_message')}}.
2019-06-19 00:49:45 +00:00
@elseif (config('instance.email') && !config('instance.contact.enabled'))
2024-11-12 19:39:14 +00:00
{{__('site.you_can_contact_the_admins')}} {{__('site.by_sending_an_email_to')}} <span class="font-weight-bold">{{config('instance.email')}}</span>.
2019-06-06 04:31:25 +00:00
@endif
</p>
@endauth
</section>
@endsection
@auth
@push('styles')
<meta name="csrf-token" content="{{ csrf_token() }}">
@endpush
@push('scripts')
<script type="text/javascript">
$('#input1').on('keyup change paste', function(el) {
let len = el.target.value.length;
$('.msg-counter').text(len + '/500');
});
</script>
@endpush
@endauth