Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Responsive table breaks form submission #61

Closed
ikedas opened this issue Sep 25, 2017 · 0 comments
Closed

Responsive table breaks form submission #61

ikedas opened this issue Sep 25, 2017 · 0 comments
Labels
Milestone

Comments

@ikedas
Copy link
Member

ikedas commented Sep 25, 2017

Original report.

Summary: With mobile browser, custom attributes submitted in subscriber options page are sometimes omitted. Disabling respoisive table feature avoids this problem.

I replaced web_tt2/edit_attributes.tt2 with following content not using table, and problem looks dissolved.

<!-- edit_attributes.tt2 -->
[% IF list_conf.custom_attribute && list_conf.custom_attribute.size > 0 ~%]
  <label>[%|loc%]Additional information[%END%]</label>
  <div class="row">
    <div class="small-9 large-10 columns">
      <i>[%|loc%]*: Required element[%END%]</i>
    </div>
  </div>

  <div class="row">
    <div class="small-9 large-10 columns">
    [% FOREACH k IN list_conf.custom_attribute ~%]
      [% SET ca_id = "custom_attribute.${k.id}" ~%]
      [% SET ca_value = subscriber.custom_attribute.item(k.id).value ~%]

      <label for="[% ca_id %]">
        [%|loc(k.name)%]%1:[% END %]
        [% IF k.optional == 'required' %]*[% END %]
        [% IF k.comment ~%]
          <a href="#" class="accordionButton"
           data-selector="#help\.[% ca_id.replace('[.]', '\\.') %]">
          <i class="fa fa-question-circle" title="[%|loc%]Help[%END%]"></i>
          </a>
        [%~ END %]
      </label>

      [% IF k.comment ~%]
        <div id="help.[% ca_id %]" class="panel radius">
        <p>[% k.comment %]</p>
        </div>
      [%~ END %]

      [% IF k.type == 'string' ~%]
        <input type="text" name="[% ca_id %]" id="[% ca_id %]"
         value="[% ca_value %]" />
      [%~ ELSIF k.type == 'integer' ~%]
        <span style="display:inline-block">
        <input type="text" name="[% ca_id %]" id="[% ca_id %]"
         value="[% ca_value %]" size="10" />
        </span>
      [%~ ELSIF k.type == 'text' ~%]
        <textarea rows="5" name="[% ca_id %]" id="[% ca_id %]" maxlength="500">
          [%~ ca_value ~%]
        </textarea>
      [%~ ELSIF k.type == 'enum' ~%]
        <select name="[% ca_id %]">
        <option value=""></option>
        [% FOREACH l IN k.enum_values.split(',') ~%]
          <option
           [%~ IF l == "${ca_value}" %] selected[% END %]
           value="[% l %]">[% l %]</option>
        [%~ END %]
        </select>
      [%~ ELSE ~%]
        <input type="hidden" name="[% ca_id %]" id="[% ca_id %]"
         value="[% ca_value %]" />
        [% ca_value %]
      [%~ END %]
    [%~ END %]
    </div>
  </div>
[%~ END %]
<!-- end edit_attributes.tt2 -->
@ikedas ikedas added the bug label Sep 25, 2017
@ikedas ikedas added this to the 6.2.22 milestone Sep 28, 2017
@ikedas ikedas mentioned this issue Oct 5, 2017
ikedas added a commit that referenced this issue Oct 5, 2017
@ikedas ikedas closed this as completed Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant