mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#3891 [advs-module] Add an option to show/hide phone number
This commit is contained in:
parent
62b0939403
commit
aef34b2919
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Migration\Migration;
|
||||
|
||||
class VisiosoftModuleAdvsCreateShowPhoneNumberField extends Migration
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
//Maria DB will be removed when the version is updated.
|
||||
\Illuminate\Support\Facades\DB::getDoctrineSchemaManager()
|
||||
->getDatabasePlatform()->registerDoctrineTypeMapping('point', 'string');
|
||||
}
|
||||
|
||||
protected $delete = false;
|
||||
|
||||
protected $stream = [
|
||||
'slug' => 'advs',
|
||||
];
|
||||
|
||||
protected $fields = [
|
||||
'show_phone_number' => [
|
||||
'type' => 'anomaly.field_type.boolean',
|
||||
'config' => [
|
||||
'default_value' => true,
|
||||
'mode' => 'checkbox',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
protected $assignments = [
|
||||
'show_phone_number'
|
||||
];
|
||||
}
|
||||
@ -337,6 +337,9 @@ return [
|
||||
'owner' => 'Owner',
|
||||
'default_owner_instruction' => 'The owner will default to the current user if no user is selected',
|
||||
'create_page_subtitle' => 'Create the ad flawlessly by entering detailed information about your ad.',
|
||||
'with_my_phone_numbers' => 'With my phone numbers',
|
||||
'not_with_my_phone_numbers' => "I don't want to be reached by phone",
|
||||
'how_can_you_be_contacted' => "How can you be contacted?",
|
||||
|
||||
// Listing page
|
||||
'ad_title' => 'Ad title',
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
<div id="contactInfo" class="mb-3">
|
||||
<h3>{{ trans('visiosoft.module.advs::field.contact_info') }}</h3>
|
||||
{# TODO Add an option to show or hide phone number #}
|
||||
{# <div id="reachInfo">#}
|
||||
{# <p>Size nasıl ulaşılsın?</p>#}
|
||||
{# <div>#}
|
||||
{# <label class="mr-3">#}
|
||||
{# <input type="radio" class="mr-1" checked>#}
|
||||
{# Telefon numaralarım ile#}
|
||||
{# </label>#}
|
||||
{# <label>#}
|
||||
{# <input type="radio" class="mr-1">#}
|
||||
{# Telefonla ulaşılmak istemiyorum#}
|
||||
{# </label>#}
|
||||
{# </div>#}
|
||||
{# </div>#}
|
||||
<div id="reachInfo">
|
||||
{% set showPhoneNumber = form.fields.show_phone_number.value %}
|
||||
<p>{{ trans('visiosoft.module.advs::field.how_can_you_be_contacted') }}</p>
|
||||
<div>
|
||||
<label class="mr-3">
|
||||
<input type="radio" class="mr-1" name="show_phone_number" value="1" {{ showPhoneNumber ? 'checked' }}>
|
||||
{{ trans('visiosoft.module.advs::field.with_my_phone_numbers') }}
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" class="mr-1" name="show_phone_number" value="0" {{ not showPhoneNumber ? 'checked' }}>
|
||||
{{ trans('visiosoft.module.advs::field.not_with_my_phone_numbers') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="contactSummary" class="d-flex justify-content-between flex-wrap">
|
||||
<label>
|
||||
{{ trans('visiosoft.module.profile::field.name.name') }}
|
||||
|
||||
@ -82,7 +82,8 @@ class AdvFormBuilder extends FormBuilder
|
||||
'doc_files',
|
||||
'popular_adv',
|
||||
'adv_day',
|
||||
'product_options_value'
|
||||
'product_options_value',
|
||||
'show_phone_number'
|
||||
];
|
||||
|
||||
if (setting_value('visiosoft.module.advs::show_finish_and_publish_date')) {
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
{% else %}
|
||||
{% set showTheme = true %}
|
||||
{% endif %}
|
||||
{% if showTheme %}
|
||||
{% if showTheme and params.adv.show_phone_number.value %}
|
||||
{% set user = params.adv.created_by %}
|
||||
{% if user.gsm_phone is not null %}
|
||||
<div class="col-md-12 m-2 number-container">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user