Commit 2de63f63 by Jose Antonio

Merge remote-tracking branch 'origin/develop' into develop

parents f05be3a3 78c5a9dd
...@@ -16,6 +16,7 @@ import android.net.Uri; ...@@ -16,6 +16,7 @@ import android.net.Uri;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle; import android.os.Bundle;
import android.os.Environment; import android.os.Environment;
import android.os.Handler;
import android.provider.MediaStore; import android.provider.MediaStore;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat; import android.support.v4.app.ActivityCompat;
...@@ -51,6 +52,7 @@ import com.yottacode.tools.GUITools; ...@@ -51,6 +52,7 @@ import com.yottacode.tools.GUITools;
import org.json.JSONException; import org.json.JSONException;
import java.io.File; import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
...@@ -119,7 +121,7 @@ public class EditPictoActivity extends Activity { ...@@ -119,7 +121,7 @@ public class EditPictoActivity extends Activity {
private String dirAudioPath = null; private String dirAudioPath = null;
private MediaRecorder mRecorder = null; private MediaRecorder mRecorder = null;
private MediaPlayer mPlayer; private MediaPlayer mPlayer = null;
BotonCircular botonGrabar; BotonCircular botonGrabar;
BotonCircular botonReproducir; BotonCircular botonReproducir;
...@@ -175,17 +177,15 @@ public class EditPictoActivity extends Activity { ...@@ -175,17 +177,15 @@ public class EditPictoActivity extends Activity {
protected void onCancelled(){ protected void onCancelled(){
stopRecording(); stopRecording();
botonReproducir.setEnabled(tiempoGrabado > 1 ? true : false); botonReproducir.setEnabled(tiempoGrabado > 1);
layoutPreview.setVisibility(tiempoGrabado > 1 ? View.VISIBLE : View.GONE); layoutPreview.setVisibility(tiempoGrabado > 1 ? View.VISIBLE : View.GONE);
layoutGrabacion.setVisibility(tiempoGrabado > 1 ? View.GONE : View.VISIBLE); layoutGrabacion.setVisibility(tiempoGrabado > 1 ? View.GONE : View.VISIBLE);
textoTTotal.setText(tiempoGrabado == 10 ? "00:00 | 00:" + tiempoGrabado : "00:00 | 00:0" + tiempoGrabado );
tiempoTotal = tiempoGrabado-1;
barraReproducir.setMax(tiempoTotal);
botonGrabar.PhidePressedRing(); botonGrabar.PhidePressedRing();
if(tiempoGrabado>1) hayGrabacion = true ; hayGrabacion = (tiempoGrabado>=1 ? true : false); //Si lo grabado es al menos 1s => hay grabacion
else hayGrabacion = false; if(hayGrabacion)
reiniciarGrabacion(); assignFileToPlayer(new File(previewAudioPath));
reiniciarGrabacion();
} }
} }
...@@ -217,7 +217,7 @@ public class EditPictoActivity extends Activity { ...@@ -217,7 +217,7 @@ public class EditPictoActivity extends Activity {
protected void onCancelled(){ protected void onCancelled(){
stopPlaying(); stopPlaying();
assignFileToPlayer(editar ? (p.getUriSound() != null ? p.get_audioPath() : previewAudioPath) : null); assignFileToPlayer(editar ? ((!borrado && p.get_audioFile()!=null) ? p.get_audioFile() : new File(previewAudioPath)) : null);
reiniciarReproducción(); reiniciarReproducción();
} }
} }
...@@ -347,22 +347,15 @@ public class EditPictoActivity extends Activity { ...@@ -347,22 +347,15 @@ public class EditPictoActivity extends Activity {
legend.setText(p.get_translation()); legend.setText(p.get_translation());
supAsociado.setText(p.get_user_avatar()==null ? NO_SUP_TEXT : p.get_user_avatar()); supAsociado.setText(p.get_user_avatar()==null ? NO_SUP_TEXT : p.get_user_avatar());
//Si el picto viene con sonido //Si el picto viene con sonido
if(p.getUriSound() != null){ if(p.get_audioFile() != null){
borrado = false; borrado = false;
Log.i(DEBUG_MESSAGE,"Ruta: "+p.getUriSound() +"---Ruta2: "+p.get_audioPath());
Log.i(DEBUG_MESSAGE,"Picto CON sonido asociado");
layoutPreview.setVisibility(View.VISIBLE);
File file = new File(p.get_audioPath());
assignFileToPlayer(file.getPath());
tiempoTotal = mPlayer.getDuration();
hayGrabacion = true; hayGrabacion = true;
//tiempoTotal = mPlayer.getDuration();
layoutGrabacion.setVisibility(View.GONE); layoutGrabacion.setVisibility(View.GONE);
layoutPreview.setVisibility(View.VISIBLE);
botonReproducir.setEnabled(true);
assignFileToPlayer(p.get_audioFile());
}else{ }else{
Log.i(DEBUG_MESSAGE,"Picto SIN sonido asociado");
layoutPreview.setVisibility(View.INVISIBLE); layoutPreview.setVisibility(View.INVISIBLE);
layoutGrabacion.setVisibility(View.VISIBLE); layoutGrabacion.setVisibility(View.VISIBLE);
hayGrabacion = false; hayGrabacion = false;
...@@ -403,7 +396,6 @@ public class EditPictoActivity extends Activity { ...@@ -403,7 +396,6 @@ public class EditPictoActivity extends Activity {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
String[] assocciated_person = mDrawerList.getAdapter().getItem(position).toString().split("\n"); String[] assocciated_person = mDrawerList.getAdapter().getItem(position).toString().split("\n");
supAsociado.setText(assocciated_person[1]); supAsociado.setText(assocciated_person[1]);
Log.i("TAG_PRUEBS","Sup elegido: "+supAsociado.getText());
mDrawerLayout.closeDrawer(Gravity.RIGHT); mDrawerLayout.closeDrawer(Gravity.RIGHT);
} }
}); });
...@@ -460,12 +452,10 @@ public class EditPictoActivity extends Activity { ...@@ -460,12 +452,10 @@ public class EditPictoActivity extends Activity {
} }
} }
Intent intent = getIntent(); //Mandar a pictogram activity el path y el texto de la imagen Intent intent = getIntent(); //Mandar a pictogram activity el path y el texto de la imagen
intent.putExtra(PictoMenu.IS_EDIT, editar); //Para saber despues si estas editando o añadiendo nuevo y coger los datos de intent o de data en OnActivityResult intent.putExtra(PictoMenu.IS_EDIT, editar); //Para saber despues si estas editando o añadiendo nuevo y coger los datos de intent o de data en OnActivityResult
intent.putExtra(PictoMenu.PATH, filepath); //Mandar Path imagen intent.putExtra(PictoMenu.PATH, filepath); //Mandar Path imagen
intent.putExtra(PictoMenu.PATH_SOUND,borrado ? audioPath : p.get_audioPath()); //Mandar el path del audio intent.putExtra(PictoMenu.PATH_SOUND,editar ? ((!borrado && p.getUriSound()!= null) ? p.get_audioPath() : audioPath) : audioPath); //Mandar el path del audio
Log.e(LOG_TAG, "PATH SOUND:"+audioPath);
intent.putExtra(Picto.JSON_ATTTRS.EXPRESSION, legend.getText().toString()); //Mandar expresion nueva intent.putExtra(Picto.JSON_ATTTRS.EXPRESSION, legend.getText().toString()); //Mandar expresion nueva
intent.putExtra(Picto.JSON_ATTTRS.CATEGORY, getIntent().getIntExtra(Picto.JSON_ATTTRS.CATEGORY, -1)); intent.putExtra(Picto.JSON_ATTTRS.CATEGORY, getIntent().getIntExtra(Picto.JSON_ATTTRS.CATEGORY, -1));
intent.putExtra(Picto.JSON_ATTTRS.USER_AVATAR, supAsociado.getText()); intent.putExtra(Picto.JSON_ATTTRS.USER_AVATAR, supAsociado.getText());
...@@ -495,26 +485,23 @@ public class EditPictoActivity extends Activity { ...@@ -495,26 +485,23 @@ public class EditPictoActivity extends Activity {
public boolean onTouch(View v, MotionEvent event) { public boolean onTouch(View v, MotionEvent event) {
switch(event.getAction()){ switch(event.getAction()){
case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_DOWN:
recordSoundOn.play(MediaActionSound.SHUTTER_CLICK); recordSoundOn.play(MediaActionSound.START_VIDEO_RECORDING);
tareaGrabacion = (RecordTask) new RecordTask().execute(tiempoGrabado); Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
gifRecord.setBackgroundResource(R.drawable.record_animation); gifRecord.setBackgroundResource(R.drawable.record_animation);
try { //Para que no capture el sonido del sistema tareaGrabacion = (RecordTask) new RecordTask().execute(tiempoGrabado);
sleep(600);
} catch (InterruptedException e) {
e.printStackTrace();
}
startRecording(); startRecording();
}
Log.i(DEBUG_MESSAGE,"Grabando.."); }, 500); // 0.5s delay
return true; return true;
case MotionEvent.ACTION_UP: case MotionEvent.ACTION_UP:
gifRecord.setBackgroundResource(R.color.white);
tareaGrabacion.cancel(true); tareaGrabacion.cancel(true);
//mPlayer.setDataSource(previewAudioPath); gifRecord.setBackgroundResource(R.color.white);
assignFileToPlayer(/*mPlayer,*/previewAudioPath);
recordSoundOff.play(MediaActionSound.FOCUS_COMPLETE); recordSoundOff.play(MediaActionSound.FOCUS_COMPLETE);
return true; return true;
} }
return false; return false;
...@@ -527,13 +514,11 @@ public class EditPictoActivity extends Activity { ...@@ -527,13 +514,11 @@ public class EditPictoActivity extends Activity {
if(reproduciendo){ if(reproduciendo){
tareaReproduccion.cancel(true); tareaReproduccion.cancel(true);
reproduciendo = false; reproduciendo = false;
Log.i(DEBUG_MESSAGE,"Parar");
botonReproducir.setImageResource(android.R.drawable.ic_media_play); botonReproducir.setImageResource(android.R.drawable.ic_media_play);
}else{ }else{
reproduciendo = true; reproduciendo = true;
tareaReproduccion = (PlayTask) new PlayTask().execute(tiempoTotal);
startPlaying(); startPlaying();
Log.i(DEBUG_MESSAGE,"Reproducir");
tareaReproduccion = (PlayTask) new PlayTask().execute(tiempoReproducir);
botonReproducir.setImageResource(android.R.drawable.ic_media_pause); botonReproducir.setImageResource(android.R.drawable.ic_media_pause);
} }
} }
...@@ -544,18 +529,16 @@ public class EditPictoActivity extends Activity { ...@@ -544,18 +529,16 @@ public class EditPictoActivity extends Activity {
public void onClick(View v) { public void onClick(View v) {
borrado = true; borrado = true;
if(hayGrabacion){ if(hayGrabacion){
mPlayer.release(); //stopPlaying();
if(editar){
if(p.getUriSound() != null) {
Log.i(DEBUG_MESSAGE,"Eliminado->"+p.getUriSound());
p.setUriSound(null);
}
}
Log.i(DEBUG_MESSAGE,"Eliminado->"+previewAudioPath);
layoutGrabacion.setVisibility(View.VISIBLE); layoutGrabacion.setVisibility(View.VISIBLE);
layoutPreview.setVisibility(View.GONE); layoutPreview.setVisibility(View.GONE);
hayGrabacion = false; hayGrabacion = false;
} }
File file = new File(previewAudioPath);
if(file.exists()){
file.delete();
}
/*previewAudioPath = null;*/
} }
}); });
...@@ -613,39 +596,37 @@ public class EditPictoActivity extends Activity { ...@@ -613,39 +596,37 @@ public class EditPictoActivity extends Activity {
} }
private void assignFileToPlayer(String pathReproducir){ private void assignFileToPlayer(File audio){
Log.i(DEBUG_MESSAGE,"Asignado: "+audio.getPath().toString());
mPlayer = new MediaPlayer(); mPlayer = new MediaPlayer();
try { try {
mPlayer.setDataSource(pathReproducir); mPlayer.setDataSource(new FileInputStream(audio).getFD());
} catch (IOException e) {
e.printStackTrace();
}
}
private void startPlaying(/*MediaPlayer m*/) {
//m = new MediaPlayer();
try {
//mPlayer.setDataSource(pathReproducir);
mPlayer.prepare(); mPlayer.prepare();
mPlayer.start(); tiempoTotal = Math.round(mPlayer.getDuration()/1000);
textoTTotal.setText("00:00 | 00:"+(tiempoTotal == 10 ? tiempoTotal : "0" + tiempoTotal));
barraReproducir.setMax(tiempoTotal);
Log.i(DEBUG_MESSAGE,"Assign.."+tiempoTotal);
} catch (IOException e) { } catch (IOException e) {
Log.e(DEBUG_MESSAGE, "prepare() failed"); e.printStackTrace();
} catch (IllegalStateException e){ } catch (IllegalStateException e){
Log.e(DEBUG_MESSAGE, "Illegal state exception on prepare()"); Log.e(DEBUG_MESSAGE, "Illegal state exception on prepare()");
} }
} }
private void pausePlay(MediaPlayer m){ private void startPlaying() {
if(m.isPlaying()){ Log.i(DEBUG_MESSAGE,"reproduciendo..."+previewAudioPath);
m.pause(); try {
}else{ mPlayer.start();
m.start(); }catch (IllegalStateException e){
Log.e(DEBUG_MESSAGE, "Illegal state exception on start()");
} }
} }
private void stopPlaying(/*MediaPlayer m*/) { private void stopPlaying() {
mPlayer.stop();
mPlayer.reset(); mPlayer.reset();
//mPlayer = null; mPlayer.release();
mPlayer = null;
} }
private void startRecording() { private void startRecording() {
...@@ -680,7 +661,6 @@ public class EditPictoActivity extends Activity { ...@@ -680,7 +661,6 @@ public class EditPictoActivity extends Activity {
private void reiniciarGrabacion(){ private void reiniciarGrabacion(){
tiempoGrabado = 0; tiempoGrabado = 0;
textoTGrabacion.setText("00:00 | 00:10"); textoTGrabacion.setText("00:00 | 00:10");
//hayGrabacion = false;
} }
private void reiniciarReproducción(){ private void reiniciarReproducción(){
...@@ -689,23 +669,10 @@ public class EditPictoActivity extends Activity { ...@@ -689,23 +669,10 @@ public class EditPictoActivity extends Activity {
reproduciendo = false; reproduciendo = false;
botonReproducir.setImageResource(android.R.drawable.ic_media_play); botonReproducir.setImageResource(android.R.drawable.ic_media_play);
textoTTotal.setText("00:00 | 00:"+(tiempoTotal == 10 ? tiempoTotal : "0" + tiempoTotal)); textoTTotal.setText("00:00 | 00:"+(tiempoTotal == 10 ? tiempoTotal : "0" + tiempoTotal));
Log.i(DEBUG_MESSAGE,"Reinic.."+tiempoTotal);
barraReproducir.setMax(tiempoTotal);
} }
/*@Override
public void onStop() {
super.onStop();
if (mRecorder != null) {
mRecorder.release();
mRecorder = null;
}
if (mPlayer!= null) {
mPlayer.release();
mPlayer = null;
}
}*/
@Override @Override
public boolean onKeyDown(int keyCode, KeyEvent event) { public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) { if (keyCode == KeyEvent.KEYCODE_BACK) {
......
/* global angular */ /* global angular */
angular.module('dashboardConfig', []).constant('config', { angular.module('dashboardConfig', []).constant('config', {
backend: 'https://' + window.location.host, backend: 'http://' + window.location.host,
}); });
...@@ -14,11 +14,14 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor ...@@ -14,11 +14,14 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor
surname: '', surname: '',
address: '', address: '',
country: '', country: '',
postalCode: '',
email: '', email: '',
phone: '', phone: '',
gender: 'F', gender: 'F',
lang: 'es', lang: 'es',
office: '' office: '',
password: '',
password_confirm: ''
}; };
// List of supervisors // List of supervisors
...@@ -53,11 +56,14 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor ...@@ -53,11 +56,14 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor
surname: '', surname: '',
address: '', address: '',
country: '', country: '',
postalCode: '',
email: '', email: '',
phone: '', phone: '',
gender: 'F', gender: 'F',
lang: 'es', lang: 'es',
office: '' office: '',
password: '',
password_confirm: ''
}; };
// Hide the form // Hide the form
...@@ -78,11 +84,14 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor ...@@ -78,11 +84,14 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor
name: supervisor.name, name: supervisor.name,
surname: supervisor.surname, surname: supervisor.surname,
address: supervisor.address, address: supervisor.address,
postalCode: supervisor.address,
country: supervisor.country, country: supervisor.country,
email: supervisor.email, email: supervisor.email,
actualEmail: supervisor.email, actualEmail: supervisor.email,
phone: supervisor.phone, phone: supervisor.phone,
gender: supervisor.gender, gender: supervisor.gender,
password: supervisor.password,
password_confirm: supervisor.password_confirm,
lang: supervisor.lang, lang: supervisor.lang,
office: supervisor.office office: supervisor.office
}; };
...@@ -94,7 +103,7 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor ...@@ -94,7 +103,7 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor
// Checking new email // Checking new email
// If no change, it is deleted from supervisor object // If no change, it is deleted from supervisor object
if(supervisor.email == supervisor.actualEmail){ if (supervisor.email == supervisor.actualEmail){
delete supervisor.email; delete supervisor.email;
delete supervisor.actualEmail; delete supervisor.actualEmail;
} }
...@@ -103,6 +112,14 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor ...@@ -103,6 +112,14 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor
var supid = supervisor.id; var supid = supervisor.id;
delete supervisor.id; delete supervisor.id;
if (supervisor.password != supervisor.password_confirm)
return;
if (supervisor.password.length == 0) {
delete supervisor.password;
delete supervisor.password_confirm;
}
$http $http
.put(config.backend + '/sup/' + supid, supervisor) .put(config.backend + '/sup/' + supid, supervisor)
.success(function(data, status, headers, config) { .success(function(data, status, headers, config) {
...@@ -122,6 +139,9 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor ...@@ -122,6 +139,9 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor
$scope.supervisors[i].gender = data.gender; $scope.supervisors[i].gender = data.gender;
$scope.supervisors[i].lang = data.lang; $scope.supervisors[i].lang = data.lang;
$scope.supervisors[i].office = data.office; $scope.supervisors[i].office = data.office;
$scope.supervisors[i].postalCode = data.postalCode;
$scope.supervisors[i].password = '';
$scope.supervisors[i].password_confirm = '';
} }
} }
...@@ -142,7 +162,13 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor ...@@ -142,7 +162,13 @@ dashboardControllers.controller('AdminSupervisorsCtrl', function AdminSupervisor
var supervisor = $scope.formdatasupervisor; var supervisor = $scope.formdatasupervisor;
// Add password // Add password
supervisor.password = supervisor.name + supervisor.email; if (supervisor.password != supervisor.password_confirm)
return;
if (supervisor.password.length == 0) {
delete supervisor.password;
delete supervisor.password_confirm;
}
$http $http
.post(config.backend+'/sup', supervisor) .post(config.backend+'/sup', supervisor)
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<input type="text" class="form-control" id="supervisor_postal_code" placeholder="{{ 'postal_code' | translate }}" required ng-model="formdata.postal_code" ng-change="formdata.postal_code = formdata.postal_code.toUpperCase()"/>
</div>
<div class="form-group">
<label translate>country</label> <label translate>country</label>
<select class="form-control" name="supervisor_country" id="supervisor_country" ng-model="formdatasupervisor.country" required> <select class="form-control" name="supervisor_country" id="supervisor_country" ng-model="formdatasupervisor.country" required>
<option value="ES" selected>España</option> <option value="ES" selected>España</option>
...@@ -39,7 +43,7 @@ ...@@ -39,7 +43,7 @@
</div> </div>
<fieldset> <fieldset>
<legend translate>office</legend> <label translate>office</label>
<div class="form-group"> <div class="form-group">
<select class="form-control" name="supervisor_office" id="supervisor_office" ng-model="formdatasupervisor.office" required> <select class="form-control" name="supervisor_office" id="supervisor_office" ng-model="formdatasupervisor.office" required>
<option ng-repeat="of in offices | orderBy: 'name'" value="{{ of.id }}"> <option ng-repeat="of in offices | orderBy: 'name'" value="{{ of.id }}">
...@@ -50,7 +54,7 @@ ...@@ -50,7 +54,7 @@
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend translate>language</legend> <label translate>language</label>
<div class="form-group"> <div class="form-group">
<select class="form-control" name="supervisor_language" id="supervisor_language" ng-model="formdatasupervisor.lang"> <select class="form-control" name="supervisor_language" id="supervisor_language" ng-model="formdatasupervisor.lang">
<option value="es" selected>Español</option> <option value="es" selected>Español</option>
...@@ -59,6 +63,17 @@ ...@@ -59,6 +63,17 @@
</div> </div>
</fieldset> </fieldset>
<fieldset>
<label translate>password</label>
<span class="color_red text_sm pull-right" ng-show="formdata.password != formdata.password_confirm" translate>password_match</span>
<div class="form-group">
<input type="password" class="form-control" id="supervisor_password1" placeholder="{{ 'password_type' | translate }}" required ng-model="formdatasupervisor.password" />
</div>
<div class="form-group">
<input type="password" class="form-control" id="supervisor_password2" placeholder="{{ 'password_confirm' | translate }}" required ng-model="formdatasupervisor.password_confirm" />
</div>
</fieldset>
<div class="form-group"> <div class="form-group">
<button type="button" class="btn btn-default" ng-click="resetForm()">{{'cancel'|translate}}</button> <button type="button" class="btn btn-default" ng-click="resetForm()">{{'cancel'|translate}}</button>
<button type="submit" class="btn btn-primary" translate>add</button> <button type="submit" class="btn btn-primary" translate>add</button>
......
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<input type="text" class="form-control" id="supervisor_postal_code" placeholder="{{ 'postal_code' | translate }}" required ng-model="formdata.postalCode" ng-change="formdata.postalCode = formdata.postalCode.toUpperCase()"/>
</div>
<div class="form-group">
<input type="text" class="form-control" id="supervisor_country" placeholder="{{ 'country' | translate }}" ng-model="formdatasupervisor.country" /> <input type="text" class="form-control" id="supervisor_country" placeholder="{{ 'country' | translate }}" ng-model="formdatasupervisor.country" />
</div> </div>
...@@ -34,7 +38,7 @@ ...@@ -34,7 +38,7 @@
</div> </div>
<fieldset> <fieldset>
<legend translate>office</legend> <label translate>office</label>
<div class="form-group"> <div class="form-group">
<select class="form-control" name="supervisor_office" id="supervisor_office" ng-model="formdatasupervisor.office"> <select class="form-control" name="supervisor_office" id="supervisor_office" ng-model="formdatasupervisor.office">
<option ng-repeat="of in offices | orderBy: 'name'" value="{{ of.id }}"> <option ng-repeat="of in offices | orderBy: 'name'" value="{{ of.id }}">
...@@ -45,7 +49,7 @@ ...@@ -45,7 +49,7 @@
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend translate>language</legend> <label translate>language</label>
<div class="form-group"> <div class="form-group">
<select class="form-control" name="supervisor_language" id="supervisor_language" ng-model="formdatasupervisor.lang"> <select class="form-control" name="supervisor_language" id="supervisor_language" ng-model="formdatasupervisor.lang">
<option value="es">Español</option> <option value="es">Español</option>
...@@ -54,6 +58,17 @@ ...@@ -54,6 +58,17 @@
</div> </div>
</fieldset> </fieldset>
<fieldset>
<label translate>password</label>
<span class="color_red text_sm pull-right" ng-show="formdata.password != formdata.password_confirm" translate>password_match</span>
<div class="form-group">
<input type="password" class="form-control" id="supervisor_password1" placeholder="{{ 'password_type' | translate }}" ng-model="formdatasupervisor.password" />
</div>
<div class="form-group">
<input type="password" class="form-control" id="supervisor_password2" placeholder="{{ 'password_confirm' | translate }}" ng-model="formdatasupervisor.password_confirm" />
</div>
</fieldset>
<div class="form-group"> <div class="form-group">
<button type="button" class="btn btn-default" ng-click="resetForm()">{{'cancel'|translate}}</button> <button type="button" class="btn btn-default" ng-click="resetForm()">{{'cancel'|translate}}</button>
<button type="submit" class="btn btn-primary" translate>save</button> <button type="submit" class="btn btn-primary" translate>save</button>
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
</div> </div>
</div> </div>
</div> </div>
<fieldset> </fieldset>
<fieldset> <fieldset>
<div class="form-group"> <div class="form-group">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment