| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- {{ csrf_field() }}
- <div class="box box-primary">
- <div class="box-header with-border">
- <h3 class="box-title"></h3>
- </div>
- <div class="box-body">
- <div class="row">
- <div class="col-md-6">
- <div class="form-group">
- <label for="name">Nome:</label>
- <input type="text" name="name" class="form-control title" value="{{ old('name', isset($section) ? $section->name : '') }}">
- </div>
- </div>
- <div class="col-md-6">
- <div class="form-group">
- <label for="slug">Slug:</label>
- <input type="text" name="slug" class="form-control slug" value="{{ old('slug', isset($section) ? $section->slug : '') }}">
- </div>
- </div>
- </div>
- <input name="layout" type="hidden" value="{{isset($section) ? $section->layout : ''}}" id="layout">
- @if(false)
- <div class="row">
- <div class="col-md-6">
- <div class="form-group">
- <label for="layout">Layout:</label>
- <br>
- @for($x=1;$x<=6;$x++)
- <div style="padding:10px;float:left;{{(isset($section) && $section->layout == 'layout_' . $x) ? 'background-color:red;' : ''}} " class="selImg" data-id="layout_{{$x}}">
- <img src="/images/layout_{{$x}}.png" style="width:150px;">
- </div>
- @endfor
- <input name="layout" type="hidden" value="{{isset($section) ? $section->layout : ''}}" id="layout">
- </div>
- </div>
- <div class="col-md-6">
- <div class="form-group">
- <label for="type">Tipologia:</label>
- <select name="type" id="type" class="form-control" required>
- <option value="">Seleziona una tipologia</option>
- <option value="section" {{ old('type', isset($section) ? $section->type : '') == 'section' ? 'selected' : '' }}>Nazionale</option>
- <option value="region" {{ old('type', isset($section) ? $section->type : '') == 'region' ? 'selected' : '' }}>Regionale</option>
- </select>
- </div>
- </div>
- </div>
- @endif
- <input name="position" type="hidden" value="{{isset($section) ? $section->position : '0'}}">
- <div class="row">
- <div class="col-md-6">
- <div class="form-group">
- <label for="type">Tipologia:</label>
- <select name="type" id="type" class="form-control" required>
- <option value="">Seleziona una tipologia</option>
- <option value="section" {{ old('type', isset($section) ? $section->type : '') == 'section' ? 'selected' : '' }}>Nazionale</option>
- <option value="region" {{ old('type', isset($section) ? $section->type : '') == 'region' ? 'selected' : '' }}>Regionale</option>
- </select>
- </div>
- </div>
- <div class="col-md-3">
- <div class="form-group">
- <label for="show_social">Mostra box Facebook:</label><br>
- <input type="checkbox" name="show_social" value="on" {{ old('show_social') ? 'checked' : '' }}>
- </div>
- </div>
- <div class="col-md-3">
- <div class="form-group">
- <label for="show_social_twitter">Mostra box Twitter:</label><br>
- <input type="checkbox" name="show_social_twitter" value="on" {{ old('show_social_twitter') ? 'checked' : '' }}>
- </div>
- </div>
- </div>
- </div>
- <div class="box-footer">
- @if(Auth::user()->only_read == false)
- <button type="submit" class="btn btn-success">{{ $submit_text }}</button>
- @endif
- <a href="{{ route('sections.index') }}" class="btn btn-info">Annulla</a>
- </div>
- </div>
- @section('extra_js')
- <script>
- $(function () {
- $(".title").keyup(function(){
- var Text = $(this).val();
- Text = Text.toLowerCase();
- Text = Text.replace(/[^a-zA-Z0-9]+/g,'-');
- $(".slug").val(Text);
- });
- $(".selImg").click(function(){
- $(".selImg").css("background-color", "white");
- $(this).css("background-color", "red");
- var id = $(this).attr("data-id");
- $("#layout").val(id);
- });
- });
- </script>
- @stop
|