<?php do_action( 'dpa_achievement_addedit_between_fieldsets_zero' ) ?>

<div class="tabber">
	<div class="tabbertab">
		<fieldset class="mandatory-trigger">
			<?php do_action( 'dpa_achievement_addedit_before_trigger' ) ?>

			<legend><?php _e( "Acci&oacute;n", 'buddypress' ) ?></legend>
			<div class="container">
				<div class="label"><?php _e( "Tipo", 'buddypress' ) ?></div>
				<div class="data achievement_type">
					<?php dpa_addedit_achievement_type() ?>
					<p class="hint"><?php _e( "Un <em>award</em> lo otorga el administrador, mientras que un <em>event</em> se obtiene autom&aacute;ticamente cuando se cumple su criterio.", 'buddypress' ) ?></p>
				</div>
				<div style="clear: left;"></div>
			</div>

			<div class="container">
				<div class="event <?php dpa_addedit_achievement_type_value() ?>">
					<div class="label"><?php _e( "Por Evento", 'buddypress' ) ?></div>
					<div class="data">
					   <select name="action_id" id="action_id"><?php dpa_addedit_action_descriptions() ?></select>
					   <?php dpa_addedit_warning( 'action_id' ) ?>
					</div>
				</div>
				<div style="clear: left;"></div>
			</div>

			<div class="container">
				<div class="event <?php dpa_addedit_achievement_type_value() ?>">
					<div class="label"><?php _e( "Cuando el evento ocurre este n. de veces", 'buddypress' ) ?></div>
					<div class="data"><input type="number" min="0" name="action_count" id="action_count" value="<?php dpa_addedit_value( 'action_count' ) ?>"><?php dpa_addedit_warning( 'action_count' ) ?></div>
				</div>
				<div style="clear: left;"></div>
			</div>

			<?php if ( bp_is_active( 'groups' ) ) : ?>
				<div class="container">
					<div class="groups initially_hidden <?php dpa_addedit_achievement_type_value() ?>">
						<div class="label"><?php _e( "En este grupo", 'buddypress' ) ?></div>
						<div class="data"><select name="group_id" id="group_id"><?php dpa_addedit_action_groups() ?></select><?php dpa_addedit_warning( 'group_id' ) ?></div>
					</div>
					<div style="clear: left;"></div>
				</div>
			<?php endif; ?>

			<?php if ( is_multisite() && bp_is_active( 'blogs' ) ) : ?>
				<div class="container">
					<div class="event <?php dpa_addedit_achievement_type_value() ?>">
						<div class="label"><?php _e( "En este sitio", 'buddypress' ) ?></div>
						<div class="data"><select name="site_id" id="site_id"><?php dpa_addedit_action_multisites() ?></select><?php dpa_addedit_warning( 'site_id' ) ?></div>
					</div>
					<div style="clear: left;"></div>
				</div>
			<?php endif; ?>

			<?php do_action( 'dpa_achievement_addedit_after_trigger' ) ?>
		</fieldset>
	</div> <!--  tabbertab -->

	<div class="tabbertab">

		<fieldset class="mandatory-trigger">
			<?php do_action( 'dpa_achievement_addedit_before_about' ) ?>

			<legend><?php _e( "Info", 'buddypress' ) ?></legend>
			<div class="container">
			
				<div class="label"><?php _e( 'Nombre Es', 'buddypress' ) ?></div>
				<div class="data"><input autofocus type="text" name="name" id="name" maxlength="200" value="<?php esc_attr( dpa_addedit_value( 'name' ) ) ?>" required x-moz-errormessage="<?php _e( 'This field can not be empty','buddypress' )?>" oninvalid="setCustomValidity('<?php _e( 'This field can not be empty','buddypress' ) ?>')"><?php dpa_addedit_warning( 'name' ) ?></div>
				<div style="clear: left;"></div>
				
				<div class="label"><?php _e( 'Nombre En', 'buddypress' ) ?></div>
				<div class="data"><input autofocus type="text" name="name_en" id="name_en" maxlength="200" value="<?php esc_attr( dpa_addedit_value( 'name_en' ) ) ?>" required  x-moz-errormessage="<?php _e( 'This field can not be empty','buddypress' )?>" oninvalid="setCustomValidity('<?php _e( 'This field can not be empty','buddypress' ) ?>')"><?php dpa_addedit_warning( 'name_en' ) ?></div>
								
				<div class="label"><?php _e( 'Nombre Eu', 'buddypress' ) ?></div>
				<div class="data"><input autofocus type="text" name="name_eu" id="name_eu" maxlength="200" value="<?php esc_attr( dpa_addedit_value( 'name_eu' ) ) ?>" required x-moz-errormessage="<?php _e( 'This field can not be empty','buddypress' )?>" oninvalid="setCustomValidity('<?php _e( 'This field can not be empty','buddypress' ) ?>')"><?php dpa_addedit_warning( 'name_eu' ) ?></div>

				<div style="clear: left;"></div>
			</div>

			<div class="container">
		
				<div class="label"><?php _e( 'Descripci&oacute;n Es', 'buddypress' ) ?></div>
				<div class="data"><textarea name="description" id="description" required x-moz-errormessage="<?php _e( 'This field can not be empty','buddypress' )?>" oninvalid="setCustomValidity('<?php _e( 'This field can not be empty','buddypress' ) ?>')"><?php dpa_addedit_value( 'description' ) ?></textarea><?php dpa_addedit_warning( 'description' ) ?><br /><p class="hint"><?php _e( "Expl&iacute;ca c&oacute;mo obtener &eacute;ste hito.", 'buddypress' ) ?></p></div>
				<div style="clear: left;"></div>

				<div class="label"><?php _e( 'Descripci&oacute;n En', 'buddypress' ) ?></div>
				<div class="data"><textarea name="description_en" id="description_en" required x-moz-errormessage="<?php _e( 'This field can not be empty','buddypress' )?>" oninvalid="setCustomValidity('<?php _e( 'This field can not be empty','buddypress' ) ?>')"><?php dpa_addedit_value( 'description_en' ) ?></textarea><?php dpa_addedit_warning( 'description_en' ) ?><br /><p class="hint"><?php _e( "Expl&iacute;ca c&oacute;mo obtener &eacute;ste hito.", 'buddypress' ) ?></p></div>
				<div style="clear: left;"></div>

				<div class="label"><?php _e( 'Descripci&oacute;n Eu', 'buddypress' ) ?></div>
				<div class="data"><textarea name="description_eu" id="description_eu" required x-moz-errormessage="<?php _e( 'This field can not be empty','buddypress' )?>" oninvalid="setCustomValidity('<?php _e( 'This field can not be empty','buddypress' ) ?>')"><?php dpa_addedit_value( 'description_eu' ) ?></textarea><?php dpa_addedit_warning( 'description_eu' ) ?><br /><p class="hint"><?php _e( "Expl&iacute;ca c&oacute;mo obtener &eacute;ste hito.", 'buddypress' ) ?></p></div>
				<div style="clear: left;"></div>

			</div>

			<div class="container">
				<div class="label"><?php _e( 'Puntos', 'buddypress' ) ?></div>
				<div class="data"><input type="number" min="1" name="points" id="points" value="<?php dpa_addedit_value( 'points' ) ?>" required x-moz-errormessage="<?php _e( 'This field can not be empty','buddypress' )?>" oninvalid="setCustomValidity('<?php _e( 'This field can not be empty','buddypress' ) ?>')"><?php dpa_addedit_warning( 'points' ) ?><br /><p class="hint"><?php _e( "Los puntos que se otorgan por obtener &eacute;ste hito.", 'buddypress' ) ?></p></div>
				<div style="clear: left;"></div>
			</div>

			<?php do_action( 'dpa_achievement_addedit_after_about' ) ?>
		</fieldset>


	</div> <!--  tabbertab -->

	<div class="tabbertab">
		<fieldset class="mandatory-trigger">
			<?php do_action( 'dpa_achievement_addedit_before_advanced' ) ?>

			<legend><?php _e( "Opciones", 'buddypress' ) ?></legend>
			<div class="container">
				<div class="label"><?php _e( 'Activo', 'buddypress' ) ?></div>
				<div class="data"><input type="checkbox" name="is_active" id="is_active" <?php dpa_addedit_value( 'is_active' ) ?>><?php dpa_addedit_warning( 'is_active' ) ?><br /><p class="hint"><?php _e( "Esta activo ?", 'buddypress' ) ?></p></div>
				<div style="clear: left;"></div>
			</div>

			<div class="container">
				<div class="label"><?php _e( 'Oculto', 'buddypress' ) ?></div>
				<div class="data"><input type="checkbox" name="is_hidden" id="is_hidden" <?php dpa_addedit_value( 'is_hidden' ) ?>><br /><p class="hint"><?php _e( "Ocultarlo del listado de hitos ?", 'buddypress' ) ?></p></div>
				<div style="clear: left;"></div>
			</div>

			<div class="container">
				<div class="label"><?php _e( 'Slug', 'buddypress' ) ?></div>
				<div class="data"><input type="text" name="slug" id="slug" maxlength="200" value="<?php dpa_addedit_value( 'slug' ) ?>" required x-moz-errormessage="<?php _e( 'This field can not be empty','buddypress' )?>" oninvalid="setCustomValidity('<?php _e( 'This field can not be empty','buddypress' ) ?>')"><?php dpa_addedit_warning( 'slug' ) ?><br /><p class="hint"><?php _e( "El <em>slug</em> forma parte del enlace a &eacute;ste hito.", 'buddypress' ) ?></p></div>
				<div style="clear: left;"></div>
			</div>

			<?php do_action( 'dpa_achievement_addedit_after_advanced' ) ?>
		</fieldset>


	</div> <!--  tabbertab -->
</div> <!--  tabber -->

<?php if ( dpa_is_achievement_edit_page() ) : ?>
	<input type="button" class="button" onclick="parent.jQuery.fancybox.close();" value="&larr; <?php _e('Cancelar', 'buddypress') ?>">
	<input type="submit" name="achievement-edit" id="achievement-edit" value="<?php _e( 'Actualizar Hito', 'buddypress' ) ?> &rarr;">
<?php else: ?>
	<input type="button" class="button" onclick="parent.jQuery.fancybox.close();" value="&larr; <?php _e('Cancelar', 'buddypress') ?>">
	<input type="submit" name="achievement-create" id="achievement-create" value="<?php _e( 'Crear Hito', 'buddypress' ) ?> &rarr;">
<?php endif; ?>
