Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Views field rewrite messy #118

Closed
rokat opened this issue Jul 19, 2014 · 6 comments
Closed

Views field rewrite messy #118

rokat opened this issue Jul 19, 2014 · 6 comments
Assignees
Milestone

Comments

@rokat
Copy link
Contributor

rokat commented Jul 19, 2014

capture du 2014-07-20 01 02 31

I have looked into it, the reason is the application of an extra "form-control" css on the container.
Will look where it's applied. Or if it's already patched on v4.

@rokat
Copy link
Contributor Author

rokat commented Jul 19, 2014

<div id="edit-options-alter-text-wrapper" class="form-control form-wrapper dependent-options" style="">
  <div class="form-item form-type-textarea form-item-options-alter-text form-group">
    <label for="edit-options-alter-text">Text </label>
    <div class="form-textarea-wrapper resizable">
      <textarea rows="5" cols="60" name="options[alter][text]" id="edit-options-alter-text" class="form-control form-textarea">
      </textarea>
    </div>
    <span class="help-block">The text to display for this field. You may include HTML. You may enter data from this view as per the "Replacement patterns" below.</span>
  </div>
</div>

@rokat rokat changed the title Views Field Rewrite unreachable Views Field Rewrite messy Jul 19, 2014
@rokat rokat changed the title Views Field Rewrite messy Views field rewrite messy Jul 19, 2014
@pirog
Copy link
Contributor

pirog commented Jul 21, 2014

@rokat where is the extra form-control? The one in edit-options-alter-text-wrapper?

@pirog pirog added the 7.x-3.x label Jul 21, 2014
@pirog pirog added this to the 7.x-3.1 milestone Jul 21, 2014
@rokat
Copy link
Contributor Author

rokat commented Jul 21, 2014

@pirog it is as you said ,in the edit-options-alter-text-wrapper, the wrapper doesn't need the form-control, only the textarea.

I have found a solution.
In

function kalatheme_process_input(&$element, &$form_state)

kalatheme_process_input (it adds the form-control to both wrapper & textarea)
Removing textarea from the list of types

And

function kalatheme_textarea($variables)

Adding form-control directly to textarea
that should do the trick, but requires some regression test, to be sure it didn't hurt something else.

Anyway will do a pull request

@rokat
Copy link
Contributor Author

rokat commented Jul 22, 2014

Added the pull request

@pirog
Copy link
Contributor

pirog commented Jul 27, 2014

Great! I just posted some comments on the PR. It looks good but going to ask for a second set of eyes and then merge it in!

thanks so much for your help!

@shawnholt
Copy link

I updated to dev and this solved the text drop down, but the replacement patterns dropdown does not open.
If I remove /* position: relative; */ from form-item form-type-checkbox form-item-options-alter-trim checkbox it seems to work.

This is the code:

The following tokens are available for this field. Note that due to rendering order, you cannot use fields that come after this field; if you need a field not listed here, rearrange your fields. If you would like to have the characters '[' and ']' please use the html entity codes '%5B' or '%5D' or they will get replaced with empty space.

  • [id] == CiviCRM Events: Event ID
  • [event_image_42] == CiviCRM Custom: Event Extension: Event Image
  • # for free to join this conversation on GitHub. Already have an account? # to comment
    Labels
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants