
<div class="row">
    <div class="container">

        <ol class="breadcrumb">
            <li><a href="#">نظام  المهام</a></li>
            <li><a href="tasksSettings.php">اعدادات المهام </a></li>
            <li class="active">تعديل  </li>
        </ol>


        <div class="panel panel-default panel-m">
            <div class="panel-heading">
                <h3 class="panel-title">تعديل  </h3>
            </div>
            <div class="panel-body">


                {literal}
                <form class="form-horizontal"  action="tasksSettings.php"   method="post"  enctype="multipart/form-data">
                    {/literal}
                    <div class="form-group">
                        <label  class="col-lg-2 control-label"> مجموعات متاح لها الاضافه  </label>
                        <div class="col-lg-4">
                            <select name="usergroupadd[]" multiple  data-placeholder="اختر " class="select2">
                                <option value=""></option>
                                {foreach $usergroups as $single}
                                {assign var="usergroupadd" value=","|explode:$taskssettings->usergroupadd} 
                                <option value="{$single.usergroupid}"{if in_array($single.usergroupid, $usergroupadd)} selected="selected"{/if}>{$single.usergroupname}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 control-label"> مجموعات متاح لها العرض </label>
                        <div class="col-lg-4">
                            <select name="usergroupshow[]" multiple  data-placeholder="اختر " class="select2">
                                <option value=""></option>
                               {foreach $usergroups as $single}
                                {assign var="usergroupshow" value=","|explode:$taskssettings->usergroupshow} 
                                <option value="{$single.usergroupid}"{if in_array($single.usergroupid, $usergroupshow)} selected="selected"{/if}>{$single.usergroupname}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label  class="col-lg-2 control-label"> مجموعات متاح لها التعديل </label>
                        <div class="col-lg-4">
                            <select name="usergroupupdate[]" multiple  data-placeholder="اختر " class="select2">
                                <option value=""></option>
                               {foreach $usergroups as $single}
                                {assign var="usergroupupdate" value=","|explode:$taskssettings->usergroupupdate} 
                                <option value="{$single.usergroupid}"{if in_array($single.usergroupid, $usergroupupdate)} selected="selected"{/if}>{$single.usergroupname}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label  class="col-lg-2 control-label"> مجموعات متاح لها الحذف </label>
                        <div class="col-lg-4">
                            <select name="usergroupdel[]" multiple  data-placeholder="اختر " class="select2">
                                <option value=""></option>
                               {foreach $usergroups as $single}
                                {assign var="usergroupdel" value=","|explode:$taskssettings->usergroupdel} 
                                <option value="{$single.usergroupid}"{if in_array($single.usergroupid, $usergroupdel)} selected="selected"{/if}>{$single.usergroupname}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    

                    <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                            <input type="hidden" name="id" value="1">
                            <button type="submit" class="btn btn-primary pull-left " >تعديل</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>


