phone-number-bundle icon indicating copy to clipboard operation
phone-number-bundle copied to clipboard

Possibility to override the label in country widget

Open mablae opened this issue 9 years ago • 13 comments

By passing in a closure into the form options it's possible to customize the way the label of the country field is formatted:

image

mablae avatar Apr 28 '16 13:04 mablae

Imo you should then also set the allowed types for this option to string and callable.

xabbuh avatar May 01 '16 19:05 xabbuh

@xabbuh Thanks for your feedback. I wasn't even sure if this is the right way to do it?

I will check the required types thing you mentioned

mablae avatar May 01 '16 20:05 mablae

What happened with this PR? can it be merged?

thoroc avatar Jun 26 '16 15:06 thoroc

@thoroc I forgot it to be honest. I will look into it tonight.

Thanks for the reminder

mablae avatar Jun 27 '16 16:06 mablae

@mablae @xabbuh @thewilkybarkid any chances of merging this?

thoroc avatar Jul 04 '16 09:07 thoroc

Sorry for the delay in looking at this. We'll need some test coverage before merging.

thewilkybarkid avatar Dec 17 '16 16:12 thewilkybarkid

@xabbuh @thewilkybarkid BUMP Please check this issue for merge as soon is possible, it is a nice feature could customize the label or even the class (the test coverage should be pretty simple)

shakaran avatar Feb 27 '17 13:02 shakaran

I just see to that the template https://github.com/misd-service-development/phone-number-bundle/blob/master/Resources/views/Form/tel_bootstrap.html.twig is not picket the default merge params in composed widget that should be useful.

For example in twig I have to hard customize as following via form.phone.country and via form.phone.number:

<div class="row-fluid inline" style="display:inline-block">
	<div class="inline 4u" style="display:inline-block">
	{{ form_widget(form.phone.country, {'attr' : { 'class' : 'control-label inline no-padding-right' } }) }}
	</div>
	
	<div class="inline 7u" style="display:inline-block">
	{{ form_widget(form.phone.number, {'attr' : { 'style': 'display:inline-block', 'class' : '10u col-sm-9 control-label inline no-padding-right' } }) }}
	</div>
</div>

shakaran avatar Feb 27 '17 15:02 shakaran

Any update on this? Seem to have a conflict in the PhoneNumberType?

yellow1912 avatar Nov 12 '17 04:11 yellow1912

Smth new about this issue?

myfbone avatar Mar 10 '19 12:03 myfbone

Maybe we should finally write the tests?

mablae avatar Mar 12 '19 16:03 mablae

@mablae @xabbuh @thewilkybarkid any update with this? would be nice to have it merged

jimiero avatar Apr 01 '19 07:04 jimiero

Any news?

kironet avatar Apr 05 '19 10:04 kironet