Skip to content
Snippets Groups Projects
Commit 3fb351db authored by Olivier Perez's avatar Olivier Perez
Browse files

Don't display description on studs.php if the field is blank

parent f5c4dddd
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment