Michael Posted August 31, 2013 Report Share Posted August 31, 2013 I'm not sure if I'm the only one but I think the domains are a bit cramped on the order form. So I was wondering it maybe you could make them have a set number per row. At the moment I've managed to do this with CSS but it's still not the best. Old: New: CSS Change if you wish to use this temp way: ul.domain_check label { margin-right: 10px !important; margin-top: 10px !important; } ul.domain_check input[type="checkbox"]{ margin-left: 7px !important; margin-top: 10px !important; } I put mine in the layout.css file in app/views/client/css/ Quote Link to comment Share on other sites More sharing options...
Gualter Posted August 31, 2013 Report Share Posted August 31, 2013 Create a new class .domainrow { display:inline-block; width: 50px; height: 14px; } <span or div class="domainrow">[ ] .com </span or /div> Please put here the file html Quote Link to comment Share on other sites More sharing options...
Gualter Posted August 31, 2013 Report Share Posted August 31, 2013 Please tell me what is the file? Quote Link to comment Share on other sites More sharing options...
Michael Posted August 31, 2013 Author Report Share Posted August 31, 2013 Create a new class .domainrow { display:inline-block; width: 50px; height: 14px; } <span or div class="domainrow">[ ] .com </span or /div> Please put here the file html I wish it was that easy mate haha this is the code for it: /plugins/order/views/templates/standard/types/domain/lookup.pdt <li> <?php foreach ($tlds as $tld => $pack) { $this->Form->fieldCheckbox("tlds[]", $tld, in_array($tld, $this->Html->ifSet($vars->tlds, array())), array('id' => "t" . $tld)); $this->Form->label($tld, "t" . $tld, array('class' => "inline")); } ?> </li> Quote Link to comment Share on other sites More sharing options...
Gualter Posted August 31, 2013 Report Share Posted August 31, 2013 Ehehehehe Try .domainrow { display:inline-block; width: 50px; height: 14px; } <li> <?php foreach ($tlds as $tld => $pack) { ?> <div class="domainrow"> <?php $this->Form->fieldCheckbox("tlds[]", $tld, in_array($tld, $this->Html->ifSet($vars->tlds, array())), array('id' => "t" . $tld)); $this->Form->label($tld, "t" . $tld, array('class' => "inline")); ?> </div> <?php } ?> </li> Quote Link to comment Share on other sites More sharing options...
Michael Posted August 31, 2013 Author Report Share Posted August 31, 2013 Ehehehehe Try .domainrow { display:inline-block; width: 50px; height: 14px; } <li> <?php foreach ($tlds as $tld => $pack) { ?> <div class="domainrow"> <?php $this->Form->fieldCheckbox("tlds[]", $tld, in_array($tld, $this->Html->ifSet($vars->tlds, array())), array('id' => "t" . $tld)); $this->Form->label($tld, "t" . $tld, array('class' => "inline")); ?> </div> <?php } ?> </li> Thanks for trying mate but yours did this: I think we need a way to limit the query to 9 per row. Quote Link to comment Share on other sites More sharing options...
Gualter Posted August 31, 2013 Report Share Posted August 31, 2013 please add border in class .domainrow { display:inline-block; width: 50px; height: 14px; border: 1px solid #000000; } and put here the screen Quote Link to comment Share on other sites More sharing options...
Michael Posted August 31, 2013 Author Report Share Posted August 31, 2013 please add border in class .domainrow { display:inline-block; width: 50px; height: 14px; border: 1px solid #000000; } and put here the screen That did this: http://billing.cubicwebs.com/plugin/order/main/preconfig/domains I might stick with the way I had and hope that they think about neating it up lol Quote Link to comment Share on other sites More sharing options...
Gualter Posted August 31, 2013 Report Share Posted August 31, 2013 .domainrow { display:inline-block; width: 80px; height: 16px; border: 1px solid #eeeeee; align: left; padding: 3px; float: left; margin: 2px; } .domainrow:hover { display:inline-block; width: 80px; height: 16px; border: 1px solid #dddddd; align: left; padding: 3px; float: left; margin: 2px; background: #eeeeee; } Quote Link to comment Share on other sites More sharing options...
Tyson Posted August 31, 2013 Report Share Posted August 31, 2013 I'm not sure if I'm the only one but I think the domains are a bit cramped on the order form. So I was wondering it maybe you could make them have a set number per row. At the moment I've managed to do this with CSS but it's still not the best. CSS Change if you wish to use this temp way: ul.domain_check label { margin-right: 10px !important; margin-top: 10px !important; } ul.domain_check input[type="checkbox"]{ margin-left: 7px !important; margin-top: 10px !important; } I put mine in the layout.css file in app/views/client/css/ How about you remove that CSS, and use this instead: <li class="tlds"> <?php $i = 0; $tlds_per_row = 9; // some integer in the range [1..9] $tld_count = count($tlds); foreach ($tlds as $tld => $pack) { if ($i%$tlds_per_row == 0) { ?> <div class="tld-row"> <?php } ?> <span class="tld"> <?php $this->Form->fieldCheckbox("tlds[]", $tld, in_array($tld, $this->Html->ifSet($vars->tlds, array())), array('id' => "t" . $tld)); $this->Form->label($tld, "t" . $tld, array('class' => "inline")); ?> </span> <?php if (($i%$tlds_per_row) == ($tlds_per_row-1) || ($i+1 == $tld_count)) { ?> </div> <?php } $i++; } unset($i, $tlds_per_row); ?> </li> CSS: .tlds { text-align:left;} .tlds .tld-row { clear:left;} .tlds .tld-row .tld { float:left; display:inline-block; width:100px;} Michael and eversmile_host 2 Quote Link to comment Share on other sites More sharing options...
Michael Posted August 31, 2013 Author Report Share Posted August 31, 2013 How about you remove that CSS, and use this instead: <li class="tlds"> <?php $i = 0; $tlds_per_row = 9; // some integer in the range [1..9] $tld_count = count($tlds); foreach ($tlds as $tld => $pack) { if ($i%$tlds_per_row == 0) { ?> <div class="tld-row"> <?php } ?> <span class="tld"> <?php $this->Form->fieldCheckbox("tlds[]", $tld, in_array($tld, $this->Html->ifSet($vars->tlds, array())), array('id' => "t" . $tld)); $this->Form->label($tld, "t" . $tld, array('class' => "inline")); ?> </span> <?php if (($i%$tlds_per_row) == ($tlds_per_row-1) || ($i+1 == $tld_count)) { ?> </div> <?php } $i++; } unset($i, $tlds_per_row); ?> </li> CSS: .tlds { text-align:left;} .tlds .tld-row { clear:left;} .tlds .tld-row .tld { float:left; display:inline-block; width:100px;} Thanks mate that's perfect I added margin-left: 20px; to the .tlds to make it more center than to the left. Is there any chance they could come like that by default? http://billing.cubicwebs.com/plugin/order/main/preconfig/domains Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.