
<!-- Copyright 2014 Intel Corporation, All Rights Reserved.

 Licensed under the Apache License, Version 2.0 (the"License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied. See the License for the
 specific language governing permissions and limitations
 under the License.
 --> 

{% extends 'base.html' %}
{% load i18n %}
{% block title %}{% trans "Create Replicated Pool" %}{% endblock %}

{% block page_header %}
  {% include "horizon/common/_page_header.html" with title=_("Create Replicated Pool") %}
  <link href="{{ STATIC_URL }}dashboard/css/poolmgmt.css" rel="stylesheet">

{% endblock page_header %}

{% block main %}
    {% csrf_token %}
    <div id="divPoolForm" >
    
	    <form>
		    <div class="left">
			    <fieldset>
			    	<div class="control-group form-field clearfix required">
                        <label>{% trans "Pool Name" %}:</label>
                        <span class="help-block"></span>
                        <div class="input">
                            <input id="txtPoolName" maxlength="255"  type="text" onchange="ChangePoolName(this.value)" class="form-control">
                        </div>
                    </div>
                    <div class="control-group form-field clearfix">
                        <label>{% trans "Tag" %}:</label>
                        <!-- <span class="required-star">*</span> -->
                        <span class="help-block"></span>
                        <div class="input">
                            <input id="txtTag" maxlength="255"  type="text" class="form-control">
                        </div>
                    </div>
                    <div class="control-group form-field clearfix required">
                        <label>{% trans "Storage Group" %}:</label>
                        <!-- <span class="required-star">*</span> -->
                        <span class="help-block"></span>
                        <div class="input">
                          	<select id="selStorageGroup" class="form-control" onchange="ChangeStorageGroup(this)">
                          	</select>
                        </div>
                    </div>
                    <div class="control-group form-field clearfix ">
                        <label>{% trans "Enable PG Auto-tune" %}:</label>
                        <input id="chkPGNumber" type="checkbox" checked="checked" onchange="ChangeEableAutoQuto(this.checked)" />
                        <span class="help-block"></span>
                        <div class="input">
                          	<input id="txtPGNumber" maxlength="255"  type="number" class="form-control"  readOnly>
                        </div>
                    </div>

                    <div class="control-group form-field clearfix ">
                        <label>{% trans "Pool Quota(GB)" %}:</label>
                        <input id="chkPoolQuota" type="checkbox" onchange="ChangePoolQuota(this.checked)"/>
                        <span class="help-block"></span>
                        <div class="input">
                          	<input id="txtPoolQuota" maxlength="255"  type="number" class="form-control" readOnly>
                        </div>
                    </div>
			    </fieldset>
			</div>
			<div class="right">
			    <h3>{% trans "Description" %}:</h3>
			    <p>{% trans "From here you can create a new pool." %}</p>
			</div>
		</form>
		 <div id="divFormOptions" class="vsm-options-bar">
	    	<button id="btnAddReplicatedPool" class="btn btn-primary" onclick="AddPool()">{% trans "Submit" %}</button>
	    	<a id="btnCancel" class="btn btn-default" href="/dashboard/vsm/poolsmanagement/">{% trans "Cancel" %}</a>
	    </div>
	</div>
{% endblock %}


{% block js %}
    {{ block.super }}
    <script src='{{ STATIC_URL }}dashboard/js/vsm.spin.js' type='text/javascript' charset='utf-8'></script>
    <script src="{{ STATIC_URL }}dashboard/js/addpool.js"></script>
    <!--<script src="{{ STATIC_URL }}dashboard/js/poolmgmt.js"></script>--> 
{% endblock %}

