Jump to content

Yet Another Question


mitsos

Recommended Posts

I just have another question that I can't seem to figure out on my own. I need to convert the cpanel's module admin add service page to the screenshot shown. Imagine the textfields being replaced by the checkboxes, so that everything is in a single line (row).

 

So the line should be a textfield for the domain, and a couple (or more) checkboxes with a label attached to them. I can't manage to attach the label to the checkboxes though. Moving further to the right, there will be a button to add another domain and configure it using the same fields for it too, depending on the number of domains allowed in the service's template.

 

Responses in plain english are appreciated (ie dumb the response down). Thanks in advance.

post-1761-0-50888800-1416935808_thumb.jp

Link to comment
Share on other sites

        $fields = new ModuleFields();
        $my_label = $fields->label("My Field Label", "my_field_id");
 
        // Create a field label displayed next to the checkbox
        $field_label = $fields->label("My Value", "my_field_my_value_id");
 
        // Create and attach the field to the label, set as checked (3rd param) if necessary
        $my_label->attach($fields->fieldCheckbox("my_field_name", "my_value", (isset($vars->my_field_name) && $vars->my_field_name == "my_value"), array('id' => "my_field_my_value_id"), $field_label));
 
        // Attach a tooltip to the label
        $my_label->attach($fields->tooltip("This is my tooltip"));
 
        $fields->setField($my_label);

More info: http://docs.blesta.com/display/dev/ModuleFields

Link to comment
Share on other sites

This is what I'm trying to do. Now if some could explain how to set the class to those specific <li>s, it would be much appreciated.

 

 

post-1761-0-89948500-1417017426_thumb.jp

 

 

EDIT: no, changing the .css isn't the answer I'm looking for. I don't want to change every pad's lis, just this specific module's lis

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...