/wp-content/plugins/loco-translate/tpl/admin/bundle/setup/conf.php

https://gitlab.com/campus-academy/krowkaramel · PHP · 81 lines · 74 code · 4 blank · 3 comment · 2 complexity · 84464c726e1d0d690299391cad6e72f6 MD5 · raw file

  1. <?php
  2. /**
  3. * "auto" config options
  4. */
  5. $this->extend('../setup');
  6. $this->start('header');
  7. if( $params->has('jsonFields') ):?>
  8. <form action="" method="post" enctype="application/x-www-form-urlencoded" class="notice inline notice-generic jsonly" id="loco-remote">
  9. <h3>
  10. <?php esc_html_e('Check config repository','loco-translate')?>
  11. </h3>
  12. <fieldset id="loco-remote-query">
  13. <p>
  14. <?php esc_html_e("We have a database of non-standard bundle configurations.\nIf we know your bundle, we'll configure it for you automatically",'loco-translate')?>
  15. </p>
  16. <p>
  17. <select name="vendor">
  18. <option value="wordpress"><?php esc_html_e('WordPress','default')?></option>
  19. </select>
  20. <input type="text" name="slug" value="<?php $params->e('vendorSlug')?>" class="regular-text" />
  21. </p>
  22. </fieldset>
  23. <div id="loco-remote-empty">
  24. <p>
  25. <button type="button" class="button button-primary"><?php esc_html_e('Find config','loco-translate')?></button>
  26. <a href="<?php $tabs[1]->e('href')?>" class="button button-link"><?php esc_html_e('Cancel','default')?></a>
  27. <span></span>
  28. </p>
  29. </div>
  30. <div id="loco-remote-found" class="jshide">
  31. <p>
  32. <input type="submit" class="button button-success" name="json-setup" value="<?php esc_attr_e('OK, Load this config','loco-translate')?>" />
  33. <input type="reset" class="button button-link" value="<?php esc_attr_e('Cancel','default')?>" />
  34. </p>
  35. </div>
  36. <?php $jsonFields->_e()?>
  37. </form><?php
  38. endif;
  39. if( $params->has('xmlFields') ):?>
  40. <form action="" method="post" enctype="application/x-www-form-urlencoded" class="notice inline notice-generic">
  41. <h3>
  42. <?php esc_html_e('XML setup','loco-translate')?>
  43. </h3>
  44. <p>
  45. <?php esc_html_e("If you've been given a configuration file by a developer, paste the XML code here",'loco-translate')?>:
  46. </p>
  47. <fieldset>
  48. <textarea name="xml-content" class="large-text" rows="3" wrap="virtual"></textarea>
  49. </fieldset>
  50. <p>
  51. <input type="submit" class="button button-primary" name="xml-setup" value="<?php esc_html_e('Load config','loco-translate')?>" />
  52. <a href="<?php $tabs[1]->e('href')?>" class="button button-link"><?php esc_html_e('Cancel','default')?></a>
  53. </p>
  54. <?php $xmlFields->_e()?>
  55. </form><?php
  56. endif;
  57. if( $params->has('autoFields') ):?>
  58. <form action="" method="post" enctype="application/x-www-form-urlencoded" class="notice inline notice-generic">
  59. <h3>
  60. Auto setup
  61. </h3>
  62. <p>
  63. We can make some guesses about how this bundle is set up, but we can't guarantee they'll be right.
  64. </p>
  65. <p>
  66. This is not recommended unless you're a developer able to make manual changes afterwards.
  67. </p>
  68. <p>
  69. <input type="submit" class="button button-primary" name="auto-setup" value="Guess config" />
  70. </p>
  71. <?php $autoFields->_e()?>
  72. </form><?php
  73. endif;