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

Addapt getHtmlForAddColumn to use twig template #14107

Merged
merged 1 commit into from Mar 22, 2018

Conversation

Projects
None yet
2 participants
@laps15
Copy link
Contributor

commented Mar 21, 2018

I started to adapt some functions that returns html string and are not yet using Twig templates.

Signed-off-by: Leonardo Strozzi laps15@inf.ufpr.br

Before submitting pull request, please check that every commit:

  • Has proper Signed-Off-By
  • Has commit message which describes it
  • Is needed on it's own, if you have just minor fixes to previous commits, you can squash them
  • Any new functionality is covered by tests
@mauriciofauth
Copy link
Member

left a comment

You need to change the test for this method to reflect the changes.

See https://travis-ci.org/phpmyadmin/phpmyadmin/jobs/356166110#L700

'centralColumns_add',
__('Add column')
);
$hidden_inputs = Url::getHiddenInputs($db);

This comment has been minimized.

Copy link
@mauriciofauth

mauriciofauth Mar 21, 2018

Member

You can replace these methods with their respective Twig extensions.
For example: {{ Url_getHiddenInputs(db) }}

<input type="hidden" name="total_rows" value="{{ total_rows }}"/>
{{ table_drop_down|raw }}
<select name="column-select" id="column-select">
<option value="" selected="selected">Select a column.</option>

This comment has been minimized.

Copy link
@mauriciofauth

mauriciofauth Mar 21, 2018

Member

You must make this string translatable. In that case you can use the trans tag.
For example: {% trans 'Select a column.' %}

</form>
</td>
<td class="navigation_separator largescreenonly"></td>
</tr>

This comment has been minimized.

Copy link
@mauriciofauth

mauriciofauth Mar 21, 2018

Member

We are using four spaces for the indentation of the twig files.

@laps15 laps15 force-pushed the laps15:master branch from f5eac8b to 68e2673 Mar 22, 2018

Addapt getHtmlForAddColumn to use twig template
Signed-off-by: Leonardo Strozzi <laps15@inf.ufpr.br>

@laps15 laps15 force-pushed the laps15:master branch from 68e2673 to 2c7f361 Mar 22, 2018

@mauriciofauth mauriciofauth merged commit b11b7c1 into phpmyadmin:master Mar 22, 2018

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
DCO All commits have a DCO sign-off from the author
Scrutinizer Analysis: 2 updated code elements – Tests: passed
Details

@mauriciofauth mauriciofauth self-assigned this Mar 22, 2018

@mauriciofauth mauriciofauth added this to the 4.8.0 milestone Mar 22, 2018

@mauriciofauth

This comment has been minimized.

Copy link
Member

commented Mar 22, 2018

Merged, thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.