Don't display description on studs.php if the field is blank
This commit is contained in:
parent
f5c4ddddbe
commit
3fb351dbce
@ -72,18 +72,20 @@
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="form-group col-md-8" id="description-form">
|
||||
<label class="control-label">{__('Generic', 'Description')}{if $admin && !$expired} <button class="btn btn-link btn-sm btn-edit" title="{__('PollInfo', 'Edit the description')}"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">{__('Generic', 'Edit')}</span></button>{/if}</label>
|
||||
<pre class="form-control-static well poll-description">{$poll->description|html}</pre>
|
||||
{if $admin && !$expired}
|
||||
<div class="hidden js-desc text-right">
|
||||
<label class="sr-only" for="newdescription">{__('Generic', 'Description')}</label>
|
||||
<textarea class="form-control" id="newdescription" name="description" rows="2" cols="40">{$poll->description|html}</textarea>
|
||||
<button type="submit" id="btn-new-desc" name="update_poll_info" value="description" class="btn btn-sm btn-success" title="{__('PollInfo', 'Save the description')}"><span class="glyphicon glyphicon-ok"></span><span class="sr-only">{__('Generic', 'Save')}</span></button>
|
||||
<button class="btn btn-default btn-sm btn-cancel" title="{__('PollInfo', 'Cancel the description edit')}"><span class="glyphicon glyphicon-remove"></span><span class="sr-only">{__('Generic', 'Cancel')}</span></button>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{if $admin || !empty(preg_replace('/[ \r\n]/', '', $poll->description))}
|
||||
<div class="form-group col-md-8" id="description-form">
|
||||
<label class="control-label">{__('Generic', 'Description')}{if $admin && !$expired} <button class="btn btn-link btn-sm btn-edit" title="{__('PollInfo', 'Edit the description')}"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">{__('Generic', 'Edit')}</span></button>{/if}</label>
|
||||
<pre class="form-control-static well poll-description">{$poll->description|html}</pre>
|
||||
{if $admin && !$expired}
|
||||
<div class="hidden js-desc text-right">
|
||||
<label class="sr-only" for="newdescription">{__('Generic', 'Description')}</label>
|
||||
<textarea class="form-control" id="newdescription" name="description" rows="2" cols="40">{$poll->description|html}</textarea>
|
||||
<button type="submit" id="btn-new-desc" name="update_poll_info" value="description" class="btn btn-sm btn-success" title="{__('PollInfo', 'Save the description')}"><span class="glyphicon glyphicon-ok"></span><span class="sr-only">{__('Generic', 'Save')}</span></button>
|
||||
<button class="btn btn-default btn-sm btn-cancel" title="{__('PollInfo', 'Cancel the description edit')}"><span class="glyphicon glyphicon-remove"></span><span class="sr-only">{__('Generic', 'Cancel')}</span></button>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="row">
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user