@extends('admin.layouts.master') @section('title') @if($edit_mode) Edit Attribute Group {{ $attribute_group->name }} @else New Attribute Group @endif @stop @section('content')
Edit Attribute Group
{{ Form::open(array('url' => 'admin/products/categories/attributeGroups/save','class'=>'form-horizontal')) }} {{ Form::hidden('edit_mode', $edit_mode) }} @if($edit_mode) {{ Form::hidden('attribute_group_id', $attribute_group->id) }} @endif
@if($edit_mode) {{ Form::text('codename', $attribute_group->codename, array('class' => 'form-control input-lg', 'disabled' => 'disabled')) }} @else {{ Form::text('codename', null, array('class' => 'form-control input-lg')) }} @endif {{ Form::label('codename', 'Codename') }}



{{ Form::text('name', $edit_mode ? $attribute_group->name : Input::get('name'), array('class' => 'form-control input-lg')) }} {{ Form::label('name', 'Name') }}

Categories

@foreach($categories as $category)
{{ Form::checkbox('category[]', $category->id, $edit_mode ? $attribute_group->hasProductCategory($category->id) : Input::get('category['.$category->id.']'),array('class'=>'form-control md-check','id'=> $category->id)) }}
@endforeach
{{ Form::submit('Save', array('class' => 'pull-right btn btn-primary btn-lg')) }}
{{ Form::close() }}
@stop