diff options
Diffstat (limited to 'views/settings.php')
-rw-r--r-- | views/settings.php | 46 |
1 files changed, 16 insertions, 30 deletions
diff --git a/views/settings.php b/views/settings.php index 55cbd17..a479924 100644 --- a/views/settings.php +++ b/views/settings.php @@ -61,6 +61,17 @@ </tr> </table> + <h3>Post Format Settings</h3> + <table class="table table-condensed" width="100%"> + <tr> + <td>Weight Unit</td> + <td width="160"> + <div style="margin-bottom:4px;"><input type="text" id="weight-unit" value="<?= $this->user->weight_unit ?>" class="form-control"></div> + <div><input type="button" class="btn btn-primary" value="Save" id="save-weight-unit"></div> + </td> + <td>The unit to be used for <a href="/weight">weight posts</a>.</td> + </tr> + </table> <h3>Syndication Targets</h3> @@ -112,13 +123,6 @@ - <?php if(!Config::$twitterClientID): ?> - <h3>Twitter</h3> - <p>Connecting a Twitter account will automatically "favorite" and "retweet" tweets on Twitter when you favorite and retweet a Twitter URL in Quill.</p> - <input type="button" id="twitter-button" value="Checking" class="btn"> - <?php endif ?> - - <h3>Backwards Compatibility</h3> <p>You can customize some of the properties that are sent in the Micropub request to work with older software.</p> @@ -157,29 +161,6 @@ <script> $(function(){ - <?php if(!Config::$twitterClientID): ?> - $.getJSON("/auth/twitter", function(data){ - // Check if we're already authorized with twitter - if(data && data.result == 'ok') { - $("#twitter-button").val("Connected").addClass("btn-success"); - } else if(data && data.url) { - $("#twitter-button").val("Sign In").data("url", data.url).addClass("btn-warning"); - } else { - $("#twitter-button").val("Error").addClass("btn-danger"); - } - }); - - $("#twitter-button").click(function(){ - if($(this).data('url')) { - window.location = $(this).data('url'); - } else { - $.getJSON("/auth/twitter", {login: 1}, function(data){ - window.location = data.url; - }); - } - }); - <?php endif ?> - $("#send-html-content").click(function(){ var enabled = $(this).attr("checked") == "checked"; $.post("/settings/save", { @@ -206,6 +187,11 @@ $(function(){ }); + $("#save-weight-unit").click(function(){ + $.post("/settings/save", { + weight_unit: $("#weight-unit").val() + }); + }); }); |