Fixes bug with newly created variables not being assigned to existing servers properly, closes #478

This commit is contained in:
Dane Everitt 2017-06-18 21:38:00 -05:00
parent 1f88024cbb
commit cba54637fc
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 25 additions and 16 deletions

View file

@ -59,31 +59,31 @@
<div class="col-xs-12 col-md-4 col-sm-6">
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ $v->variable->name }}</h3>
<h3 class="box-title">{{ $v->name }}</h3>
</div>
<div class="box-body">
<input
@if($v->user_can_edit)
name="env_{{ $v->variable->id }}"
@if($v->user_editable)
name="env_{{ $v->id }}"
@else
readonly
@endif
class="form-control" type="text" value="{{ old('env_' . $v->id, $v->variable_value) }}" />
<p class="small text-muted">{{ $v->variable->description }}</p>
class="form-control" type="text" value="{{ old('env_' . $v->id, $v->server_set_value) }}" />
<p class="small text-muted">{{ $v->description }}</p>
<p class="no-margin">
@if($v->required && $v->user_can_edit)
@if($v->required && $v->user_editable )
<span class="label label-danger">@lang('strings.required')</span>
@elseif(! $v->required && $v->user_can_edit)
@elseif(! $v->required && $v->user_editable)
<span class="label label-default">@lang('strings.optional')</span>
@endif
@if(! $v->user_can_edit)
@if(! $v->user_editable)
<span class="label label-warning">@lang('strings.read_only')</span>
@endif
</p>
</div>
<div class="box-footer">
<p class="no-margin text-muted small"><strong>@lang('server.config.startup.startup_var'):</strong> <code>{{ $v->variable->env_variable }}</code></p>
<p class="no-margin text-muted small"><strong>@lang('server.config.startup.startup_regex'):</strong> <code>{{ $v->variable->rules }}</code></p>
<p class="no-margin text-muted small"><strong>@lang('server.config.startup.startup_var'):</strong> <code>{{ $v->env_variable }}</code></p>
<p class="no-margin text-muted small"><strong>@lang('server.config.startup.startup_regex'):</strong> <code>{{ $v->rules }}</code></p>
</div>
</div>
</div>