Skip to content

Commit

Permalink
Merge pull request #11 from tinned-software/gerhard-tinned-patch-2
Browse files Browse the repository at this point in the history
disable 'Post to Twiter' and the Follow link if no twitter handle is set
  • Loading branch information
montross50 committed Apr 3, 2016
2 parents 84575c1 + 4b4ba38 commit 5498bd6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/templates/default/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="datacenter">
<div class="dchead">
<h3>{$facility.friendly_name}</h3>
<a href="https://twitter.com/{$twitter_handle}" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @{$twitter_handle}</a>
{if !empty($twitter_handle)}<a href="https://twitter.com/{$twitter_handle}" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @{$twitter_handle}</a>{/if}
</div>

<table class="services">
Expand Down Expand Up @@ -68,7 +68,7 @@
<span class="message">{$update.message}</span>
</div>
{/foreach}{/if}
{if $smarty.session.auth.id}<p><form action="" method="post" class="microupdate"><input type="text" name="update" class="updatebox" id="updateto{$incident.id}" /><p class="posttotwitter"><input type="checkbox" name="twitter" class="micrototwitter" checked="CHECKED" /> Post to Twitter</p><input type="hidden" name="incidentid" value="{$incident.id}"></form>{/if}
{if $smarty.session.auth.id}<p><form action="" method="post" class="microupdate"><input type="text" name="update" class="updatebox" id="updateto{$incident.id}" />{if !empty($twitter_handle)}<p class="posttotwitter"><input type="checkbox" name="twitter" class="micrototwitter" checked="CHECKED" /> Post to Twitter</p>{/if}<input type="hidden" name="incidentid" value="{$incident.id}"></form>{/if}
</div>
</div>
{/foreach}
Expand Down Expand Up @@ -112,8 +112,8 @@
<label for="initialupdate">Initial Update:</label>
<input type="text" name="update" id="initialupdate" />
</div>
<label for="incidenttwitter">Send to Twitter:</label>
<input type="checkbox" name="twitter" id="incidenttwitter" checked="CHECKED" />
{if !empty($twitter_handle)}<label for="incidenttwitter">Send to Twitter:</label>
<input type="checkbox" name="twitter" id="incidenttwitter" checked="CHECKED" />{/if}
</fieldset>
</form>
</div>
Expand Down

0 comments on commit 5498bd6

Please sign in to comment.