[ 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');  ?></label></dt>
   3      <dd>
   4          <?php echo gp_locales_dropdown( 'set[locale]', $set->locale ); ?>
   5          <a href="#" id="copy"><?php _e('Use as name'); ?></a>
   6      </dd>
   7      
   8      <dt><label for="set[name]"><?php _e('Name');  ?></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');  ?></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');  ?></label></dt>
  16      <dd><?php echo gp_projects_dropdown( 'set[project_id]', $set->project_id ); ?></dd>
  17  </dl>
  18  <?php echo gp_js_focus_on( 'set[locale]' ); ?>
  19  <script type="text/javascript">
  20      jQuery(function($){
  21          $('#copy').click(function() {
  22              $('#set\\[name\\]').val($('#set\\[locale\\] option:selected').html().replace(/^\S+\s+\S+\s+/, '').replace(/&mdash|—/, ''));
  23              return false;
  24          });
  25      });
  26  </script>


Generated: Thu May 24 03:59:35 2012 Hosted by follow the white rabbit.