diff options
| author | Aaron Parecki <aaron@parecki.com> | 2020-03-30 10:26:46 -0700 | 
|---|---|---|
| committer | Aaron Parecki <aaron@parecki.com> | 2020-03-30 10:26:46 -0700 | 
| commit | 8dec126e7dd19ebb068b1a4f42804f8c0205af9d (patch) | |
| tree | 03b978cc4772db3e1819e27aa76cccd742a89488 /views/event.php | |
| parent | 3759383e91344a6e10d23d4dbd90b9eda513d79c (diff) | |
add channel selection to event interface
Diffstat (limited to 'views/event.php')
| -rw-r--r-- | views/event.php | 21 | 
1 files changed, 21 insertions, 0 deletions
| diff --git a/views/event.php b/views/event.php index 81742d8..c485f31 100644 --- a/views/event.php +++ b/views/event.php @@ -44,6 +44,24 @@          <input type="text" id="note_category" value="" class="form-control">        </div> +      <?php if($this->channels): ?> +        <div class="form-group"> +          <label for="note_channel">Channel</label> +          <div id="channel-container"> +            <?php +              echo '<select class="form-control" id="note_channel">'; +              echo '<option value="none"></option>'; +              foreach($this->channels as $ch) { +                echo '<option value="'.htmlspecialchars($ch).'" '.($ch == 'events' ? 'selected' : '').'>' +                   . htmlspecialchars($ch) +               . '</option>'; +              } +              echo '</select>'; +            ?> +          </div> +        </div> +      <?php endif; ?> +        <div style="float: right; margin-top: 6px;">          <button class="btn btn-success" id="btn_post">Post</button>        </div> @@ -229,6 +247,9 @@        properties.end = event_end;      } +    if($("#note_channel").val()) { +      properties['p3k-channel'] = $("#note_channel").val(); +    }      $.post("/micropub/postjson", {        data: JSON.stringify({ | 
