Commit b481bfaca8b9819a041da19cf76ddf12004b93ee

Authored by Charl Joseph Mert
1 parent 17786bec

Brand server without requiring access to FS

PT: 1243391

Added preview image border for consistency

Updated by: Charl Joseph Mert
plugins/ktcore/KTWidgets.php
@@ -1113,6 +1113,8 @@ class KTCoreImageWidget extends KTWidget { @@ -1113,6 +1113,8 @@ class KTCoreImageWidget extends KTWidget {
1113 $this->aOptions['height'] = KTUtil::arrayGet($aOptions, 'height', ''); 1113 $this->aOptions['height'] = KTUtil::arrayGet($aOptions, 'height', '');
1114 $this->aOptions['has_width'] = ($this->aOptions['height'] !== null); 1114 $this->aOptions['has_width'] = ($this->aOptions['height'] !== null);
1115 $this->aOptions['has_height'] = ($this->aOptions['height'] !== null); 1115 $this->aOptions['has_height'] = ($this->aOptions['height'] !== null);
  1116 + $this->aOptions['div_border'] = KTUtil::arrayGet($aOptions, 'div_border', '');
  1117 + $this->aOptions['has_div_border'] = ($this->aOptions['div_border'] !== null);
1116 1118
1117 } 1119 }
1118 1120
templates/ktcore/forms/widgets/image.smarty
1 - <img {if $has_id} id="{$id}" {/if} {if $has_value} src="{$value}"{/if} alt="{$name}" title="{$name}" {if $options.has_width} width="{$options.width}" {/if} {if $options.has_height} height="{$options.height}" {/if}/> 1 +{if $options.has_div_border}
  2 +<style>
  3 +.jq_select_image {
  4 + float: left;
  5 + border: {$options.div_border};
  6 + margin-right: 5px;
  7 + padding: 0px;
  8 + display:inline;
  9 + height:70px;
  10 +}
  11 +</style>
  12 +<fieldset>
  13 + <field>
  14 + <div style="float: left;
  15 + border: {$options.div_border};
  16 + margin-right: 5px;
  17 + padding: 0px;
  18 + display:inline;
  19 + height:70px;">
  20 +{/if}
  21 +
  22 + <img {if $has_id} id="{$id}" {/if} {if $has_value} src="{$value}"{/if} alt="{$name}" title="{$name}" {if $options.has_width} width="{$options.width}" {/if} {if $options.has_height} height="{$options.height}" {/if}/>
  23 +
  24 +{if $options.has_div_border}
  25 + </div>
  26 +</field>
  27 +</fieldset>
  28 +{/if}
  29 +