[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/gp-templates/ -> translation-set-form.php (source)

   1  <dl>
   2      <dt><label for="set[locale]"><?php _e( 'Locale', 'glotpress' ); ?></label></dt>
   3      <dd>
   4          <?php echo gp_locales_dropdown( 'set[locale]', $set->locale ); ?>
   5          <a href="#" id="copy"><?php _e( 'Use as name', 'glotpress' ); ?></a>
   6      </dd>
   7  
   8      <dt><label for="set[name]"><?php _e( 'Name', 'glotpress' ); ?></label></dt>
   9      <dd><input type="text" name="set[name]" value="<?php echo esc_html( $set->name ); ?>" id="set[name]"></dd>
  10  
  11      <!-- TODO: make slug edit WordPress style -->
  12      <dt><label for="set[slug]"><?php _e( 'Slug', 'glotpress' ); ?></label></dt>
  13      <dd><input type="text" name="set[slug]" value="<?php echo esc_html( $set->slug? $set->slug : 'default' ); ?>" id="set[slug]"></dd>
  14  
  15      <dt><label for="set[project_id]"><?php _e( 'Project', 'glotpress' ); ?></label></dt>
  16      <dd><?php echo gp_projects_dropdown( 'set[project_id]', $set->project_id, null, null, true ); ?></dd>
  17  </dl>
  18  <?php echo gp_js_focus_on( 'set[locale]' ) . "\n"; ?>
  19  <script type="text/javascript">
  20      jQuery('#copy').click(function() {
  21          var text = jQuery('#set\\[locale\\] option:selected').html().replace(/^\S+\s+\S+\s+/, '').replace(/&mdash|—/, '');
  22          jQuery('#set\\[name\\]').val(text);
  23          return false;
  24      });
  25  </script>


Generated: Tue Jan 22 01:02:31 2019 Cross-referenced by PHPXref 0.7.1