[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/data/field/latlong/ -> mod.html (source)

   1  <table width="100%" cellpadding="5">
   2      <tr>
   3          <td class="c0"><label for="name"><?php echo get_string('fieldname', 'data'); ?></label></td>
   4          <td class="c1"><input class="fieldname" type="text" name="name" id="name" value="<?php p($this->field->name); ?>" /></td>
   5      </tr>
   6      <tr>
   7          <td class="c0"><label for="description"><?php echo get_string('fielddescription', 'data'); ?></label></td>
   8          <td class="c1"><input class="fielddescription" type="text" name="description" id="description" value="<?php p ($this->field->description);?>" /></td>
   9      </tr>
  10      <tr>
  11          <td class="c0"><label for="required"><?php echo get_string('requiredfield', 'data'); ?></label></td>
  12          <td class="c1"><input class="requiredfield" type="checkbox" name="required" id="required" <?php p($this->field->required?"checked=\"checked\"":""); ?>/></td>
  13      </tr>
  14      <tr>
  15          <td class="c0"><label for="param1"><?php echo get_string('latlonglinkservicesdisplayed', 'data'); ?></label></td>
  16          <td class="c1">
  17            <select class="linkservicesdisplayed" name="param1[]" id="param1" multiple="multiple" size="<?php p(sizeof($this->linkoutservices)); ?>">
  18              <?php
  19              $serviceschosen = explode(',', htmlspecialchars($this->field->param1));
  20              foreach($this->linkoutservices as $servicename=>$serviceurl) {
  21                $servicename = htmlspecialchars($servicename);
  22                echo "\n  <option" . (array_search($servicename, $serviceschosen)===false ? '' : ' selected="selected"') . ">$servicename</option>";
  23              }
  24              ?>
  25            </select>
  26          </td>
  27      </tr>
  28      <tr>
  29          <td class="c0"><label for="param2"><?php echo get_string('latlongkmllabelling', 'data'); ?></label></td>
  30          <td class="c1">
  31            <select class="kmllabelling" name="param2" id="param2">
  32              <option value="-1"<?php if($this->field->param2==-1) echo ' selected="selected"' ?>><?php echo get_string('entry', 'data') ?> #</option>
  33              <option value="-2"<?php if($this->field->param2==-2) echo ' selected="selected"' ?>><?php echo get_string('latitude', 'data').'/'.get_string('longitude', 'data') ?></option>
  34              <?php
  35                  // Fetch all "suitable" other fields that exist for this database
  36                  $textfields = $DB->get_records('data_fields', array('dataid'=>$this->data->id, 'type'=>'text'));
  37                  if(sizeof($textfields)>0) {
  38                  echo '<optgroup label="'.get_string('latlongotherfields', 'data').':">';
  39                      foreach($textfields as $textfield) {
  40                          echo "<option value='$textfield->id'".($this->field->param2==$textfield->id ? ' selected="selected"' : '').">$textfield->name</option>";
  41                      }
  42                  echo '</optgroup>';
  43                  }
  44              ?>
  45            </select>
  46          </td>
  47      </tr>
  48      <tr>
  49          <td class="c0">&nbsp;</td>
  50          <td class="c1"><?php if($this->field->id) {echo "<a href='./field/latlong/kml.php?d=".$this->data->id."&fieldid=".$this->field->id."'>" . get_string('latlongdownloadallhint', 'data') . "</a>"; } ?></td>
  51      </tr>
  52  </table>


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1